Epic: Misty MCP server for coding agents
Maintainers usually reply within 1 day
@michelle-yl is already working on this.
Since Nov 28, 2026.
Assessment
- Difficulty
- 5/5
- Estimated time
- Over a week
- Newbie friendliness
- 18/100
- Issue type
- Feature
- Clarity
- Mostly clear
- Activity status
- Active
- Domain
- authentication, backend, security
Research direction
This is an epic, not a single change: start with docs/MISTY-MCP.md (the approved design) before touching code. The build order is in the decomposition; the first unblocked pieces are the MCP foundation (mount /mcp in the gateway's FastAPI app behind an off switch, add DOC_BASE_URL/DOC_API_KEY to settings) and the session-store migration 003 next to 002_email_login. Done means those sub-issues exist and are individually specified; the SDK choice, issuer alignment and local-callback rules are open questions that must be settled first.
Written by the indexing model from the issue text.
Description
Summary
Members want to ask their coding agent (Claude Code, Codex) about Misty documents without leaving the editor or sharing keys. The design is in docs/MISTY-MCP.md. The pieces it reuses already exist: #331's email login, documentation-system's authorized search and read, and the gateway. What doesn't exist is the part that joins them: an MCP endpoint, OAuth sign-in for agents, a session store, and the tools themselves.
Model
MCP is a module inside the existing gateway, not a new service. The agent only talks to the gateway at /mcp; the gateway talks to private services with its own keys.
- Sign-in. The agent calls
/mcpwith no token and gets a401. It finds the gateway's OAuth endpoints through discovery and opens the login page in the browser. The member signs in with #331's email code. The gateway creates a session and issues an access token (about 1 hour) and a refresh token (about 30 days), exchanged with PKCE. - Tool calls. Each call maps the access token to a session, then to a
person_id, and checks that the person is still an active member. The gateway calls documentation-system as that person with an internaldoc_key (docs:read+act-as-useronly). - Refresh and revoke. Refresh tokens rotate, and reusing an old one ends the session. Deleting the session row revokes every token that belongs to it.
Governing constraint: identity comes from the session, never from the agent. No tool accepts a person or identity. Tokens are stored only as hashes. The doc_ key never leaves the gateway and never has docs:read:all. Login codes and grants never reach the agent.
Implementation tasks
- #437 — Mount MCP in the gateway
- #440 — Sign members in to MCP and manage sessions
- #442 — Serve member-authorized MCP tools
- #444 — Roll out MCP to members
Gateway setup and the storage and email-login parts of #440 can start together. Tool request binding consumes the session interface. Real-client acceptance and release sign-off belong to #444.
Area
service, integration, docs-system, deployment
What we can build on
docs/MISTY-MCP.md(#399): the approved design. It covers the flows, the credential table, tool schemas, error cases, limits and audit fields.- #331 (merged to
staging): email login, membership checks, one-time codes and per-app/IP/mailbox limits. Its migration002_email_logincomes right before the new003. - The gateway's existing FastAPI app, settings and startup checks, and the storage Protocol with in-memory and Postgres adapters.
- documentation-system's authorized retrieval (
POST /search,GET /docs/{id}). It already enforces person-scoped access. - The bot's
helperTools.js: prior art for bounded search and read outputs. - UTMIST/Mist#125: prior art for separating identity from sessions and handling environments on top of #331.
Not in this epic
- documentation-system gaps: an outage can return
404fromGET /docs/{id}; search results have no fetch date and documents have no content hash, so stale citations can't be detected; meeting notes may not be searchable. These belong in separate documentation-system issues. - New sources: Discord and repository ingestion stay in #332 and #333. MCP exposes those sources once they exist.
- Write tools, and team or project context tools: for a later version. The first version is read-only.
- A local stdio adapter, a separate MCP service, and VS Code support: rejected or deferred in the design.
- Changes to #331's login contract or to the
/v1routes: both stay as they are.
Open questions
- MCP SDK and version: which SDK and version fit the gateway's FastAPI app, and does its OAuth authorization-server support fit our login page? Decided in #437.
- Cursor: support it, and if so through the client allowlist or Dynamic Client Registration? Decided during #444.
- Shared-gateway risk: MCP shares one gateway replica, and a 120-requests-a-minute per-IP limit, with the Discord resolver and compute login. Measured in staging in #444 before production.
- Maintainer: who maintains the MCP module alongside the gateway owner?
- URLs and updates: what are the staging and production URLs members use, and how do members learn about updates?
- Dominant language
- Python
- Stars
- 0
- Forks
- 2
- Avg merge
- 3d 3h
- Merged PRs (30d)
- 31
Getting set up
- No Dockerfile or Docker Compose file
- Has a pull request template
- No contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from UTMIST/Misty
-
area/tooling automation/health
Difficulty 2/5 1-3 hours Newbie friendliness 65/100
Maintainers usually reply within 1 day
-
Epic: Protect live meeting Q&A and deliver recording outputs to the intended audiencePossibly taken @kr1shap claimed this 1 day ago. Openarea/bot area/docs-system area/integration area/service epic on hold
UTMIST/Misty#489 · 1 assignee ·
Maintainers usually reply within 1 day
-
area/bot on hold type/bug
Difficulty 4/5 3-5 days Newbie friendliness 48/100
Maintainers usually reply within 1 day
-
area/bot on hold type/bug
Difficulty 3/5 1-2 days Newbie friendliness 55/100
Maintainers usually reply within 1 day
-
Use a verified ingress boundary for gateway client IPsPossibly taken @qiuethan claimed this 2 days ago. Openarea/deployment area/observability area/service type/bug
Difficulty 4/5 3-5 days Newbie friendliness 48/100
Maintainers usually reply within 1 day
Similar issues
-
[Doc]: Feedback for `/zh-cn/v0.30.0/tutorials/models/Qwen3.6-35B-A3B.html`A3社区配置和基线不一致,社区配置也达不到基线Opendocumentation
Difficulty 2/5 1-3 hours Newbie friendliness 62/100
vllm-project/vllm-ascend#24429 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 74/100
simnJS/AnyPS5#735 · 1 comment ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 67/100
nq-rdl/agent-extensions#623 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 70/100
vortex-data/vortex#12633 ·
Maintainers usually reply within 1 day
-
needs-triage
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
gke-labs/kube-agents#7955 ·
Maintainers usually reply within 1 day