feat(mcp): F-14 MCP-server — read-only KB tools for LLM clients #4
66
README.md
66
README.md
@@ -104,6 +104,72 @@ codex ask "<question>" # optional LLM Q&A via Ollama
|
|||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
|
## MCP Server (F-14)
|
||||||
|
|
||||||
|
codex exposes its KB as read-only MCP tools for LLM clients (Claude Code, Claude Desktop, etc.).
|
||||||
|
|
||||||
|
### Start (stdio)
|
||||||
|
|
||||||
|
```bash
|
||||||
|
# directly
|
||||||
|
python -m codex.mcp_server
|
||||||
|
|
||||||
|
# or via the installed script
|
||||||
|
codex-mcp
|
||||||
|
```
|
||||||
|
|
||||||
|
### Client registration
|
||||||
|
|
||||||
|
**Claude Code** — add to `.mcp.json` in your project root:
|
||||||
|
|
||||||
|
```json
|
||||||
|
{
|
||||||
|
"mcpServers": {
|
||||||
|
"codex": {
|
||||||
|
"command": "uv",
|
||||||
|
"args": ["run", "codex-mcp"],
|
||||||
|
"cwd": "/path/to/codex-py"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
**Claude Desktop** — add to `~/Library/Application Support/Claude/claude_desktop_config.json`:
|
||||||
|
|
||||||
|
```json
|
||||||
|
{
|
||||||
|
"mcpServers": {
|
||||||
|
"codex": {
|
||||||
|
"command": "uv",
|
||||||
|
"args": ["--directory", "/path/to/codex-py", "run", "codex-mcp"]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
### HTTP transport (optional, config-gated)
|
||||||
|
|
||||||
|
```bash
|
||||||
|
MCP_TRANSPORT=http MCP_AUTH_TOKEN=<secret> codex-mcp
|
||||||
|
```
|
||||||
|
|
||||||
|
HTTP transport requires `MCP_AUTH_TOKEN` — the server refuses to start without it.
|
||||||
|
Requests must carry `Authorization: Bearer <token>`.
|
||||||
|
|
||||||
|
### Available tools (read-only)
|
||||||
|
|
||||||
|
| Tool | Description |
|
||||||
|
|---|---|
|
||||||
|
| `search` | Chunk-level hybrid search (dense BGE-M3) |
|
||||||
|
| `ask` | RAG answer (returns "not available" until implemented) |
|
||||||
|
| `wiki_read` | Compiled concept page (F-12) |
|
||||||
|
| `wiki_list` | All concept pages + freshness |
|
||||||
|
| `discover_leads` | Dangling-citation leads |
|
||||||
|
| `provenance_verify` | Scan C++ sources for @cite tags |
|
||||||
|
| `synthesis_browse` | Leads/conjectures from leads/ (F-13) |
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
## Development
|
## Development
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
|
|||||||
Reference in New Issue
Block a user