convez.ai
MCP ServerIntegração & APIsAvançado
mkebiclioglu

Formlabs Local MCP

mkebiclioglu/formlabs-local-mcp

Controle impressoras Formlabs via IA com MCP integrado

Ver no GitHub
InicialPluginScore · de 0 a 100

Servidor MCP que expõe a API local do PreFormServer da Formlabs para ferramentas compatíveis como Claude, Cursor e VS Code. Permite controlar impressoras Formlabs via prompts de chat, automatizando workflows de preparação de impressão SLA/SLS como importação de STL, auto-orientação, geração de suportes e estimativas.

Instalação

$npx convez-ai mkebiclioglu/formlabs-local-mcp

1 comando no terminal: detecta o formato do repositório (marketplace ou plugin avulso) e instala via Claude Code. Requer Node 18+ e o Claude Code instalado.

Métricas

Estrelas
0
Forks
0
Acompanhando
0
Saúde
42%
Último commit
há 2 dias
Versão
v1.0.14
Issues abertas
3
Contribuidores
1

Casos de uso

  • Automatizar preparação de arquivos STL para impressão 3D
  • Estimar tempo e recursos de impressão via chat
  • Integrar workflows de prototipagem com IA
  • Enviar jobs de impressão direto de prompts

Veredito

Solução niche bem-arquitetada para usuários de Formlabs que querem automação via IA. Está em alfa e depende do PreFormServer local; recomendado apenas para equipes com hardware Formlabs e familiaridade técnica.

README

A tradução para o português deste README ainda está na fila.

formlabs-local-mcp

A Model Context Protocol server that exposes the Formlabs Local API to any MCP-compatible AI tool — Claude Code, Claude Desktop, Cursor, VS Code, and others.

Drive your Formlabs printers from a chat prompt:

"Import ~/parts/bracket.stl, auto-orient it, generate supports, estimate the print time, then send it to my Form 4."

The MCP server wraps PreFormServer's HTTP API as a set of typed tools the model can call directly.

Status

Early alpha. The tool surface is complete for the common SLA/SLS preparation workflow, but has only been tested against the API spec — not yet validated against real hardware. PRs and bug reports welcome.

Requirements

  • Python ≥ 3.10
  • The PreFormServer executable, downloaded from the Formlabs API downloads page. PreFormServer is a headless build of PreForm; it must be running for the MCP server to do anything.

Install

Clone the repo and install it into a virtual environment:

git clone https://github.com/mkebiclioglu/formlabs-local-mcp.git
cd formlabs-local-mcp
python -m venv .venv
source .venv/bin/activate
pip install -e .

The pip install -e . step creates a formlabs-local-mcp script inside .venv/bin/ — note its absolute path (e.g. /Users/you/formlabs-local-mcp/.venv/bin/formlabs-local-mcp). You'll point your MCP client at it.

Configure your MCP client

Claude Code

Easiest path is the CLI:

claude mcp add formlabs \
  -s user \
  -e PREFORM_SERVER_PATH=/path/to/PreFormServer.app/Contents/MacOS/PreFormServer \
  -- /absolute/path/to/formlabs-local-mcp/.venv/bin/formlabs-local-mcp

Or edit ~/.claude.json (or .claude/mcp.json for project scope) directly:

{
  "mcpServers": {
    "formlabs": {
      "command": "/absolute/path/to/formlabs-local-mcp/.venv/bin/formlabs-local-mcp",
      "env": {
        "PREFORM_SERVER_PATH": "/path/to/PreFormServer.app/Contents/MacOS/PreFormServer"
      }
    }
  }
}

Confirm it's wired up: claude mcp list should show formlabs: ✓ Connected.

Claude Desktop

Add the same mcpServers block to ~/Library/Application Support/Claude/claude_desktop_config.json (macOS) or %APPDATA%\Claude\claude_desktop_config.json (Windows). Restart Claude Desktop after editing.

PreFormServer lifecycle

The MCP server has two modes for talking to PreFormServer:

  1. Spawn mode (recommended). Set PREFORM_SERVER_PATH to the absolute path of the PreFormServer executable. The MCP server starts it on launch, waits for READY FOR INPUT on stdout, and shuts it down on exit.
  2. External mode. If PREFORM_SERVER_PATH is unset, the MCP server assumes PreFormServer is already running on localhost:44388 (or whatever PREFORM_SERVER_PORT / PREFORM_SERVER_URL you set).

Environment variables

VariableDefaultPurpose
PREFORM_SERVER_PATH(unset)Absolute path to the PreFormServer executable. If set, the MCP server spawns and supervises it.
PREFORM_SERVER_PORT44388Port the PreFormServer listens on.
PREFORM_SERVER_URLhttp://localhost:$PORTOverride the base URL entirely (e.g. for a PreFormServer on another machine).
PREFORM_SPAWN1Set to 0 to disable spawning even if PREFORM_SERVER_PATH is set.
PREFORM_POLL_INTERVAL2.0Seconds between operation status polls.
PREFORM_POLL_TIMEOUT600Maximum seconds to wait for any async operation.

Tools

The MCP server exposes ~25 tools across these categories:

CategoryTools
Healthhealth_check
Scenecreate_scene, list_scenes, get_scene, delete_scene, load_form
Modelsimport_model, update_model, delete_model
Auto-prepauto_orient, auto_support, auto_layout (SLA), auto_pack (SLS)
Modifyhollow_model, add_drain_holes
Validateestimate_print_time, get_print_validation
Exportsave_form, save_screenshot
Deviceslist_devices, discover_devices
Printprint_to_printer
Materialslist_materials
Authlogin, logout

File path parameters must always be absolute — PreFormServer rejects relative paths, environment variables, and URLs.

Companion skills

For Claude Code, the formlabs-claude-skills repo ships opinionated workflow skills (e.g. /formlabs-print) that orchestrate these tools end to end.

Development

In your already-cloned repo:

source .venv/bin/activate
pip install -e ".[dev]"
pytest

To run the server directly against a local PreFormServer (outside of an MCP client, useful for debugging):

PREFORM_SERVER_PATH=/path/to/PreFormServer formlabs-local-mcp

License

MIT. The Formlabs API itself is governed by the Formlabs API License Agreement; this MCP server only makes HTTP calls to it and does not redistribute any Formlabs code.

Disclaimer

This is an independent integration. It is not affiliated with, endorsed by, or supported by Formlabs Inc.

Ver o original no GitHub

Bom para

Relacionados