Heroku Code MCP
io.github.dsouzaAnush由 GitHub 账号 dsouzaAnush 发布v0.1.0更新于 Oct 24, 2026
Search and execute Heroku Platform API operations
概览
精简的 MCP 服务器,让助手通过 auth_status、search 和 execute 三个工具检索并执行 Heroku 平台 API 操作。
- 可以做什么
- 检查调用方是否已通过 Heroku 身份验证,便于在调用 API 前分支处理
- 用自然语言意图从 schema 与文档上下文中检索并排序 Heroku 操作
- 按选定的操作执行请求,传入路径参数、查询参数和请求体
- 对写操作先做试运行,再凭确认令牌重放执行
- 适用场景
- 适合希望助手通过实时 API 调用管理 Heroku 应用与平台资源、同时保持工具列表精简省 token 的场景。也适合已在使用 Heroku CLI、想让智能体执行读取操作并可选地受控写入的用户。
- 运行要求
- 以本地 Node.js 进程运行,需从仓库安装依赖、构建并启动,提供本地 HTTP MCP 端点,也可通过 npx 从 GitHub 启动。需要 Heroku 账户令牌(从 Heroku CLI 播种或走 OAuth),以及 TOKEN_STORE_PATH 和 TOKEN_ENCRYPTION_KEY_BASE64;客户端以 x-user-id 请求头连接。启用写操作还需 ALLOW_WRITES 和 WRITE_CONFIRMATION_SECRET。
安装
在 SourceWeft 中
- 打开 控制台中的 Heroku Code MCP,将其添加到工作区。
- 为需要使用其工具的对话启用该服务。
Desktop only,通过 STDIO。 STDIO 服务会启动本地进程,因此需要 SourceWeft 桌面宿主。
其他 MCP 客户端
参照 仓库 中的启动说明。
README
Heroku Code MCP
A compact MCP server for the Heroku Platform API using a Code Mode pattern:
search+execute+auth_status.
Heroku Code MCP gives agent clients a small, token-efficient control surface for Heroku operations. Pair it with Heroku Skills when you want workflow guidance, safety checks, and Heroku product context alongside live API tools.
Design references:
Quick Start
Default MCP URL: http://127.0.0.1:3000/mcp
Seed auth from the Heroku CLI:
Start the server:
Smoke test:
Before npm publication, the package can also run from GitHub:
Install in Agent Clients
[Claude Code] Claude Code
Install the companion plugin for skills plus MCP wiring:
Or add the running MCP server directly:
[Claude Desktop] Claude Desktop
Use the HTTP endpoint directly when supported:
For Desktop builds that expect stdio servers, bridge through mcp-remote:
Build a .mcpb bundle with:
[OpenAI Codex] Codex
Codex uses Heroku Plugin for skills and optional MCP wiring:
Enable heroku-plugin@heroku-plugin in the Codex Plugins tab, or add:
Run this MCP server on http://127.0.0.1:3333/mcp when you want live Heroku API tools through the plugin.
[Cursor] Cursor
Add the MCP server to ~/.cursor/mcp.json or project-local .cursor/mcp.json:
Other MCP Clients
Use streamable HTTP:
Or bridge to stdio:
How It Works
Typical flow:
- Call
auth_status. - Call
searchwith natural language intent. - Choose one
operation_id. - Call
executewithpath_params,query_params, andbody. - For writes, run
dry_run=true, then replay withconfirm_write_tokenandALLOW_WRITES=true.
Examples:
Safety and Configuration
Mutations (POST, PATCH, PUT, DELETE) are blocked by default. To allow a write, set ALLOW_WRITES=true, request a dry run, and replay with the returned confirm_write_token. Sensitive headers and body fields are redacted.
Key env vars:
ALLOW_WRITESREQUEST_TIMEOUT_MSMAX_RETRIESCATALOG_CACHE_PATHREAD_CACHE_TTL_MSEXECUTE_MAX_BODY_BYTESEXECUTE_BODY_PREVIEW_CHARS
Full example: .env.example
Benchmarks
Benchmarks were captured on February 22, 2026 on the same machine and account for both implementations.
Charts:
Full methodology and artifacts live in BENCHMARKS.md and benchmarks/results/.
Development and Release
Validate locally:
This repo uses free GitHub Actions:
validate.ymlruns build, tests,server.jsonvalidation, and npm pack dry-run on PRs and pushes tomain.release.ymlruns onv*tags, builds the.mcpb, updates releaseserver.json, creates or updates the GitHub Release, and publishes to the MCP Registry through GitHub OIDC.- Dependabot checks npm and GitHub Actions dependencies weekly.
Publish manually when needed:
For CI-based npm publishing, configure npm trusted publishing for repo dsouzaAnush/heroku-code-mcp and workflow release.yml, then run the release workflow with publish_npm=true.
Repository Layout
src/schema/*: ingestion, operation normalization, and cachesrc/search/*: search index and rankingsrc/execute/*: validation and Heroku API executionsrc/auth/*: OAuth and encrypted token storagetests/*: catalog, search, and execute testsbenchmarks/results/*: benchmark artifactsserver.json: MCP Registry metadata
Brand and Troubleshooting
This repo includes the official Heroku wordmark and mark under assets. Use them according to the Heroku Brand Guidelines.
Common fixes:
- MCP Inspector connection error: confirm URL
http://127.0.0.1:3000/mcpand server health. AUTH_REQUIRED: seed a token or complete OAuth.- Write blocked: confirm
ALLOW_WRITES=trueand send the dry-run confirmation token. - Large response body: narrow query scope or lower output caps.
来源:README.md,提交 79ff865
工具
0版本历史
1- v0.1.0最新Sep 16, 2026
评分
已满足适用检查项的 50%
该评分衡量此收录条目的完整程度,依据注册中心条目、端点与公开来源计算得出。它不是对服务器本身的评价,也不表示服务器安全或当前可用:可连通性是带日期的检查结果,评分也不包含安装量或用户评价。
- 近 30 天内可连通25 分
请保持端点能够响应 MCP 握手;SourceWeft 每 30 天探测一次。
- 已声明认证方式10 分
请在注册中心条目中声明凭据请求头,或保持端点能够响应探测,以便判定其认证方式。
- 已列出工具15 分
请让服务器在无凭据时响应 tools/list,或发布可在沙箱中无凭据启动的软件包。
- 描述必需15 分
- 图标10 分
- 文档15 分
- 许可证10 分