mcp-sandbox

mcp-sandbox

A public MCP server providing test fixtures for developers and QA, with a single tool 'identity' that returns a unique canary string to verify the server's response.

Category
访问服务器

README

mcp-sandbox

A free, open MCP server for developers and GenAI evaluations.

Every tool returns a stable, improbable canary token — something a model would never volunteer on its own. If the token shows up in a response, the call really reached this Model Context Protocol (MCP) server. If it doesn't, the tool was never invoked. That makes it a clean fixture for learning MCP, wiring up clients, and asserting on tool calls in CI and evals.

🌐 Live server: https://mcp.heptafox.com/mcp  ·  📖 Guide: mcp.heptafox.com


What is mcp-sandbox?

A public MCP server of deterministic test fixtures. Each tool returns a fixed canary string instead of real data, so you can prove a response originated from the server rather than the model's training or context.

Why use it?

When you're building or testing an agent, you usually don't want to point it at a production MCP server. You want a deterministic endpoint that always returns a known value. mcp-sandbox is that endpoint:

  • 🎓 Learn MCP — connect a real server in minutes, no API keys or data setup.
  • 🔌 Test clients — confirm your client actually calls tools and relays output.
  • ✅ Verify integrations — prove the MCP layer works end to end.
  • 🚦 Smoke tests — a one-call health check for CI/CD pipelines.
  • 🧪 Automated evals — assert on a stable token, not on fuzzy model prose.

Who is it for?

Developers learning MCP · AI application & agent-framework developers · QA engineers · GenAI evaluation frameworks · CI/CD integration testing.

Supported MCP clients

Works with any MCP-compatible client over streamable HTTP, including:

Claude Desktop · Claude Code · Cursor · Google ADK · LangChain · CrewAI · OpenAI Agents SDK · MCP Inspector

Features

  • ✨ Stable canary tokens — deterministic output you can assert on exactly.
  • 🌐 Streamable HTTP transport — the modern MCP transport, endpoint /mcp.
  • 🔑 Bearer-token auth check — a tool to verify auth reached the server.
  • 🪶 Zero setup — no API keys, no accounts, no data.
  • 🆓 Free & open source — Apache-2.0.

Learning progression

The tools are ordered so you can climb from "is it connected?" to "did auth arrive?" one concept at a time:

Level Tool Auth Params Teaches
1 identity No No Connectivity
2 echo No Yes Passing parameters
3 auth_check Bearer No Authentication

Tools

identity — connectivity check

No params. Returns a fixed ID string. Show it verbatim to confirm the server answered.

MCP-SANDBOX canary 7Q9X-ZK42-VORTEX-PARSNIP

echo — parameter passing

Params: message: str, repeat: int = 1. Sends your text through the server and returns it inside a fixed wrapper, repeated repeat times.

MCP-SANDBOX echo 4F7T-ECHO-START >>> your text <<< 4F7T-ECHO-END

auth_check — authentication

No params (reads the Authorization header). Verifies the server saw your Bearer token.

MCP-SANDBOX auth OK 9B3K-AUTHED-MARIGOLD      # valid token
MCP-SANDBOX auth FAIL 9B3K-NOAUTH-CINDER      # missing/invalid token

Authentication

auth_check is gated by a public development Bearer token:

Authorization: Bearer mcp-sandbox-dev-C7H2-KPMERCHANT

This is a shared smoke-test token for integration testing — it is public and is NOT a production credential. It only gates auth_check.

Quick Start

Use the hosted server

Claude Code — one command:

claude mcp add --transport http mcp-sandbox https://mcp.heptafox.com/mcp \
  --header "Authorization: Bearer mcp-sandbox-dev-C7H2-KPMERCHANT"

Claude Desktop — config is stdio-only, so bridge through mcp-remote in claude_desktop_config.json:

{
  "mcpServers": {
    "mcp-sandbox": {
      "command": "npx",
      "args": [
        "-y", "mcp-remote", "https://mcp.heptafox.com/mcp",
        "--header", "Authorization: Bearer mcp-sandbox-dev-C7H2-KPMERCHANT"
      ]
    }
  }
}

Raw HTTP — call the endpoint directly:

curl -X POST https://mcp.heptafox.com/mcp \
  -H "Authorization: Bearer mcp-sandbox-dev-C7H2-KPMERCHANT" \
  -H "Content-Type: application/json" \
  -H "Accept: application/json, text/event-stream" \
  -d '{"jsonrpc":"2.0","id":1,"method":"tools/call",
       "params":{"name":"identity","arguments":{}}}'

