Skip to content

Latest commit

 

History

History
32 lines (22 loc) · 1.17 KB

File metadata and controls

32 lines (22 loc) · 1.17 KB

Examples

Runnable examples live in the examples/ directory. Each script is self-contained:

python examples/<example>.py

Available Examples

Launches a devbox with GitHub's MCP server attached via MCP Hub, installs Claude Code, and asks Claude to describe your latest PR — all without the devbox seeing your real GitHub credentials.

What it does:

  1. Creates an MCP config pointing at https://api.githubcopilot.com/mcp/
  2. Stores a GitHub PAT as a Runloop secret (credential isolation)
  3. Launches a devbox with MCP Hub enabled — the devbox receives $RL_MCP_URL and $RL_MCP_TOKEN
  4. Installs Claude Code (@anthropic-ai/claude-code)
  5. Registers the MCP Hub endpoint with Claude Code via claude mcp add
  6. Runs claude --print to ask Claude to describe your latest PR using the GitHub MCP tools
  7. Cleans up all resources
GITHUB_TOKEN=ghp_xxx ANTHROPIC_API_KEY=sk-ant-xxx \
    python examples/mcp_github_claude_code.py

See also: MCP Hub documentation · Runloop docs