feat!: remove agentage mcp stdio command, MCP served by daemon#254
Merged
Conversation
Contributor
|
🎉 PR Validation ✅ PASSED Commit: Checks:
Ready to merge! ✨ 🔗 View workflow run |
vreshch
marked this pull request as ready for review
July 8, 2026 21:53
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.
Why
The standalone
agentage mcpstdio command spun up a second in-process engine in its own process, violating the daemon's single-writer invariant (the daemon at127.0.0.1:4243is the sole writer that serializes vault mutations to avoid concurrent gitindex.lockcollisions). It also duplicated a surface the daemon already serves: the identical frozen 6-tool MCP contract is exposed athttp://127.0.0.1:4243/mcpover Streamable HTTP. One surface, one writer.What changed
Removed
src/commands/mcp/(mcp.ts + mcp.test.ts) and its registration insrc/cli.tse2e/mcp-stdio.test.tsStdioServerTransportimport insrc/(lived in the deleted command)Kept
src/mcp/local-server.ts- the daemon's/mcphandler (loadLocalMemoryServer) is unchangede2e/mcp-contract.test.tsalready drives the daemon/mcpHTTP endpoint, not stdio - no rewire needed; the frozen 6-tool contract assertions are untouchede2e/mcp-daemon.test.tsstaysAdded - disable gate
agentage daemon start --no-mcpand env varAGENTAGE_DAEMON_NO_MCP=1:daemon-entry.tsreads the env var (mcpEnabled()) and skipsbuildMcpServer, so/mcp404s (that path already existed insrc/daemon/server.ts). The--no-mcpflag sets the env var on the spawned daemon process.ensureDaemonautostart keeps MCP on by default./api/healthnow reportsmcp: boolean;daemon statusanddaemon startoutput the MCP serving state.mcpEnabledgate, server-level/mcp404 + health flag when gated, and thedaemon start --no-mcp/ status wiring.Docs
claude mcp add --transport http agentage http://127.0.0.1:4243/mcpand the.mcp.json{"url": ...}form), notes the daemon must be running, documents--no-mcp/AGENTAGE_DAEMON_NO_MCP.docs/architecture.md+docs/architecture.svg: MCP is now a single daemon capability (HTTP/mcp), stdio entry removed, disable gate described. SVG re-rendered and inspected - single MCP arrow, no overlap.agentage mcpfrom the command/layout prose.Migration
Old stdio config:
{ "mcpServers": { "agentage-memory": { "command": "agentage", "args": ["mcp"] } } }New HTTP config (daemon autostarts on first memory verb, or
agentage daemon start):{ "mcpServers": { "agentage": { "url": "http://127.0.0.1:4243/mcp" } } }or
claude mcp add --transport http agentage http://127.0.0.1:4243/mcp.Verify
npm run verifygreen (409 unit tests pass, type-check + lint + format + build).node dist/cli.js --help-> nomcpcommand listed.daemon start->mcp on;POST /mcp initializereturns a valid MCP response (serverInfo.name: agentage-memory, 6-tool capabilities);daemon statusshowsmcp on.daemon start --no-mcp->mcp off;POST /mcpreturns HTTP 404{"error":"not found"};daemon statusshowsmcp off.daemon stopclean both times; temp dirs cleaned up.<img width=900>, screenshotted via Playwright chromium - single "MCP - HTTP /mcp -> 127.0.0.1:4243/mcp" arrow into the daemon, command box readsstatus daemon update, no overlap or mis-centering.