automcp

by NapthaAI

301 220 downloads Not rated yet MIT

About

Easily convert tool, agents and orchestrators from existing agent frameworks to MCP servers

Details

License
MIT

Explore

- Generates MCP-compatible server code from YAML definitions
- Generates client libraries for easy service consumption
- Creates handler stubs for implementing tool functionality
- Organizes code by service in dedicated directories

Setting up with Highlight

This MCP is not yet compatible with Highlight’s one-click setup. However, you can still use it with Highlight by following these steps:

  1. Download and install Highlight from highlightai.com/download
  2. Navigate to the plugins tab and select "Add Custom Plugin"
  3. Configure the plugin with the settings below
    Plugin Name automcp
    Command (node, npx, python, etc.)

    Please refer to the README for specific instructions on how to obtain API keys or other required environment variables.

  4. Enable "Start Automatically" if you want the plugin to start when Highlight launches

From the repository

Naptha's MCPaaS platform requires your repository be set up with uv.
This means you need a couple configurations in your pyproject.toml.

First, make sure the run_mcp.py file generated by naptha-automcp is the root of your repository.

Second, make sure your pyproject.toml has the following configurations:

[build-system]
requires = [ "hatchling",]
build-backend = "hatchling.build"

[project.scripts]
serve_stdio = "run_mcp:serve_stdio"
serve_sse = "run_mcp:serve_sse"

[tool.hatch.metadata]
allow-direct-references = true

[tool.hatch.build.targets.wheel]
include = [ "run_mcp.py",]
exclude = [ "__pycache__", "*.pyc",]
sources = [ ".",]
packages = ["."]

If your agent is in a subdirectory / package of your repository:

pyproject.toml
run_mcp.py
my_agent/
|---| __init__.py
    | agent.py

Make sure that it's imported like this in run_mcp.py:

from my_agent.agent

Not like below, since this will cause the build to fail:
``python
from .my_agent.agent
`

Once you have configured everything, commit and push your code (but not your environment variables!) to github. Then, you can test it to make sure you set up everything correctly:

uvx --from https://github.com/your-username/your-repo serve_sse

If this results in your MCP server being launched on port 8000 successfully, you're good to go!

Install from PyPI:


pip install naptha-automcp

Create a new MCP server for your project:

Navigate to your project directory with your agent implementation:

bash
cd your-project-directory

Generate the MCP server files via CLI with one of the following flags (crewai, langgraph, llamaindex, openai, pydantic, mcp_agent):

bash
automcp init -f crewai

Edit the generated
run_mcp.py file to configure your agent:

python

The repository includes examples for each supported framework:


pip install -e .

automcp serve -t sse

Each example follows the same workflow as a regular project:

1. Run automcp init -f <FRAMEWORK> to generate the server files
2. Edit
run_mcp.py to import and configure the example agent
3. Add a .env file with necessary environmental variables
4. Install dependencies and serve using
automcp serve -t sse

os.environ["PYTHONWARNINGS"] = "ignore"

try:
mcp.run(transport="stdio")
finally:

After setting up your files, you can run your server using one of these methods:


uv run serve_stdio
uv run serve_sse

Note about transport modes:
- STDIO: You don't need to run the server manually - it will be started by the client (Cursor)
- SSE: This is a two-step process:
1. Start the server separately:
python run_mcp.py sse or automcp serve -t sse
2. Add the mcp.json configuration to connect to the running server

If you want to use the uv run commands, add the following to your pyproject.toml`:

[tool.uv.scripts]
serve_stdio = "python run_mcp.py"
serve_sse = "python run_mcp.py sse"

Naptha supports deploying your newly-created MCP server to our MCP servers-as-a-service platform! It's easy to get started.

Claude Desktop / Cursor

Paste into your MCP client config file to install this server.

{
    "mcpServers": {
        "automcp": {
            "automcp": {
                "command": "uv",
                "args": [
                    "venv"
                ]
            }
        }
    }
}

McpServers

{
    "automcp": {
        "command": "uv",
        "args": [
            "venv"
        ]
    }
}

🚀 Overview

automcp allows you to easily convert tools, agents and orchestrators from existing agent frameworks into MCP servers, that can then be accessed by standardized interfaces via clients like Cursor and Claude Desktop.

We currently support deployment of agents, tools, and orchestrators as MCP servers for the following agent frameworks:

1. CrewAI
2. LangGraph
3. Llama Index
4. OpenAI Agents SDK
5. Pydantic AI
6. mcp-agent

🔧 Installation

Install from PyPI:

```bash

No reviews yet — be the first

Sign in to leave a review

Use Google, GitHub, or an email account so ratings stay tied to real people.

Email sign in

No reviews posted yet.

Videos about automcp

Relevant YouTube tutorials, setups, and demos