Per-project MCP config: REST endpoint + copyable web dialog#10
Merged
Conversation
GET /api/projects/:p/mcp-config?username=<owner/agent> returns the full wiring for an agent scoped to that project: the binary install one-liner, the mdio mcp install command, and the ready-to-paste .mcp.json entry — all rendered with the caller-visible origin (reverse-proxy aware, same as /install.sh). Username is validated with the identity convention; unknown projects 404. Web UI: a 🤖 button in the project bar opens the config with per-block copy buttons, suggesting <me>/claude as the agent identity. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Gnrgu8jdLx12jkWY1B8vb3
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Adds a way to get the MCP config for a given project.
GET /api/projects/:p/mcp-config?username=<owner/agent>→{project, server, username, install, configure, mcpServers}— the install one-liner, themdio mcp install --project …command, and the ready-to-paste.mcp.jsonentry. Server URL is the caller-visible origin via the samepublicOriginhelper as/install.sh, so it works behind the reverse proxy. Username validated byparseUsername(400), unknown project 404, non-GET 405; defaults to theyou/agentplaceholder.<me>/claudeas the agent identity.Tests: API shape + reverse-proxy origin + 404/400/405 in
crud.test.ts; Playwright flow (open dialog, assert all three blocks + suggested identity, close) in e2e. Full suite: 156 pass.🤖 Generated with Claude Code
https://claude.ai/code/session_01Gnrgu8jdLx12jkWY1B8vb3