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_serverИспользование инструмента generate_server
Когда mcp-toolforge зарегистрирован как MCP-сервер, ИИ-агент может вызвать:
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.
Примеры
В каталог 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— 5 тестов для мета-MCP-сервера (перечисление инструментов, вызов инструментов, обработка ошибок)e2e_test.py— сквозной тест, который запускает мета-сервер как реальный дочерний процесс stdio и подключается к нему с помощью MCP-клиентаClientКаждый примерный сервер поставляется с 4 тестами (всего 12 в трёх примерах)
Все тесты используют реальные проверки и проверяют фактический вывод файлов / результаты инструментов.
Лицензия
MIT — см. LICENSE.
This server cannot be deployed
Maintenance
Related MCP Connectors
MCP server for generating rough-draft project plans from natural-language prompts.
Create guides as MCP servers to instruct coding agents to use your software (library, API, etc).
MCP server for your apps' tools and custom tools, plus hosted AI agents and approval-gated workflows
Nifty's MCP server — exposes tasks, projects, messages, and files as tools for AI agents.
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
- AlicenseAqualityBmaintenanceA 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
- 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
- AlicenseNot gradedqualityCmaintenanceEnables AI agents to generate complete, runnable MCP server projects from natural-language tool descriptions, including schema, implementation, tests, README, and license.MIT