Endpoint is /mcp — no trailing slash. /mcp/ 307-redirects to /mcp, and some clients drop the POST body across the redirect. Always use /mcp.

Run it locally

uv sync
uv run server.py        # guide at http://127.0.0.1:8000/ , MCP at /mcp

Inspect it with the MCP Inspector — point it at http://127.0.0.1:8000/mcp:

npx @modelcontextprotocol/inspector

Examples

Ask any connected model to call a tool, then assert on the token it relays:

Prompt: Call the mcp-sandbox identity tool and show me what it returned.

Expected: MCP-SANDBOX canary 7Q9X-ZK42-VORTEX-PARSNIP

If the token appears, the call reached this server. If the model answers without it, the tool was never invoked.

QA & GenAI Evaluations

In evals, assert on the raw tool result (result.content[0].text), not on the model's natural-language summary — the token is stable, the wording isn't.

import asyncio
from fastmcp import Client

async def main():
    async with Client("https://mcp.heptafox.com/mcp") as c:
        result = await c.call_tool("identity", {})
        assert "7Q9X-ZK42-VORTEX-PARSNIP" in result.content[0].text

asyncio.run(main())

Roadmap

  • More beginner-friendly tools (error simulation, streaming, structured output)
  • OAuth and additional authentication examples
  • Client integration examples (Cursor, Google ADK, LangChain, CrewAI, OpenAI Agents SDK)
  • Ready-made evaluation scenarios and tutorials

Have an idea? Open an issue or discussion.

Contributing

Contributions are welcome — especially beginner-friendly tools, client examples, and docs. New tools are just @mcp.tool functions in server.py, each returning a unique canary string. See CONTRIBUTING.md to get started.

Deploy your own

The hosted instance runs on AWS Lightsail (Ubuntu) behind nginx + Let's Encrypt. To self-host: uv sync, run via deploy/mcp-sandbox.service (systemd), front with deploy/nginx.conf + certbot --nginx -d <domain>, and open ports 80/443 only — the app binds to localhost and nginx proxies /mcp in. Step-by-step below.

<details> <summary>Full deploy steps (AWS Lightsail, Ubuntu)</summary>

  1. Instance + DNS — create an Ubuntu Lightsail instance, point your domain's A record at its static IP, and open ports 80 + 443 in the Lightsail firewall. Leave 8000 closed; the app listens on localhost only.
  2. App
    curl -LsSf https://astral.sh/uv/install.sh | sh
    git clone <repo> ~/mcp-sandbox && cd ~/mcp-sandbox && uv sync
    
  3. systemd — copy deploy/mcp-sandbox.service to /etc/systemd/system/, then:
    sudo systemctl daemon-reload
    sudo systemctl enable --now mcp-sandbox
    
  4. nginx + TLS
    sudo apt install -y nginx certbot python3-certbot-nginx
    # deploy/nginx.conf is set for mcp.heptafox.com; copy to /etc/nginx/sites-available/,
    # symlink into sites-enabled/, then:
    sudo certbot --nginx -d mcp.heptafox.com
    sudo systemctl reload nginx
    

Verify: systemctl status mcp-sandbox and curl -i https://<domain>/mcp.

</details>

License

Apache License 2.0. By contributing you agree your contributions are licensed under Apache-2.0.

推荐服务器

Baidu Map

Baidu Map

百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。

官方
精选
JavaScript
Playwright MCP Server

Playwright MCP Server

一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。

官方
精选
TypeScript
Magic Component Platform (MCP)

Magic Component Platform (MCP)

一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。

官方
精选
本地
TypeScript
Audiense Insights MCP Server

Audiense Insights MCP Server

通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。

官方
精选
本地
TypeScript
VeyraX

VeyraX

一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。

官方
精选
本地
graphlit-mcp-server

graphlit-mcp-server

模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。

官方
精选
TypeScript
Kagi MCP Server

Kagi MCP Server

一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。

官方
精选
Python
e2b-mcp-server

e2b-mcp-server

使用 MCP 通过 e2b 运行代码。

官方
精选
Neon MCP Server

Neon MCP Server

用于与 Neon 管理 API 和数据库交互的 MCP 服务器

官方
精选
Exa MCP Server

Exa MCP Server

模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。

官方
精选