feat: add packages/mex-mcp — MCP server for mex-agent#84
Draft
rudi193-cmd wants to merge 1 commit into
Draft
Conversation
Adds packages/mex-mcp with five MCP tools over stdio transport: - mex_check — runs runDriftCheck, returns DriftReport - mex_log — read/write via readEvents/appendEvent - mex_timeline — readEvents with kind + since filters - mex_heartbeat — checkHeartbeat, returns HeartbeatResult - mex_read_file — reads scaffold files relative to .mex/ All tools call the public mex-agent API directly (Option B, per mex-memory#81). mex_sync deferred until structured return shape is settled. Closes mex-memory#81
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.
Follows up on #81 and your design guidance.
What this adds
packages/mex-mcp— a TypeScript MCP server over stdio that lets AI agents call mex as native tools.Five tools (v1 scope):
mex_checkrunDriftCheckDriftReport(score, issues, filesChecked)mex_logreadEvents/appendEvent{ ok }mex_timelinereadEvents+ client filtermex_heartbeatcheckHeartbeatHeartbeatResult(ok, staleFiles, memoryCleanupDue)mex_read_filemex_syncis deferred — leaving it for when the structured return shape is clear.Design choices (per your comment)
mex-agentpublic API — no subprocess wrappingmex_read_file)projectRootparam on every tool (defaults tocwd) so agents can target any projectWhat needs discussion / maintainer input
package.jsondoesn't haveworkspacesyet. Should I add"workspaces": ["packages/*"]here, or do you prefer a different approach?readEventsopts — I'm passing{ limit }toreadEventsbased on the exportedLogOptstype; if the signature is different let me know and I'll adjust.appendEventshape — calling asappendEvent(config, { kind, summary }); please correct if the actual signature differs.package.jsonusesworkspace:*(pnpm-style); adjust if you prefer npm workspaces syntax.Happy to co-develop this with you — treat this as a starting scaffold to iterate on.