NA

napthaai/automcp

Developer tools

このページは AI により自動翻訳されています。技術的な詳細は原文をご確認ください。 原文を見る

301 stars 148 forks 品質 71 トレンド 18Apache-2.0

既存のエージェントフレームワークからMCPサーバーへツール、エージェント、オーケストレーターを簡単に変換できます

概要

AutoMCPは既存のエージェントフレームワークからツール、エージェント、オーケストレーターを簡単にMCPサーバーに変換でき、CursorやClaude Desktopなどの標準化されたインターフェースを通じてアクセス可能です。 現在、以下のエージェントフレームワーク向けにMCPサーバーとしてエージェント、ツール、オーケストレーターの展開をサポートしています: 1. クルーAI 2.ランググラフ 3.ラマインデックス 4.OpenAIエージェントSDK 5.ピダンティックAI 6.MCPエージェント プロジェクト用の新しいMCPサーバーを作成してください: エージェントの実装が記載されたプロジェクトディレクトリに移動します: CLIを通じて、以下のいずれかのフラグ(crewai、langgraph、llamaindex、openai、pydantic、mcp_agent)でMCPサーバーファイルを生成します。 生成されたrun_mcp.pyファイルを編集してエージェントの設定を行います: 依存関係をインストールし、MCPサーバーを稼働させる:

概要(AI 翻訳)

🚀 概要

AutoMCPは既存のエージェントフレームワークからツール、エージェント、オーケストレーターを簡単にMCPサーバーに変換でき、CursorやClaude Desktopなどの標準化されたインターフェースを通じてアクセス可能です。

現在、以下のエージェントフレームワーク向けにMCPサーバーとしてエージェント、ツール、オーケストレーターの展開をサポートしています:

  1. クルーAI
  2. ランググラフ
  3. ラマ指数
  4. OpenAIエージェントSDK
  5. ピダンティックAI
  6. MCPエージェント

🔧 設置

PyPIからのインストール:

またはソースからインストールすることもできます:

🧩 クイックスタート

プロジェクト用の新しいMCPサーバーを作成してください:

エージェントの実装が記載されたプロジェクトディレクトリに移動します:

CLIを通じて、以下のいずれかのフラグ(crewai、langgraph、llamaindex、openai、pydantic、mcp_agent)でMCPサーバーファイルを生成します。

生成されたrun_mcp.pyファイルを編集してエージェントの設定を行います:

依存関係をインストールし、MCPサーバーを稼働させる:

📁 生成ファイル

automcp init -f を実行すると、以下のファイルが生成されます:

run_mcp.py

これはMCPサーバーの設定と動作を決定するメインファイルです。その中には以下が含まれます:

  • サーバー初期化コード
  • STDIOおよびSSEトランスポートハンドラー
  • エージェント実装のプレースホルダー

このページは AI により自動翻訳されています。技術的な詳細は原文をご確認ください。

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:

  1. CrewAI
  2. LangGraph
  3. Llama Index
  4. OpenAI Agents SDK
  5. Pydantic AI
  6. 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
GitHub で README 全文を見る

インストール

uvx --from git+https://github.com/your-username/your-repo serve_stdio
MCP 初心者?mcpskill.org のガイドから始めましょう →

設定

{ "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" } } }