Threedee (Meshy) MCP server

Enables text-to-3D model generation through the Meshy API with tools for creating previews, refining models with PBR textures, and converting images to 3D objects.
Back to servers
Provider
Fabian H
Release date
Feb 16, 2025
Language
Python
Stats
1 star

This MCP server provides integration with the Meshy API, allowing users to create 3D mesh renderers through Anthropic models. It's designed to transform text descriptions into visual 3D objects by leveraging mesh generation capabilities.

Installation

To install and run the MCP server, follow these steps:

Prerequisites

  • Python 3.8 or higher
  • pip package manager
  • A Meshy API key
  • An Anthropic API key (if using Claude integration)

Setup

  1. Clone the repository:

    git clone https://github.com/yourusername/mcp-meshy-server.git
    cd mcp-meshy-server
    
  2. Install required dependencies:

    pip install -r requirements.txt
    
  3. Set up environment variables for your API keys:

    export MESHY_API_KEY="your_meshy_api_key"
    export ANTHROPIC_API_KEY="your_anthropic_api_key"  # If using Claude
    

Usage

Starting the Server

Start the MCP server by running:

python server.py --port 8000

The server will start and listen for connections on the specified port (default: 8000).

Creating Mesh Renderers

You can interact with the MCP server either through direct API calls or via an Anthropic model configured to use this tool.

Using API Directly

Send a POST request to the server with your 3D object description:

curl -X POST http://localhost:8000/generate-mesh \
  -H "Content-Type: application/json" \
  -d '{"description": "A red sports car with sleek design"}'

The server will return a JSON response with a URL to the generated 3D mesh.

Through Anthropic Model

If using Claude with MCP:

  1. Configure your Claude prompt to include the mesh generation tool
  2. Request a 3D object by describing it in natural language
  3. Claude will call the MCP server and return the resulting mesh URL

Example prompt:

I need a 3D model of a medieval castle with high towers and a moat. Can you create this using the mesh generation tool?

Configuration Options

The server supports several configuration options:

  • --port: The port number to run the server on (default: 8000)
  • --host: The host address to bind to (default: 0.0.0.0)
  • --quality: The quality of mesh generation (options: low, medium, high)

Example with custom configuration:

python server.py --port 9000 --host 127.0.0.1 --quality high

Response Format

Successful responses will include:

  • mesh_url: Direct URL to the generated 3D mesh
  • preview_url: URL to a 2D preview image of the mesh
  • status: Generation status

Troubleshooting

If you encounter issues:

  • Verify your API keys are set correctly
  • Check server logs for detailed error messages
  • Ensure your description is detailed enough for successful mesh generation
  • Try reducing the complexity of your request if generation fails

How to add this MCP server to Cursor

There are two ways to add an MCP server to Cursor. The most common way is to add the server globally in the ~/.cursor/mcp.json file so that it is available in all of your projects.

If you only need the server in a single project, you can add it to the project instead by creating or adding it to the .cursor/mcp.json file.

Adding an MCP server to Cursor globally

To add a global MCP server go to Cursor Settings > MCP and click "Add new global MCP server".

When you click that button the ~/.cursor/mcp.json file will be opened and you can add your server like this:

{
    "mcpServers": {
        "cursor-rules-mcp": {
            "command": "npx",
            "args": [
                "-y",
                "cursor-rules-mcp"
            ]
        }
    }
}

Adding an MCP server to a project

To add an MCP server to a project you can create a new .cursor/mcp.json file or add it to the existing one. This will look exactly the same as the global MCP server example above.

How to use the MCP server

Once the server is installed, you might need to head back to Settings > MCP and click the refresh button.

The Cursor agent will then be able to see the available tools the added MCP server has available and will call them when it needs to.

You can also explictly ask the agent to use the tool by mentioning the tool name and describing what the function does.

Want to 10x your AI skills?

Get a free account and learn to code + market your apps using AI (with or without vibes!).

Nah, maybe later