mcp-toolforge
Enables AI agents to generate complete, runnable MCP server projects from natural-language tool descriptions, including schema, implementation, tests, README, and license.
README
mcp-toolforge
A meta-MCP server that generates new MCP servers from natural-language tool descriptions.
Given a project name, a short description, and a list of natural-language tool
descriptions (e.g. "fetches the weather for a string city and returns a string summary"),
mcp-toolforge writes a complete, runnable MCP server project — schema, implementation,
tests with real assertions, README, LICENSE — ready to install and run.
<!-- BEGIN-ARCHITECTURE -->
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
<!-- END-ARCHITECTURE -->
Architecture
┌─────────────────────┐ ┌──────────────────────────┐
│ 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 │
└────────────────────────────────────┘
Quickstart
Install mcp-toolforge
pip install -e ".[dev]"
Run mcp-toolforge itself (meta-server)
As an MCP server (stdio transport):
{
"mcpServers": {
"mcp-toolforge": {
"command": "python",
"args": ["-m", "mcp_toolforge.server"],
"cwd": "/path/to/mcp-toolforge"
}
}
}
Or as a CLI that generates a standalone server project:
# 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_server
Using the generate_server tool
When mcp-toolforge is registered as an MCP server, an AI agent can call:
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
)
The tool writes a complete project to dest/<package_name>/ and returns a
summary string. The generated server can then be installed and registered
with your MCP client independently.
How natural-language parsing works
Each tool description should follow the pattern:
<VERB> [a/an] <type> <name> [, <type> <name>] ... and returns <type> <description>
Examples:
| Description | Tool name | Params |
|---|---|---|
fetches the weather for a string city and returns a string summary |
fetch |
city: string |
adds a string task and returns a string confirmation |
add |
task: string |
multiplies two numbers given a number a and number b and returns a number product |
multiply |
a: number, b: number |
lists all todos and returns an array of todo items |
list |
query: string (fallback) |
Recognized parameter types: string, integer, number, boolean, array.
If no typed parameters are detected, a free-form query: string parameter is
inferred.
Examples
Three example servers are generated into examples/:
| Server | Package | Tools | Description |
|---|---|---|---|
| WeatherServer | weather_server |
fetch, forecast |
Fetches weather info |
| TodoServer | todo_server |
add, list, remove |
Manages a todo list |
| MathServer | math_server |
add, multiply, compute |
Arithmetic tools |
Each example is a fully working MCP server with its own tests:
cd examples/math_server
pip install -e .
pytest
Development
# 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
Testing
tests/test_generator.py— 16 tests for the generator (parsing, schema inference, file rendering, project creation)tests/test_server.py— 5 tests for the meta-MCP server (tool listing, tool calling, error handling)e2e_test.py— end-to-end test that runs the meta-server as a real stdio subprocess and connects with an MCPClient- Each example server ships with 4 tests (12 total across 3 examples)
All tests use real assertions and verify actual file output / tool results.
License
MIT — see LICENSE.
推荐服务器
Baidu Map
百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。
Playwright MCP Server
一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。
Magic Component Platform (MCP)
一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。
Audiense Insights MCP Server
通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。
VeyraX
一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。
graphlit-mcp-server
模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。
Kagi MCP Server
一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。
e2b-mcp-server
使用 MCP 通过 e2b 运行代码。
Neon MCP Server
用于与 Neon 管理 API 和数据库交互的 MCP 服务器
Exa MCP Server
模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。