Token导航 LogoToken导航

MCP Server · 开发工具

mcpboot (Vivekhaldar)

mcpboot是一款通过自然语言提示生成并启动MCP服务器的工具,无需SDK知识或编写样板代码,适用于快速API封装和工具创建。

stdio官方级别未说明来源级核验工具 10@modelcontextprotocol/inspector
JavaScriptClaudeAPI封装Claude Desktop

快速开始

作者 / 组织
vivekhaldar
提供方
vivekhaldar
运行时
Node.js

工具数量

10

来源目录标注

资源数量

0

来源目录标注

提示词数量

0

来源目录标注

GitHub Star

1

仓库热度

收录来源

1 个

MCP World

选型结论

mcpboot (Vivekhaldar) 属于开发工具类 MCP Server,公开资料标注 10 个工具,通过stdio 本地进程接入,适配 Claude Desktop、Claude,有可以直接复制的安装命令;接入前要先准备 API Key。

分类

开发工具

传输方式

stdio

认证方式

API Key

部署方式

公开资料未说明

安装与配置

安装命令

npx @modelcontextprotocol/inspector --transport http --server-url http://localhost:8100/mcp

公开命令不是通用的启动方式,拼不出可靠配置示例;请在客户端 MCP 配置里按官方文档填写 command 和 args。

上手步骤

  1. 1

    准备运行环境

    stdio 服务在本地起进程,需要先装好 Node.js,再按安装命令拉取依赖。

  2. 2

    安装服务

    复制下面的安装命令执行;命令里带占位符的位置换成自己的密钥或路径。

  3. 3

    写入客户端配置

    在客户端的 MCP 配置里填启动命令和参数,保存后完全退出客户端再打开,让新配置生效。

  4. 4

    验证是否可用

    连接成功后客户端会列出 10 个工具,随便调一个只读工具确认能返回结果。

接入前确认

不要直接授予不必要的文件、网络或账号权限;先核对安装命令和配置内容。

详细介绍

mcpboot

从自然语言提示符生成并提供MCP服务器。

将mcpbot指向API文档(或者只是描述您想要的内容),它生成一个工作 主控程序 服务器。不需要SDK知识。没有样板。无需维护代码。

使用LLM 仅在启动时 用于代码生成。在运行时,工具调用执行缓存的JavaScript,不涉及LLM,也不需要每次调用API成本。

安装

npm install -g mcpboot

需要Node.js 18+。

快速开始

# Set your LLM API key
export ANTHROPIC_API_KEY=sk-ant-...

# Generate an MCP server for the Hacker News API
mcpboot --prompt "Create MCP tools for the Hacker News API: https://github.com/HackerNews/API"

mcpbot获取API文档,生成工具处理程序,并开始在 http://localhost:8000/mcp.

用法

mcpboot [options]

Options:
  --prompt               Generation prompt (inline)
  --prompt-file 
         Generation prompt from file

  --provider             LLM provider: anthropic | openai (default: anthropic)
  --model                  LLM model ID (default: provider-specific)
  --api-key               LLM API key (env: ANTHROPIC_API_KEY | OPENAI_API_KEY)

  --port               HTTP server port (default: 8000)
  --cache-dir 
           Cache directory (default: .mcpboot-cache)
  --no-cache                   Disable caching, regenerate on every startup
  --verbose                    Verbose logging (structured JSON to stderr)
  --log-file 
            Write full verbose log to file (JSON lines, untruncated)
  --dry-run                    Show generation plan without starting server

例子

# Wrap the Hacker News API
mcpboot --prompt "Create MCP tools for the Hacker News API: https://github.com/HackerNews/API"

# Wrap an API from an OpenAPI spec
mcpboot --prompt "Create MCP tools from https://petstore.swagger.io/v2/swagger.json"

# Create specific tools from a known API
mcpboot --prompt "Using the GitHub REST API (https://docs.github.com/en/rest), \
  create tools for listing repos, creating issues, and searching code"

# Create utility tools (no external API needed)
mcpboot --prompt "Create tools for JSON manipulation: pretty-print, validate, diff, and JSONPath extraction"

# Complex prompt from file
mcpboot --prompt-file ./my-api-prompt.txt --port 9000

# Preview what would be generated
mcpboot --prompt "Create MCP tools for https://github.com/HackerNews/API" --dry-run

演练:黑客新闻API

以下是为生成MCP服务器的完整示例 黑客新闻API.

