MCP server for persistent codebase memory with semantic search
Project description
Thoth
MCP server providing persistent codebase memory for AI assistants.
Overview
Thoth indexes code repositories using AST parsing and provides tools for symbol lookup, cross-repository navigation, and architecture visualization. The index persists in ~/.thoth/, giving Claude and other MCP-compatible assistants memory across conversations.
Installation
Claude Desktop
Add to your configuration file:
- macOS:
~/Library/Application Support/Claude/claude_desktop_config.json - Windows:
%APPDATA%\Claude\claude_desktop_config.json - Linux:
~/.config/claude/claude_desktop_config.json
Single repository:
{
"mcpServers": {
"thoth": {
"command": "uvx",
"args": ["mcp-server-thoth", "--init", "/path/to/thoth"]
}
}
}
Multiple repositories:
{
"mcpServers": {
"thoth": {
"command": "uvx",
"args": ["mcp-server-thoth", "--init", "/path/to/repo1", "/path/to/repo2"]
}
}
}
The --init flag indexes repositories on first run. Subsequent runs use the cached index.
Tools
find_definition- Locate symbol definitionsget_file_structure- Extract functions, classes, imports from a filesearch_symbols- Search symbols by name patternget_callers- Find callers of a functiongenerate_module_diagram- Generate Mermaid dependency diagramsgenerate_system_architecture- Visualize cross-repository relationshipstrace_api_flow- Trace client-server communication pathslist_repositories- List indexed repositories
Architecture
Thoth uses Python's ast module for parsing (with planned tree-sitter migration for multi-language support). The index is stored in SQLite at ~/.thoth/index.db with the following schema:
symbols- Functions, classes, methods with location and parent relationshipsimports- Import statements with cross-repository resolutioncalls- Function call graph (caller → callee mapping)files- File metadata and content hashes for incremental updates
Implementation Notes
The indexer ignores common build artifacts and virtual environments. Cross-repository imports are resolved by checking if the target repository is indexed. Call graph analysis currently tracks direct calls within the same repository.
For large monorepos, pre-index before adding to Claude:
uvx mcp-server-thoth --init /path/to/large-repo
Development
git clone <repository>
cd thoth
uv pip install -e ".[dev]"
License
MIT
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file mcp_server_thoth-0.2.0.tar.gz.
File metadata
- Download URL: mcp_server_thoth-0.2.0.tar.gz
- Upload date:
- Size: 320.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.6.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
4413fbc6b2d3839415ab39ce880d2f40c2d0d8849ea256bc25695f3c94a37333
|
|
| MD5 |
e1fac19067a7f864ffa036caeab75fc4
|
|
| BLAKE2b-256 |
a2441db57db883f4d91f287d5a1e4b7623bc420da419957b98c39b8188a52201
|
File details
Details for the file mcp_server_thoth-0.2.0-py3-none-any.whl.
File metadata
- Download URL: mcp_server_thoth-0.2.0-py3-none-any.whl
- Upload date:
- Size: 35.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.6.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
e27cc9f043d908aebd3017ca5d128280704e3c30ddde4d0ed86d88f7c01e9c28
|
|
| MD5 |
0c2ef2e03e03cf27fe0f7d0c146406be
|
|
| BLAKE2b-256 |
fddee927153fa0bcdbddf4c79a78fcce2993f6b6b37242277988686c6ae734f9
|