MCP Server
Model Context Protocol server for Claude Desktop, OpenClaw, Cursor, and other MCP-compatible clients.
Use this when you want to integrate CME from Claude Desktop or other MCP-compatible tools.
Endpoints
Service surface
/tools/cme_status
Check service health and configured tenant.
Health check
Verify MCP server and memory-api are running.
{ "type": "invoke", "name": "cme_status" }/tools/cme_create
Create a new memory. Returns queued response - memory may not be immediately searchable.
Create memory
Submit a new memory to the queue.
{ "type": "invoke", "name": "cme_create", "arguments": { "title": "Meeting notes", "content": "Discussed project timeline...", "tags": ["meeting", "planning"] } }/tools/cme_get
Get a memory by ID.
Fetch memory
Lookup memory by ID.
{ "type": "invoke", "name": "cme_get", "arguments": { "memory_id": "uuid-string" } }/tools/cme_search
Search memories by semantic similarity. Supports mode (hybrid|vector|bm25), graph context, hops, and explain.
Search memories
Semantic search with optional graph context.
{ "type": "invoke", "name": "cme_search", "arguments": { "query": "project planning", "limit": 10, "mode": "hybrid", "graph": true, "hops": 2, "explain": true } }/tools/cme_list
List memories with pagination support.
List memories
Paginated memory list.
{ "type": "invoke", "name": "cme_list", "arguments": { "limit": 50, "offset": 0 } }/tools/cme_update
Update an existing memory. Queued write - poll with cme_get for updated state.
Update memory
Modify an existing memory.
{ "type": "invoke", "name": "cme_update", "arguments": { "memory_id": "uuid-string", "title": "Updated title", "content": "Updated content..." } }/tools/cme_delete
Delete a memory by ID.
Delete memory
Remove a memory permanently.
{ "type": "invoke", "name": "cme_delete", "arguments": { "memory_id": "uuid-string" } }Request example
cme_search with graph context
Search with hybrid mode and knowledge graph traversal.
{
"type": "invoke",
"name": "cme_search",
"arguments": {
"query": "project planning",
"limit": 10,
"mode": "hybrid",
"graph": true,
"hops": 2,
"explain": true
}
}Base path
/tools
Schemas
OpenAPI-style field tables
cme_search parameters
All parameters for semantic search tool.
| Field | Type | Required | Description |
|---|---|---|---|
| query | string | required | Search query text. |
| limit | number | optional | Number of results (default 10). |
| mode | "hybrid" | "vector" | "bm25" | optional | Search mode: hybrid (default) combines vector + BM25, vector uses embedding similarity only, bm25 uses keyword search only. |
| graph | boolean | optional | Enable knowledge graph context retrieval (default false). |
| hops | number | optional | Graph traversal depth when graph=true (default 1). |
| explain | boolean | optional | Include retrieval explainability data in response (default false). |
MCP environment variables
Configuration for MCP server startup.
| Field | Type | Required | Description |
|---|---|---|---|
| CME_API_URL | string | required | memory-api base URL (default http://localhost:8082). |
| CME_API_KEY | string | required | API key for authentication. |
| CME_TENANT_ID | string | required | Tenant UUID. |
| MCP_TRANSPORT | string | optional | Transport type: stdio (default) or http. |
Response examples
What the API returns
Search with explain
Search response includes retrieval breakdown when explain=true.
{
"results": [...],
"explanation": {
"mode": "hybrid",
"vector_score": 0.964,
"bm25_score": 0.85,
"combined_score": 0.982
}
}Queued write response
Create and update operations return queued status.
{
"status": "queued",
"memory_id": "uuid-string"
}Notes
Implementation notes
- The MCP server uses stdio transport and communicates with memory-api over HTTP.
- Write operations (cme_create, cme_update) return queued responses. Wait 1-2 seconds or poll with cme_get.
- The server uses fixed-tenant authentication - credentials are configured at startup via environment variables.
- Build with: go build -o bin/cme-mcp ./cmd/cme-mcp