1.启动mcpboot:

mcpboot --model claude-haiku-4-5 --port 8100 --verbose \
  --prompt "Create MCP tools for the Hacker News API. The API docs are at
    https://github.com/HackerNews/API . Figure out what tools are appropriate
    to expose — things like getting top stories, new stories, getting an item
    by ID, getting a user profile, etc."

mcpbot从GitHub获取API文档,使用LLM规划和编译10个工具,并开始提供:

[mcpboot] Found 1 URL(s) in prompt
[mcpboot] Fetched 1 page(s)
[mcpboot] Cache miss — generating tools via LLM
[mcpboot] Plan: 10 tool(s)
[mcpboot] Compiled 10 handler(s)
[mcpboot] Listening on http://localhost:8100/mcp
[mcpboot] Serving 10 tool(s)

随着 --verbose,每个步骤还向stderr发出结构化JSON事件(每行一个JSON对象),其中包含时间戳、请求相关性ID和详细的有效载荷:

{"ts":"...","event":"llm_call_start","req_id":"startup","call_id":1,"provider":"anthropic","model":"claude-haiku-4-5",...}
{"ts":"...","event":"llm_call_end","req_id":"startup","call_id":1,"elapsed_ms":2100,"prompt_tokens":1240,"completion_tokens":892,...}

使用 --log-file mcpboot.log 捕获完整的未截断输出(stderr将长字符串截断为500个字符)。

2.使用MCP检查员进行测试:

npx @modelcontextprotocol/inspector --transport http --server-url http://localhost:8100/mcp

或者使用CLI进行测试 麦克波特:

# List all generated tools
npx mcporter list http://localhost:8100/mcp --schema --allow-http

# Get the top 5 stories (returns story IDs)
npx mcporter call 'http://localhost:8100/mcp.get_top_stories' limit=5 --allow-http

# Fetch details for a story
npx mcporter call 'http://localhost:8100/mcp.get_item_by_id' item_id=42345678 --allow-http

# Look up a user profile
npx mcporter call 'http://localhost:8100/mcp.get_user_profile' username=dang --allow-http

生成的工具: get_top_stories, get_new_stories, get_best_stories, get_ask_stories, get_show_stories, get_job_stories, get_item_by_id, get_user_profile, get_max_item_id, get_recent_changes

后续使用相同提示的运行将完全跳过LLM,并立即从缓存中启动。

从MCP主机连接

mcpboot运行后,将任何与MCP兼容的主机连接到 http://localhost:8000/mcp例如,在Claude Desktop的配置中:

{
  "mcpServers": {
    "my-api": {
      "url": "http://localhost:8000/mcp"
    }
  }
}

运作原理

mcpboot遵循两阶段启动,然后在运行时提供工具:

启动(LLM协助):

  1. 获取 -从提示中提取URL,获取其内容(API文档、自述文件、OpenAPI规范),并构建用于运行时网络访问的域白名单。
  2. 计划 -将提示和提取的文档发送到LLM,LLM生成结构化的生成计划:创建什么工具,它们的模式,它们使用哪些API端点。
  3. 编译 -将每个计划的工具发送回LLM,LLM生成一个JavaScript处理程序函数,该函数调用API、解析响应并格式化结果。
  4. 缓存 --将计划和编译的处理程序存储在磁盘上,按提示哈希+内容哈希键控。后续具有相同提示和不变文档的初创公司完全跳过LLM。

运行时(无LLM):

  1. 服务 --通过StreamableHTTP将生成的工具作为MCP服务器公开。工具调用在沙盒中执行缓存的JavaScript处理程序 vm 获取权限仅限于白名单域。
Prompt + API Docs
       │
       ▼
  URL Fetcher ──► Planner (LLM) ──► Compiler (LLM) ──► Cache
                                                          │
                                                          ▼
  MCP Host ◄──► Exposed Server ◄──► Executor ◄──► Sandbox (vm + fetch)
                                                          │
                                                          ▼
                                                    External APIs

安全模型

生成的处理程序在Node.js中运行 vm 沙盒:

  • 允许: 标准JS全局, fetch (仅限白名单域名)、URL、URLSearchParams
  • 此 路 不通: require, import, process, fs, net, child_process
  • 超时: 每次工具调用30秒

域白名单是根据提示中的URL和在获取的文档中发现的URL自动构建的。

与mcpblox的比较

