mcp-toolforge
mcp-toolforge
自然言語のツール説明から新しいMCPサーバーを生成するメタMCPサーバーです。
プロジェクト名、短い説明、および自然言語のツール説明のリスト(例: "fetches the weather for a string city and returns a string summary")を指定すると、mcp-toolforgeは完全で実行可能なMCPサーバープロジェクト(スキーマ、実装、実際のアサーションによるテスト、README、LICENSE)を生成し、インストールして実行できる状態にします。
flowchart TD
subgraph Client_Layer["AI Client / Claude Desktop"]
A["Client (Claude, Cursor, etc.)"]
end
subgraph Meta_Server["mcp-toolforge (this repo)"]
M["mcp_toolforge.server"]
G["mcp_toolforge.generator"]
end
subgraph Generated["Generated Server Project"]
P["src/<pkg>/__init__.py"]
S["src/<pkg>/server.py"]
T["tests/test_<pkg>.py"]
R["README.md"]
L["LICENSE"]
PP["pyproject.toml"]
end
A -- "MCP stdio JSON-RPC" --> M
M -- "generate_server tool call" --> G
G -- "writes files" --> P
G -- "writes files" --> S
G -- "writes files" --> T
G -- "writes files" --> R
G -- "writes files" --> L
G -- "writes files" --> PPアーキテクチャ
┌─────────────────────┐ ┌──────────────────────────┐
│ AI Client │ stdio │ mcp-toolforge server │
│ (Claude, Cursor) │──JSON──│ (this repo) │
└─────────────────────┘ RPC └────────┬───────────────┘
│ generate_server
│ (name, description,
│ tool_descriptions, dest)
▼
┌────────────────────────────────────┐
│ generator.generate_project() │
│ parses NL → ToolSpec → ServerSpec │
│ renders: pyproject, server.py, │
│ tests, README, LICENSE │
└────────────────────────────────────┘
│
┌─────────────────┴─────────────────┐
│ Example generated servers │
│ • examples/weather_server │
│ • examples/todo_server │
│ • examples/math_server │
└────────────────────────────────────┘Related MCP server: mcp-creator
クイックスタート
mcp-toolforge のインストール
pip install -e ".[dev]"mcp-toolforge 自体の実行(メタサーバー)
MCPサーバー(stdioトランスポート)として:
{
"mcpServers": {
"mcp-toolforge": {
"command": "python",
"args": ["-m", "mcp_toolforge.server"],
"cwd": "/path/to/mcp-toolforge"
}
}
}または、スタンドアローンのサーバープロジェクトを生成するCLIとして:
# Interactive wizard
mcp-toolforge -i
# One-shot
mcp-toolforge \
--name my_server \
--description "A server that does X" \
--tool "fetches the weather for a string city and returns a string summary" \
--dest ./my_servergenerate_server ツールの使用
mcp-toolforge がMCPサーバーとして登録されている場合、AIエージェントは次のように呼び出せます:
generate_server(
name="my_server",
description="A server that does X",
tool_descriptions=[
"fetches the weather for a string city and returns a string summary",
"adds a string task and returns a string confirmation"
],
dest="/path/to/output" # optional, defaults to /tmp/mcp-toolforge-gen
)このツールは完全なプロジェクトを dest/<package_name>/ に書き込み、要約文字列を返します。生成されたサーバーは、その後、お使いのMCPクライアントに個別にインストールして登録できます。
自然言語解析の仕組み
各ツールの説明は次のパターンに従う必要があります:
<VERB> [a/an] <type> <name> [, <type> <name>] ... and returns <type> <description>例:
説明 | ツール名 | パラメータ |
|
|
|
|
|
|
|
|
|
|
|
|
認識されるパラメータ型: string, integer, number, boolean, array。型付きパラメータが検出されなかった場合は、自由形式の query: string パラメータが推定されます。
例
3つのサンプルサーバーが examples/ に生成されます:
サーバー | パッケージ | ツール | 説明 |
WeatherServer |
|
| 天気情報を取得します |
TodoServer |
|
| やることリストを管理します |
MathServer |
|
| 算術ツール |
各例は、独自のテストを備えた完全に動作するMCPサーバーです:
cd examples/math_server
pip install -e .
pytest開発
# Install with dev dependencies
pip install -e ".[dev]"
# Run all tests
pytest
# Run end-to-end test against the meta-server over stdio
python e2e_test.py
# Regenerate examples
python make_examples.pyテスト
tests/test_generator.py— ジェネレーターの16テスト(解析、スキーマ推論、ファイルレンダリング、プロジェクト作成)tests/test_server.py— メタMCPサーバーの5テスト(ツール一覧、ツール呼び出し、エラー処理)e2e_test.py— メタサーバーを実際のstdioサブプロセスとして実行し、MCPClientで接続するエンドツーエンドテスト各サンプルサーバーには4つのテストが付属しています(3サンプルで合計12テスト)
すべてのテストは実際のアサーションを使用し、実際のファイル出力/ツール結果を検証します。
ライセンス
MIT — LICENSE を参照してください。
This server cannot be installed
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Related MCP Servers
- AlicenseBqualityDmaintenanceAn intelligent tool that automates the setup of new Model Context Protocol (MCP) server projects through a conversational interface. It generates project structures, technical specifications, and context-rich documentation to streamline AI-assisted development in TypeScript or Python.103MIT
- AlicenseAqualityCmaintenanceA tool that enables AI assistants to conversationally scaffold, build, and publish Python MCP servers to PyPI. It automates the entire development lifecycle, including package naming, tool scaffolding, GitHub repository setup, and package publishing.10MIT
- FlicenseNot gradedqualityDmaintenanceA production-ready Python scaffold for building Model Context Protocol (MCP) servers using FastMCP. It provides a structured framework for developers and AI agents to rapidly develop, test, and manage custom tools and workflows.1
- AlicenseAqualityCmaintenanceGenerates production-ready MCP servers with dual-mode (MCP + CLI) architecture, tests, and documentation. Includes progressive disclosure tools for AI agents and best practices guidance.7Apache 2.0
Related MCP Connectors
MCP server for generating rough-draft project plans from natural-language prompts.
MCP server for AI agents to plan, verify, and deploy Cloudflare-native apps.
MCP server for secureFlows: token-free URL builders and integration-linting tools for AI agents.
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/prem-the-dev/mcp-toolforge'
If you have feedback or need assistance with the MCP directory API, please join our Discord server