MCP Server
Model Context Protocol server for explicit tool calls.
Starting the MCP Server
mem-oracle mcpThe server uses stdio for communication, making it compatible with Claude Code and other MCP-enabled tools.
If you're running from source, use bun run src/index.ts mcp.
Configuration
Add to your Claude Code MCP configuration (.mcp.json or settings):
{
"mcpServers": {
"mem-oracle": {
"command": "mem-oracle",
"args": ["mcp"]
}
}
}Available Tools
search_docs
Search through indexed documentation.
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
query | string | Yes | The search query |
top_k | number | No | Number of results (default: 5) |
docset_ids | string[] | No | Docset IDs to filter by |
Example Usage
Use the search_docs tool to find information about server componentsResponse
Returns an array of documentation snippets with:
content: The relevant documentation texturl: Source URLtitle: Page titlescore: Similarity score
get_snippets
Get specific documentation chunks by ID.
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
chunk_ids | string[] | Yes | Array of chunk IDs to retrieve |
Example Usage
Use get_snippets to retrieve chunks ["chunk_123", "chunk_456"]index_docs
Index a documentation website.
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
base_url | string | Yes | Base URL to index |
seed_slug | string | Yes | Starting path to crawl |
name | string | No | Custom name for the docset |
wait_for_seed | boolean | No | Wait for seed page (default: true) |
Example Usage
Use index_docs to index https://nextjs.org/docs/getting-startedResponse
Returns indexing status with:
docsetId: The created docset IDstatus: Current indexing statusmessage: Status message
index_status
Get the status of all indexed documentation.
Parameters
None required.
Example Usage
Use index_status to check what documentation is indexedResponse
Returns status of all docsets with page counts and last update times.
Integration Examples
With Claude Code
Once configured, Claude will automatically have access to the tools:
Claude: I'll search the indexed documentation for information about routing.
[Uses search_docs tool with query "routing"]
Based on the documentation, here's how routing works...Automatic URL Detection
When you mention documentation URLs in your prompts, the MCP server can automatically index them:
How do I use the App Router? See https://nextjs.org/docs/app
[Claude detects URL and uses index_docs tool]
[Then uses search_docs to find relevant information]MCP vs Worker API
| Feature | MCP Server | Worker API |
|---|---|---|
| Communication | stdio | HTTP |
| Use case | Claude Code integration | Programmatic access |
| Startup | On-demand | Background service |
| Tools | search_docs, index_docs, etc. | REST endpoints |
Use the MCP server when you want Claude to have direct tool access. Use the Worker API for programmatic access or when running as a background service.