Merged
Conversation
Jonasb8
pushed a commit
that referenced
this pull request
Apr 17, 2026
Jonasb8
added a commit
that referenced
this pull request
Apr 17, 2026
memex: capture decision from PR #14
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.
feat: MCP server for AI agent integration
What
Adds an MCP server (
memex serve) that exposes the local knowledge index as three callable tools for AI coding agents (Claude Code, Cursor, Copilot, Windsurf).Why
The CLI already works for humans. MCP makes memex work for agents β tools are auto-discovered and called without any prompting. Agents that can't run arbitrary bash (Cursor, Copilot) are supported. Being listed in MCP registries early matters more than being listed complete.
Tools exposed
memex_query(question, top, min_score)min_scoreis 0.5 (vs 0.7 in the CLI) β agents see borderline matches with confidence score surfaced so they can hedgememex_get_decision(id)memex_list_recent(domain, limit)"auth","database", β¦)Technical approach
mcp.server.fastmcp.FastMCPfrom the officialmcpSDK β no third-party dependencycli.py(load_index,embed,cosine_similarity) with zero duplicationmemex serveCLI command or directly aspython -m memex.mcp_serverChanges
memex/mcp_server.pyβ new, 160 linesmemex/cli.pyβmemex servecommand addedpyproject.tomlβmcp>=1.0.0dependency added.gitignoreβ.mcp.jsonadded (machine-specific, not committed)README.mdβ MCP server section with setup instructionsCLAUDE.mdβ doc sync (file structure, tech stack, CLI reference, doc sync rules)tests/test_mcp_server.pyβ 15 tests, all passing; all 239 suite tests greenSetup (for reviewers)
Create
.mcp.jsonin the repo root (git-ignored):```json
{
"mcpServers": {
"memex": {
"command": "/path/to/python3.12+",
"args": ["-m", "memex.mcp_server"],
"cwd": "/path/to/repo"
}
}
}
```
Run
memex indexfirst, then reload your editor.