Discussion Capsule
Discussion Capsule is a read-only MCP App that turns a GitHub Discussion into a compact, interactive brief inside an MCP host.
It demonstrates the contextual-launch pattern proposed in modelcontextprotocol/ext-apps#736: ordinary tool arguments identify the discussion, the server returns grounded structured content, and the app renders the result without introducing a host-specific launch envelope.
What it does
- Loads a public GitHub Discussion, comments, and reply counts from GitHub's official REST API.
- Surfaces participants, answer state, source-linked open questions, and a filterable thread map.
- Lets a user ask the host model for reply help, then review and select a draft for copying.
- Never publishes, edits, reacts to, or otherwise mutates GitHub state.
Public discussions work without credentials. Set GITHUB_TOKEN only when you need a higher API rate limit or access to a private repository. Never commit the token.
Run it
Requires Node.js 22 or newer.
npm install
npm run build
npm start
The Streamable HTTP MCP endpoint is http://localhost:3001/mcp. It binds to 127.0.0.1 by default. Use PORT or HOST to change either value; set a comma-separated ALLOWED_HOSTS list when exposing a non-loopback host.
For a stdio client:
{
"mcpServers": {
"discussion-capsule": {
"command": "node",
"args": [
"/absolute/path/to/mcp-discussion-capsule/dist/main.js",
"--stdio"
]
}
}
}
Then ask the host:
Open https://github.com/modelcontextprotocol/ext-apps/discussions/606 as a discussion capsule.
Verify it
npm test
npm run build
npm run smoke:live
The live smoke test defaults to ext-apps Discussion #606. Pass another public Discussion URL as its first argument.
Trust model
Discussion bodies and comments are untrusted external input. The app renders them as text, not executable HTML. Extracted questions are deterministic source excerpts with links; they are not claimed to be model judgments. GitHub remains the canonical source.
AI disclosure
The initial prototype was developed with OpenAI Codex. The implementation was validated with local tests and a live GitHub Discussion; AI output is not treated as proof of GitHub state.