
napthaai/automcp
Developer toolsЭта страница переведена автоматически. Технические детали смотрите в оригинале. Открыть оригинал
Легко конвертировать инструменты, агенты и оркестраторы из существующих агентных фреймворков в MCP-серверы
Обзор
automcp позволяет легко преобразовывать инструменты, агенты и оркестраторы из существующих агентных фреймворков в MCP-серверы, к которым можно получить доступ через стандартизированные интерфейсы через такие клиенты, как Cursor и Claude Desktop. В настоящее время мы поддерживаем развертывание агентов, инструментов и оркестраторов в качестве MCP-серверов для следующих агентных фреймворков: 1. CrewAI 2. LangGraph 3. Llama Index 4. SDK агентов OpenAI 5. Pydantic AI 6. MCP-агент Создайте новый MCP-сервер для вашего проекта: Перейдите в каталог проекта с реализацией агента: Генерируйте файлы сервера MCP через CLI с помощью одного из следующих флагов (crewai, langgraph, llamaindex, openai, pydantic и mcp_agent): Отредактируйте сгенерированный run_mcp.py файл, чтобы настроить ваш агент: Установите зависимости и запустите свой MCP-сервер:
Обзор (машинный перевод)
🚀 Обзор
automcp позволяет легко преобразовывать инструменты, агенты и оркестраторы из существующих агентных фреймворков в MCP-серверы, к которым можно получить доступ через стандартизированные интерфейсы через такие клиенты, как Cursor и Claude Desktop.
В настоящее время мы поддерживаем развертывание агентов, инструментов и оркестраторов в качестве MCP-серверов для следующих агентных фреймворков:
- CrewAI
- LangGraph
- Индекс лам
- SDK агентов OpenAI
- Пидантический ИИ
- MCP-агент
🔧 Установка
Установка с PyPI:
Или установите с источника:
🧩 Быстрый старт
Создайте новый MCP-сервер для вашего проекта:
Перейдите в каталог проекта с реализацией агента:
Генерируйте файлы сервера MCP через CLI с помощью одного из следующих флагов (crewai, langgraph, llamaindex, openai, pydantic и mcp_agent):
Отредактируйте сгенерированный файл run_mcp.py для настройки вашего агента:
Установите зависимости и запустите свой MCP-сервер:
📁 Сгенерированные файлы
При запуске automcp init -f генерируется следующий файл:
run_mcp.py
Это основной файл, который настраивает и запускает ваш MCP-сервер. Он содержит:
- Код инициализации сервера
- Транспортные обработчики STDIO и SSE
- Заполнитель для реализации вашего агента
Эта страница переведена автоматически. Технические детали смотрите в оригинале.
README
Показан фрагмент оригинального README. Открыть оригинал.
automcp
🚀 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:
- CrewAI
- LangGraph
- Llama Index
- OpenAI Agents SDK
- Pydantic AI
- mcp-agent
🔧 Installation
Install from PyPI:
# Basic installation
pip install naptha-automcp
# UV
uv add naptha-automcp
Or install from source:
git clone https://github.com/napthaai/automcp.git
cd automcp
uv venv
source .venv/bin/activate
pip install -e .
🧩 Quick Start
Create a new MCP server for your project:
Navigate to your project directory with your agent implementation:
cd your-project-directory
Generate the MCP server files via CLI with one of the following flags (crewai, langgraph, llamaindex, openai, pydantic, mcp_agent):
automcp init -f crewai
Edit the generated run_mcp.py file to configure your agent:
# Replace these imports with your actual agent classes
from your_module import YourCrewClass
# Define the input schema
class InputSchema(BaseModel):
parameter1: str
parameter2: str
# Set your agent details
name = ""
description = ""
# For CrewAI projects
mcp_crewai = create_crewai_adapter(
orchestrator_instance=YourCrewClass().crew(),
name=name,
description=description,
input_schema=InputSchema,
)
Install dependencies and run your MCP server:
automcp serve -t sse
📁 Generated Files
When you run automcp init -f , the following file is generated:
run_mcp.py
This is the main file that sets up and runs your MCP server. It contains:
- Server initialization code
- STDIO and SSE transport handlers
- A placeholder for your agent implementation
- Utilities to suppress warnings that might corrupt the STDIO protocol
You’ll need to edit this file to:
- Import your agent/crew classes
- Define your input schema (the parameters your agent accepts)
- Configure the adapter with your agent
🔍 Examples
Running the examples
The repository includes examples for each supported framework:
# Clone the repository
git clone https://github.com/NapthaAI/automcp.git
cd automcp
# Install automcp in development mode
pip install -e .
# Navigate to an example directory
cd examples/crewai/marketing_agents
# Generate the MCP server files (use the appropriate framework)
automcp init -f crewai
# Edit the generated run_mcp.py file to import and configure the example agent
# (See the specific example's README for details)
# Add a .env file with necessary environmental variables
# Install dependencies and run
automcp serve -t sse
Установка
uvx --from git+https://github.com/your-username/your-repo serve_stdioКонфигурация
{
"mcpServers": {
"crew-name-stdio": {
"type": "stdio",
"command": "/absolute/path/to/your/.venv/bin/uv",
"args": [
"--directory",
"/absolute/path/to/your/project_dir",
"run",
"serve_stdio"
],
"env": {
"OPENAI_API_KEY": "sk-",
"SERPER_API_KEY": ""
}
},
"crew-name-python": {
"type": "stdio",
"command": "/absolute/path/to/your/.venv/bin/python",
"args": [
"/absolute/path/to/your/project_dir/run_mcp.py"
],
"env": {
"OPENAI_API_KEY": "sk-",
"SERPER_API_KEY": ""
}
},
"crew-name-automcp": {
"type": "stdio",
"command": "/absolute/path/to/your/.venv/bin/automcp",
"args": [
"serve",
"-t",
"stdio"
],
"cwd": "/absolute/path/to/your/project_dir",
"env": {
"OPENAI_API_KEY": "sk-",
"SERPER_API_KEY": ""
}
},
"crew-name-sse": {
"type": "sse",
"url": "http://localhost:8000/sse"
}
}
}