About MeshLab-mcp
MeshLab-MCP is an extensible bridge between MeshLab mesh operations and MCP clients, aimed at web UIs and orchestrators. It links a FastAPI HTTP interface to a custom TCP JSON backend using `pymeshlab`.
Key features
- 01FastAPI HTTP interface for MCP clients
- 02TCP JSON backend for mesh operations
- 03Built on `pymeshlab`
- 04Extensible mesh tools and commands
Use cases
- 01Connecting a web UI to MeshLab operations
- 02Routing orchestrator requests to mesh processing
- 03Adding custom mesh tools and protocol commands
MCP support
Accepts MCP client requests through a FastAPI HTTP server and bridges them to a TCP server that runs mesh operations using `pymeshlab`.
Configuration
Local server config is the same for every client. Copy it into your client’s MCP config file.
We haven’t collected a package or remote endpoint for this server. Follow the instructions in the project README.
Tools
Local servers expose tools only once running on your machine, and the maintainer has not provided a tool list.
Details
From the project READMEMeshLab-MCP
A minimal, extensible Model Context Protocol (MCP) bridge for MeshLab, using FastAPI (HTTP) and a custom TCP (JSON) backend for mesh operations via pymeshlab.
Features
- HTTP API for MCP clients (web UIs, orchestrators) using FastAPI
- TCP (JSON) backend to communicate with a MeshLab process (using
pymeshlab) - Extensible: Add new mesh tools and protocol commands easily
Project Structure
MeshLab-mcp/
├── meshlab_tcp_server.py # TCP server wrapping pymeshlab
├── meshlab_tcp_client.py # TCP client for server communication
├── meshlab_mcp.py # Core MCP protocol logic (extensible)
├── mcp_server.py # FastAPI HTTP server (entrypoint)
├── mcp_client.py # HTTP client for testing
├── requirements.txt
└── README.md
Setup Instructions
-
Clone the repository and
cdinto the directory. -
Install dependencies:
pip install -r requirements.txt -
Add Python Scripts directory to PATH (if not already):
- Example:
C:\Users\<your-username>\AppData\Roaming\Python\Python313\Scripts\ - Restart your terminal after changing PATH.
- Example:
-
Start the MeshLab TCP server (in a terminal):
python meshlab_tcp_server.py -
Start the HTTP MCP server (in another terminal):
python -m uvicorn mcp_server:app --reloadIf
uvicornis not recognized, use the full path or thepython -m uvicorn ...form as above. -
Test with the HTTP client (optional):
python mcp_client.pyYou should see output like:
{'mesh_loaded': False, 'current_mesh_name': None}
MCP Client Configuration Example (for MeshLab integration)
To connect MeshLab (or an orchestrator) to this MCP server, use a configuration like:
{
"mcpServers": {
"meshlab": {
"command": "uvx",
"args": [
"meshlab-mcp"
],
"host": "127.0.0.1",
"port": 8000
}
}
}
command: The command to launch your MCP HTTP server (e.g.,uvx meshlab-mcporpython -m uvicorn mcp_server:app --reload)host/port: Where the HTTP API is reachable.
How It Works
- MCP clients (web UI, orchestrator) send HTTP requests to the FastAPI server.
- The FastAPI server bridges these requests to the MeshLab TCP server (which runs mesh operations using
pymeshlab). - The TCP server responds with JSON results.
Extending
- Add new mesh tools/commands in
meshlab_tcp_server.pyand expose them in the protocol. - Add corresponding methods in
meshlab_tcp_client.pyand new HTTP endpoints inmcp_server.py.
Troubleshooting
- If
uvicornis not recognized, ensure your Python Scripts directory is in PATH or usepython -m uvicorn .... - Always start the TCP server before the HTTP server.
- For mesh operations, ensure your mesh files are present in the working directory.
Next Steps
- Start building new mesh tools and protocol commands!
- For advanced integration with MeshLab's GUI or other tools, refer to MeshLab's documentation and MCP specs.
If you have questions or want to add new features, just ask!
Comments
New to MCP?
From what the protocol is to installing your first server, these answers cover most first questions.
An open protocol that defines how AI applications connect to external tools and data in a uniform way. Clients talk to the model; MCP servers provide tools, resources and prompt templates. They exchange standard messages, so one server can be reused by many clients.