BLIT386BLIT386

MCP Server

Connect AI coding assistants to the BLIT386 documentation via the Model Context Protocol.

The BLIT386 docs site exposes a Model Context Protocol server at /mcp. AI coding assistants that support MCP can use it to search the documentation and retrieve summaries without leaving their chat interface.

Endpoint

https://blit386.dev/mcp

Transport: streamable-HTTP (JSON-RPC 2.0 over POST). No authentication required.

Tools

ToolDescription
search_docsKeyword search across the documentation. Returns matching page titles, absolute URLs, and excerpts. Works best with short keywords such as keyboard input, not a full sentence.
get_doc_pageReturns the full markdown of one page. Takes a URL from search_docs or get_docs_summary, or a site path such as /docs/guides/input.
get_docs_summaryReturns the llms.txt summary of the site - a compact index suitable for LLM context windows, with absolute links.

Building a game with no project yet? Start at Build a Game: a starter project, the kit's agent instructions, guides, and skills, and complete example programs - every page readable through get_doc_page.

Setup

Claude Code

For your own account, add the server with the CLI:

claude mcp add --transport http blit386-docs https://blit386.dev/mcp

Or check a project-scoped config into your repository root as .mcp.json, so every contributor's agent picks it up - type is required for a remote server, since Claude Code skips an entry that has a url but no type:

{
  "mcpServers": {
    "blit386-docs": {
      "type": "http",
      "url": "https://blit386.dev/mcp"
    }
  }
}

Claude Code prompts once per project to approve a project-scoped server - expect that prompt the first time you open the project after .mcp.json lands. A game scaffolded with npm create blit386@latest already ships this .mcp.json, so its contributors get the prompt with no setup of their own.

Claude Desktop

claude_desktop_config.json only configures local (stdio) servers. To connect a remote server like this one, add it as a Custom Connector instead: open Settings, go to Connectors, choose "Add custom connector", and paste the endpoint URL above.

Cursor

Add to .cursor/mcp.json in your project:

{
  "mcpServers": {
    "blit386-docs": {
      "url": "https://blit386.dev/mcp"
    }
  }
}

Antigravity

Add to .agents/mcp_config.json in your project. Antigravity reads only serverUrl for a remote server - url and httpUrl are rejected:

{
  "mcpServers": {
    "blit386-docs": {
      "serverUrl": "https://blit386.dev/mcp"
    }
  }
}

Codex

Add to .codex/config.toml in your project (Codex reads it only once you trust the project), or to ~/.codex/config.toml for every project:

[mcp_servers.blit386-docs]
url = "https://blit386.dev/mcp"

GitHub Copilot

The Copilot CLI and VS Code read the same project .mcp.json as Claude Code, so the entry above covers both. The cloud agent reads no project file - add the server in the repository's Copilot settings on github.com instead.

Gemini CLI

Add to .gemini/settings.json in your project (Gemini CLI reads it only once you trust the folder). Use httpUrl: for Gemini CLI, url means an SSE server, and this one is streamable HTTP:

{
  "mcpServers": {
    "blit386-docs": {
      "httpUrl": "https://blit386.dev/mcp"
    }
  }
}

OpenCode

Add to opencode.json in your project. OpenCode calls the key mcp, not mcpServers, and marks a remote server with type:

{
  "mcp": {
    "blit386-docs": {
      "type": "remote",
      "url": "https://blit386.dev/mcp",
      "enabled": true
    }
  }
}

Zed

Add to .zed/settings.json in your project (Zed ignores project settings until you trust the project), or to your own Zed settings for every project:

{
  "context_servers": {
    "blit386-docs": {
      "url": "https://blit386.dev/mcp"
    }
  }
}

Testing with curl

# List available tools
curl -s https://blit386.dev/mcp \
  -H 'Content-Type: application/json' \
  -d '{"jsonrpc":"2.0","id":1,"method":"tools/list"}'

# Search the docs
curl -s https://blit386.dev/mcp \
  -H 'Content-Type: application/json' \
  -d '{"jsonrpc":"2.0","id":2,"method":"tools/call","params":{"name":"search_docs","arguments":{"query":"palette animation"}}}'

# Read one page in full
curl -s https://blit386.dev/mcp \
  -H 'Content-Type: application/json' \
  -d '{"jsonrpc":"2.0","id":3,"method":"tools/call","params":{"name":"get_doc_page","arguments":{"url":"/docs/guides/input"}}}'

# Fetch the llms.txt summary
curl -s https://blit386.dev/mcp \
  -H 'Content-Type: application/json' \
  -d '{"jsonrpc":"2.0","id":4,"method":"tools/call","params":{"name":"get_docs_summary"}}'

Discovery

The server publishes a discovery card at /.well-known/mcp/server-card.json for clients that support automatic MCP server discovery.

On this page