mcp-box
Private MCP server exposing the ascii Box API as shell and file tools, letting agents like ChatGPT or Claude drive Linux boxes.
README
mcp-box
Private MCP server that turns the ascii Box API into tools an external agent can drive. ChatGPT, Claude, Cursor, or Grok is the agent. The Box is the Linux machine.
POST /prompt is never used. Agents run shell and file tools only.
Install
npm install
cp .env.example .env # set BOX_API_KEY
npm run typecheck
npm test
Run
stdio (Claude Desktop, Cursor, Grok local):
npm run start:stdio
# or
npx tsx src/stdio.ts
Streamable HTTP (local Inspector, or behind tunnel-client):
npm run start:http
# listens on http://127.0.0.1:8787/mcp when PORT=8787 in .env
ChatGPT: use OpenAI Secure MCP Tunnel, not a public Cloudflare URL. See docs/chatgpt.md.
# after tunnel-client is installed and CONTROL_PLANE_API_KEY is set
export CONTROL_PLANE_TUNNEL_ID=tunnel_6a7290ef51b88191af7b32deba8e0640
tunnel-client run \
--control-plane.tunnel-id "$CONTROL_PLANE_TUNNEL_ID" \
--mcp.server-url http://127.0.0.1:8787/mcp
Then in ChatGPT: Criar app → Conexão Túnel → select mcp-box → Sem autenticação.
Environment
| Variable | Default | Purpose |
|---|---|---|
BOX_API_KEY |
(required for live) | Box dashboard API key; never sent to the MCP client |
BOX_BASE_URL |
https://ascii.dev/api/box/v1 |
API base |
MCP_BOX_MODE |
isolated |
isolated or trusted |
ALLOW_WRITES |
true |
When false, deny non-read tools |
HOST |
127.0.0.1 |
HTTP bind address |
PORT |
3333 |
HTTP port |
MCP_BOX_AUDIT_PATH |
stderr (trusted) | Optional audit JSONL path |
See .env.example.
Trust modes
| Mode | noEnv on create/fork |
Account secrets | Audit log | Force stop |
|---|---|---|---|---|
| isolated (default) | always true |
blocked | off | denied |
| trusted | may be false |
allowed via env / account |
JSON lines | allowed with confirm: true |
Isolated boxes cannot act on your account secrets. Use them for untrusted agent work.
Trusted mode records every tool call (timestamp, tool, boxId, outcome). Desktop URLs and tokens are redacted in logs.
Tools
| Tool | Read-only | Notes |
|---|---|---|
box_create |
no | Default size small; TTL 3600s; waits until ready |
box_list |
yes | Optional state filter |
box_get |
yes | Desktop URL redacted in summary |
box_exec |
no | timeoutSeconds capped at 60 |
box_exec_background |
no | Convention under .mcp-box-jobs/ |
box_job_status |
yes | Poll pid/exit/log tails |
box_read_file |
yes | Relative paths only |
box_write_file |
no | utf8 or base64 |
box_download_artifact |
yes | Base64, max ~2MB |
box_desktop |
yes | Secret URL; do not log full value |
box_stop_and_wait |
no | Requires confirm: true |
box_resume |
no | Wait until ready |
box_fork |
no | Isolated forks are noEnv |
box_interrupt |
no | Best-effort; prompt-oriented |
There is no box_prompt tool.
Background jobs
Box has no native shell job API. Background work is:
- Write a launcher under
.mcp-box-jobs/<jobId>/ nohupthe command; store pid and logs- Poll with
box_job_status
Clients
- Local JSON snippets: docs/clients.md
- ChatGPT Developer Mode + tunnel: docs/chatgpt.md
- Grok Build on a template box (OAuth sub): docs/grok-template.md
- Box selected repos (go-zoen): docs/box-repos.md
Grok template
npm run grok:template # small box: grok CLI + OAuth + EnzoTironi/skills + zoen-skills/pstack
npm run grok:diagnose -- bx_… # resume + smoke; REARCHIVE=1 to stop again
Current template: go-zoen / bx_sb5sbxzz (see docs/grok-template.md). Fork for ChatGPT work with Grok + skills + go-zoen.
ChatGPT write caveat
Full write MCP tools in ChatGPT generally need Business / Enterprise / Edu. Pro is often read-only for connectors. Confirm your plan before relying on ChatGPT as the primary write agent.
Security
- Keep
BOX_API_KEYon the host only. - Prefer isolated mode unless you intentionally need account secrets.
- Redact desktop URLs (
_token) from logs and tickets. - Bind HTTP to localhost unless you add auth (v1 has no OAuth).
Non-goals (v1)
- Multi-tenant OAuth
- Wrapping
POST /prompt - Native job queue
- Cloudflare Workers deploy
Development
npm test
npm run typecheck
npm run smoke # fake client tools/list
LIVE_BOX=1 npm run smoke # live create → exec → write/read → stop
License
Private / unlicensed unless you add one.
推荐服务器
Baidu Map
百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。
Playwright MCP Server
一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。
Magic Component Platform (MCP)
一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。
Audiense Insights MCP Server
通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。
VeyraX
一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。
Kagi MCP Server
一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。
graphlit-mcp-server
模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。
e2b-mcp-server
使用 MCP 通过 e2b 运行代码。
Neon MCP Server
用于与 Neon 管理 API 和数据库交互的 MCP 服务器
Exa MCP Server
模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。