MCP Tool Factory
概览
作者提供的说明(英文原文)
Generate MCP servers from natural language, OpenAPI specs, or database schemas.
PopNx MCP 的三大支柱
这三项永远不会合并成一个分数:意见、测量和人气是不同的东西。
- 用户评价i暂无评价评价功能将在后续阶段与账户功能一起开放
- 我们的基础检查i1 项中通过 1 项依据公开信息检查;尚未扫描代码
- 使用情况i非常新↓ 48/周 · ★ –
它能帮你做什么
我们还没有为它写通俗的介绍。下面是我们从注册中心读取到的事实。
- 连接方式: 在你的电脑上运行
- 传输方式: stdio
- 分类: 数据库与数据集
- 你需要填写:ANTHROPIC_API_KEY, CLAUDE_CODE_OAUTH_TOKEN, OPENAI_API_KEY, GOOGLE_API_KEY
安装
选择你使用的 AI 应用,然后复制设置。
安装之前
- 基础检查:1 项中通过 1 项
- 在你的电脑上运行,拥有你的用户账户的权限(文件、网络、应用)。
- 需要你自己填写:
ANTHROPIC_API_KEY,CLAUDE_CODE_OAUTH_TOKEN,OPENAI_API_KEY,GOOGLE_API_KEY
标为机密的值是你账户的钥匙。千万不要分享给别人,也不要粘贴到聊天里。
你需要
- npm已安装 Node.js(用于 npx 命令)
你用的是哪个应用?
在上方选择你的应用。我们会记住它,下次按钮会显示“安装到 …”。
打开 Claude Desktop → Settings → Developer → Edit Config,把下面的内容粘贴到 claude_desktop_config.json
{
"mcpServers": {
"tool-factory": {
"command": "npx",
"args": [
"-y",
"@heshamfsalama/mcp-tool-factory"
],
"env": {
"ANTHROPIC_API_KEY": "your-value",
"CLAUDE_CODE_OAUTH_TOKEN": "your-value",
"OPENAI_API_KEY": "your-value",
"GOOGLE_API_KEY": "your-value"
}
}
}
}在终端中运行这条命令
claude mcp add tool-factory --env ANTHROPIC_API_KEY=your-value --env CLAUDE_CODE_OAUTH_TOKEN=your-value --env OPENAI_API_KEY=your-value --env GOOGLE_API_KEY=your-value -- npx -y @heshamfsalama/mcp-tool-factory运行前请先填写空着的值。
或者自己复制设置
粘贴到项目中的 .cursor/mcp.json,或 ~/.cursor/mcp.json
{
"mcpServers": {
"tool-factory": {
"command": "npx",
"args": [
"-y",
"@heshamfsalama/mcp-tool-factory"
],
"env": {
"ANTHROPIC_API_KEY": "your-value",
"CLAUDE_CODE_OAUTH_TOKEN": "your-value",
"OPENAI_API_KEY": "your-value",
"GOOGLE_API_KEY": "your-value"
}
}
}
}浏览器会先询问是否打开应用,然后应用会显示设置并请你确认。密钥的值会留空,由你自己填写。
或者自己复制设置
粘贴到项目中的 .vscode/mcp.json
{
"servers": {
"tool-factory": {
"type": "stdio",
"command": "npx",
"args": [
"-y",
"@heshamfsalama/mcp-tool-factory"
],
"env": {
"ANTHROPIC_API_KEY": "your-value",
"CLAUDE_CODE_OAUTH_TOKEN": "your-value",
"OPENAI_API_KEY": "your-value",
"GOOGLE_API_KEY": "your-value"
}
}
}
}浏览器会先询问是否打开应用,然后应用会显示设置并请你确认。密钥的值会留空,由你自己填写。
这个服务器在你的电脑上运行,而 ChatGPT 只能连接互联网上的服务器。请选择其他应用。
你的选择通过 Cookie 保存在这台设备上,无需账户。
需要你填写的值
- Anthropic Claude API key (one of the 4 provider keys is required)
- Claude Code OAuth token (one of the 4 provider keys is required)
- OpenAI GPT API key (one of the 4 provider keys is required)
- Google Gemini API key (one of the 4 provider keys is required)
这些设置是根据作者在注册中心的条目生成的。如果 README 的写法不同,请以 README 为准。
它能做什么
它在你的电脑上运行;安装后,工具列表会显示在你的 AI 应用中。
基础检查i
我们检查的是任何人都能看到的信息;我们没有阅读代码。不适用的检查项不计入总数。 · 检查于 2026年11月10日
- ✓ 通过
作者与仓库一致
注册名称已通过 GitHub 账户 HeshamFS 验证,该账户拥有此仓库
- … 尚未检查
仍在维护
我们还没有从 GitHub 读取这个仓库
- … 尚未检查
有许可证
我们还没有从 GitHub 读取这个仓库
- – 不适用
端点有响应
它在你的电脑上运行,没有互联网端点
- – 不适用
使用 OAuth 登录
在你的电脑上运行,改用本地设置
- … 尚未检查
工具描述中没有隐藏指令
它在你的电脑上运行;我们只能读取互联网端点的工具列表
与“数据库与数据集”中的其他服务器比较i
- 星标数多于此分类中其他 1156 个服务器的 0%
- 发布到注册中心的时间比此分类中其他 1156 个服务器的 3% 更新
- 基础检查结果等于或优于此分类中其他 1156 个服务器的 100%
与注册中心里这个分类中所有活跃的服务器比较。只有当发布者拥有该仓库时,星标数才计入。
常见问题
MCP Tool Factory 安全吗?
它在 1 项适用的基础检查中通过了 1 项。我们没有阅读代码。在添加密钥或令牌之前,请先看看这个服务器要求哪些权限,并使用只具备所需权限的密钥。
它需要哪些密钥或代码?
你需要填写:ANTHROPIC_API_KEY, CLAUDE_CODE_OAUTH_TOKEN, OPENAI_API_KEY, GOOGLE_API_KEY
它在我的电脑上运行还是在云端?
它在你的电脑上运行。你的 AI 应用会在需要时启动它,数据不会经过作者的服务器(除非它自己调用在线服务)。
它还在维护吗?
GitHub 仓库最后更新于–,最新版本(0.1.0)于10个月前进入注册中心。
哪些应用可以使用它?
支持 MCP 的应用,例如 Claude Desktop、Claude Code、Cursor 和 VS Code。你的电脑上还需要有 Node.js。
有什么可以替代它?
同一分类中有:Supabase, MongoDB MCP Server, Elasticsearch MCP Server
替代选择
同一分类中其他作者的服务器,按星标数排序。
如何看卡片:↓ 每周下载量i★ GitHub 星标i三大支柱:评价 · 检查 · 使用情况i更新 = 最新版本发布到注册中心的时间i
作者的 README
打开 README
按原文从作者的仓库复制。PopNx MCP 没有审查或背书其内容。HTML、图片和脚本已被移除。链接会离开本站。
MCP Tool Factory (TypeScript)
Generate production-ready MCP (Model Context Protocol) servers from natural language descriptions, OpenAPI specs, database schemas, GraphQL schemas, or ontologies.
Why MCP?
The Model Context Protocol (MCP) is an open standard that enables AI assistants to securely connect with external data sources and tools. MCP servers expose tools that can be used by:
- Claude Code and Claude Desktop
- OpenAI Agents SDK
- Google ADK (Agent Development Kit)
- LangChain and CrewAI
- Any MCP-compatible client
MCP Tool Factory lets you generate complete, production-ready MCP servers in seconds.
Features
| Feature | Description |
|---|---|
| Natural Language | Describe your tools in plain English |
| OpenAPI Import | Convert any REST API spec to MCP tools |
| Database CRUD | Generate tools from SQLite or PostgreSQL schemas |
| GraphQL Import | Convert GraphQL schemas to MCP tools (queries to reads, mutations to writes) |
| Ontology Import | Generate from RDF/OWL, JSON-LD, or YAML ontologies |
| Resources & Prompts | Full support for all three MCP primitives: Tools, Resources, and Prompts |
| 10 LLM Providers | Anthropic, OpenAI, Google, Mistral, DeepSeek, Groq, xAI, Azure, Cohere + Claude Code via Vercel AI SDK |
| Cost Tracking | Per-call cost calculation, budget limits, provider cost comparison |
| Parallel Generation | Tool implementations generated concurrently for faster output |
| LLM Response Caching | Deduplicates identical LLM calls with configurable TTL |
| Streamable HTTP | Generated servers use the modern Streamable HTTP transport |
| Web Search | Auto-fetch API documentation for better generation |
| Production Ready | Logging, metrics, rate limiting, retries built-in |
| Type Safe | Full TypeScript with strict mode |
| MCP Registry | Generates server.json for registry publishing |
| Is an MCP Server | Use it directly with Claude to generate servers on-the-fly |
Use as MCP Server
MCP Tool Factory is itself an MCP server! Add it to Claude Desktop, Claude Code, Cursor, or VS Code to generate MCP servers through conversation.
Tier 1 — Zero Config (Claude Code)
Claude Code auto-injects CLAUDE_CODE_OAUTH_TOKEN — no env vars needed:
claude mcp add mcp-tool-factory -- node /path/to/mcp-tool-factory-ts/bin/mcp-server.js
Tier 2 — Standard (Pick a Provider)
Set one API key and go. The factory auto-detects the provider:
Claude Desktop / Cursor / VS Code — add to your MCP config (claude_desktop_config.json, .cursor/mcp.json, or .vscode/mcp.json):
{
"mcpServers": { "mcp-tool-factory": { "command": "node", "args": ["/path/to/mcp-tool-factory-ts/bin/mcp-server.js"], "env": { "ANTHROPIC_API_KEY": "your-key-here" } } } }
Any of these API keys will work: ANTHROPIC_API_KEY, OPENAI_API_KEY, GOOGLE_API_KEY, MISTRAL_API_KEY, DEEPSEEK_API_KEY, GROQ_API_KEY, XAI_API_KEY, AZURE_OPENAI_API_KEY, COHERE_API_KEY.
Tier 3 — Full Control (Provider + Model + Budget)
Use MCP_FACTORY_PROVIDER, MCP_FACTORY_MODEL, and MCP_FACTORY_BUDGET to override auto-detection:
{
"mcpServers": { "mcp-tool-factory": { "command": "node", "args": ["/path/to/mcp-tool-factory-ts/bin/mcp-server.js"], "env": { "OPENAI_API_KEY": "your-key-here", "MCP_FACTORY_PROVIDER": "openai", "MCP_FACTORY_MODEL": "gpt-5.2", "MCP_FACTORY_BUDGET": "0.50" } } } }
| Env Var | Purpose | Example |
|---|---|---|
MCP_FACTORY_PROVIDER | Override auto-detected provider | openai, groq, deepseek |
MCP_FACTORY_MODEL | Override default model | gpt-5.2, deepseek-chat |
MCP_FACTORY_BUDGET | Per-generation budget limit in USD | 0.50 |
Claude Code CLI with full control:
claude mcp add mcp-tool-factory \
-e DEEPSEEK_API_KEY=your-key \ -e MCP_FACTORY_PROVIDER=deepseek \ -e MCP_FACTORY_MODEL=deepseek-chat \ -e MCP_FACTORY_BUDGET=0.25 \ -- node /path/to/mcp-tool-factory-ts/bin/mcp-server.js
Available Tools
| Tool | Description |
|---|---|
generate_mcp_server | Generate from natural language description |
generate_from_openapi | Generate from OpenAPI specification |
generate_from_database | Generate from database schema |
generate_from_graphql | Generate from GraphQL schema |
generate_from_ontology | Generate from RDF/OWL, JSON-LD, or YAML ontology |
validate_typescript | Validate TypeScript code |
list_providers | List available LLM providers |
get_factory_info | Get factory capabilities |
Example Conversation
You: Create an MCP server for the GitHub API with tools to list repos, create issues, and manage pull requests
Claude: *Uses
generate_mcp_servertool*
I've generated a complete MCP server with the following tools:
-
list_repositories- List user repositories
-
create_issue- Create a new issue
-
list_pull_requests- List PRs for a repo
-
merge_pull_request- Merge a PR
Let me write these files to your project...
Quick Start
Installation
# Global installation
npm install -g @heshamfsalama/mcp-tool-factory
Or use npx
npx @heshamfsalama/mcp-tool-factory generate "Create tools for managing a todo list"
Set Your API Key
At least one provider API key is required:
# Anthropic Claude (recommended)
export ANTHROPIC_API_KEY=your-key-here
Or Claude Code OAuth
export CLAUDE_CODE_OAUTH_TOKEN=your-token-here
Or any other supported provider
export OPENAI_API_KEY=your-key-here export GOOGLE_API_KEY=your-key-here export MISTRAL_API_KEY=your-key-here export DEEPSEEK_API_KEY=your-key-here export GROQ_API_KEY=your-key-here export XAI_API_KEY=your-key-here export AZURE_OPENAI_API_KEY=your-key-here export COHERE_API_KEY=your-key-here
Generate Your First Server
# From natural language
mcp-factory generate "Create tools for fetching weather data by city and converting temperatures"
From OpenAPI spec
mcp-factory from-openapi ./api-spec.yaml
From database
mcp-factory from-database ./data.db
From GraphQL schema
mcp-factory from-graphql ./schema.graphql
From ontology
mcp-factory from-ontology ./ontology.owl --format rdf
Usage
Natural Language Generation
mcp-factory generate "Create tools for managing a todo list with priorities" \
--name todo-server \ --output ./servers/todo \ --web-search \ --logging \ --metrics
OpenAPI Specification
# From local file
mcp-factory from-openapi ./openapi.yaml --name my-api-server
With custom base URL
mcp-factory from-openapi ./spec.json --base-url https://api.example.com
Database Schema
# SQLite
mcp-factory from-database ./myapp.db --tables users,posts,comments
PostgreSQL
mcp-factory from-database "postgresql://user:pass@localhost/mydb" --type postgresql
GraphQL Schema
# From a GraphQL SDL file
mcp-factory from-graphql ./schema.graphql --name my-graphql-server
From a URL endpoint
mcp-factory from-graphql https://api.example.com/graphql --name my-api-server
GraphQL queries are mapped to read-only MCP tools, and mutations are mapped to write tools. GraphQL types are automatically converted to Zod validation schemas.
Ontology
# From RDF/OWL (.owl, .rdf, .ttl)
mcp-factory from-ontology ./ontology.owl --format rdf --name knowledge-server
From JSON-LD (.jsonld)
mcp-factory from-ontology ./schema.jsonld --format jsonld --name linked-data-server
From custom YAML ontology
mcp-factory from-ontology ./domain.yaml --format yaml --name domain-server
OWL Classes are mapped to MCP Resources, ObjectProperties become Tools, and DataProperties become tool parameters.
Test & Serve
# Run tests
mcp-factory test ./servers/my-server
Start server for testing
mcp-factory serve ./servers/my-server
Generated Server Structure
servers/my-server/
├── src/ │ └── index.ts # MCP server with tools, resources, and prompts ├── tests/ │ └── tools.test.ts # Vitest tests (InMemoryTransport) ├── package.json # Dependencies ├── tsconfig.json # TypeScript config ├── Dockerfile # Container deployment ├── README.md # Usage documentation ├── skill.md # Claude Code skill file ├── server.json # MCP Registry manifest ├── EXECUTION_LOG.md # Generation trace (optional) └── .github/ └── workflows/ └── ci.yml # GitHub Actions CI/CD
Generated servers export a createServer() factory function for easy testing. The server uses Streamable HTTP transport with a single /mcp POST endpoint and a /health GET endpoint. Tests use InMemoryTransport.createLinkedPair() for fast, reliable in-process testing with vitest.
CLI Reference
| Command | Description |
|---|---|
generate | Generate MCP server from natural language |
from-openapi | Generate from OpenAPI specification |
from-database | Generate from database schema |
from-graphql | Generate from GraphQL schema |
from-ontology | Generate from RDF/OWL, JSON-LD, or YAML ontology |
test | Run tests for generated server |
serve | Start server for testing |
info | Display factory information |
Generate Options
mcp-factory generate "..." \
--output, -o # Output directory (default: ./servers) --name, -n # Server name --description, -d # Package description --github-username, -g # GitHub username for MCP Registry --version, -v # Server version (default: 1.0.0) --provider, -p # LLM provider (anthropic, openai, google, mistral, deepseek, groq, xai, azure, cohere, claude_code) --model, -m # Specific model to use --web-search, -w # Search web for API documentation --auth # Environment variables for auth --health-check # Include health check endpoint (default: true) --logging # Enable structured logging (default: true) --metrics # Enable Prometheus metrics --rate-limit # Rate limiting (requests per minute) --retries # Enable retry logic (default: true) --budget # Maximum spend in USD (aborts if exceeded) --compare-costs # Show cost comparison across providers before generating
Configuration
Environment Variables
| Variable | Description | Required |
|---|---|---|
ANTHROPIC_API_KEY | Anthropic Claude API key | At least one |
CLAUDE_CODE_OAUTH_TOKEN | Claude Code OAuth token | provider key |
OPENAI_API_KEY | OpenAI API key | is required |
| GOOGLE_API_KEY | Google Gemini API key | for generat
只显示了开头部分;其余内容请在仓库中阅读