mcpboot和 mcpblox 是互补的:

|| mcpblox | mcpboot| |--|---------|---------| | 输入 |现有MCP服务器+转换提示|自然语言提示+可选API文档| | 输出 |改造后的MCP服务器|从头开始新的MCP服务器| | LLM生成 |转换函数(输入/输出映射器)|工具处理程序函数(API完整集成)| | 用例 |自定义现有服务器|创建尚不存在的服务器|

它们可以被链接:使用mcpboot引导服务器,然后使用mcpblox对其进行转换。

# Bootstrap an MCP server for the HN API
mcpboot --prompt "Create MCP tools for https://github.com/HackerNews/API" --port 8001

# Transform it with mcpblox to add higher-level tools
mcpblox --upstream-url http://localhost:8001/mcp \
  --prompt "Create a 'daily_digest' tool that gets top 10 stories with their top comments" \
  --port 8002

发展

# Install dependencies
npm install

# Run tests
npm test

# Build
npm run build

# Run from source
npx tsx src/index.ts --prompt "..."

许可证

阿帕奇-2.0

工具与能力

工具数量

10

资源数量

0

提示词数量

0

能力标签

MCP服务器TypeScript本地部署自然语言编程API封装无代码工具JavaScript

支持客户端

Claude DesktopClaude

数量来自来源目录的标注,具体工具清单以官方文档为准。

典型使用场景

让助手直接读代码

把仓库、提交记录和 issue 交给模型检索,补全和重构时不用来回复制文件。

在对话里跑命令

触发构建、测试和脚本,执行结果直接回到上下文,省去切终端。

接进开发流程

把 PR、CI 状态和代码审查接进助手,减少在几个工具之间跳。

选择建议

值得选的地方

  • 工具数量 10 个,一次接入能覆盖的操作比单点工具更全。
  • 有现成的安装命令,不用自己找入口,照着跑就能起服务。
  • 已经适配 Claude Desktop、Claude,换客户端不用重新研究配置。

先想清楚的地方

  • stdio 方式要求本地装好 Node.js,换机器要重新装一遍。
  • 需要自备API Key,没有凭据没法直接试。
  • 第三方目录整理,版本更新和行为细节以官方仓库为准。

更适合

  • 需要在开发工具场景里让模型直接调用外部能力的人。
  • 已经在用 Claude Desktop 的用户,接入路径最短。
  • 想先快速试一下、能接受在本地跑服务的人。

不太适合

  • 完全不想在本地装环境的人。
  • 暂时拿不到API Key的人。
  • 需要厂商级 SLA 和技术支持的生产环境。

同类对比

5 个同类
MCP Server工具数传输方式安装命令收录来源最后核验
mcpboot (Vivekhaldar)

MCP World · 本页

10stdio有1 个2026-05-17
Git 838e2ec1

MCP World

12stdio有2 个2026-05-17
Markitdown MCP 2c653a5f

MCP World

1stdio有1 个2026-05-17
Context7 MCP C671e75a

MCP World

0stdio有1 个2026-05-17
Context7 831acf40

MCP World

0stdio有1 个2026-05-17

按同分类和工具数量挑出最接近的几条,字段以各自详情页为准。

常见问题

5 条

mcpboot (Vivekhaldar) 怎么安装?

公开资料给出的安装命令是 npx @modelcontextprotocol/inspector --transport http --server-url http://localhost:8100/mc…,运行环境为 Node.js。装完后按客户端要求写进 MCP 配置,重启客户端生效。

mcpboot (Vivekhaldar) 怎么在 Claude Desktop、Cursor 里配置?

它是stdio 本地进程,客户端配置里要写启动命令和参数,运行环境是 Node.js;保存后完全退出客户端再打开,配置才会生效。

mcpboot (Vivekhaldar) 收费吗?

本站只整理公开资料,不代收费用,也没有标注具体价格。是否收费取决于服务本身和背后的接口额度,正式使用前按官方说明确认。

mcpboot (Vivekhaldar) 需要 API Key 吗?

公开资料标注的认证方式是API Key,也就是要先拿到凭据才能连上;凭据只填在自己本地的配置里,不要写进公开仓库。

mcpboot (Vivekhaldar) 支持哪些客户端?

公开资料标注支持 Claude Desktop、Claude;其他客户端只要能配置 MCP Server,也能用同样的命令或地址接入。

来源信息

继续浏览同类 MCP