Skip to main content

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 definitions
  • get_file_structure - Extract functions, classes, imports from a file
  • search_symbols - Search symbols by name pattern
  • get_callers - Find callers of a function
  • generate_module_diagram - Generate Mermaid dependency diagrams
  • generate_system_architecture - Visualize cross-repository relationships
  • trace_api_flow - Trace client-server communication paths
  • list_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 relationships
  • imports - Import statements with cross-repository resolution
  • calls - 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

mcp_server_thoth-0.2.0.tar.gz (320.6 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

mcp_server_thoth-0.2.0-py3-none-any.whl (35.4 kB view details)

Uploaded Python 3

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

Hashes for mcp_server_thoth-0.2.0.tar.gz
Algorithm Hash digest
SHA256 4413fbc6b2d3839415ab39ce880d2f40c2d0d8849ea256bc25695f3c94a37333
MD5 e1fac19067a7f864ffa036caeab75fc4
BLAKE2b-256 a2441db57db883f4d91f287d5a1e4b7623bc420da419957b98c39b8188a52201

See more details on using hashes here.

File details

Details for the file mcp_server_thoth-0.2.0-py3-none-any.whl.

File metadata

File hashes

Hashes for mcp_server_thoth-0.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 e27cc9f043d908aebd3017ca5d128280704e3c30ddde4d0ed86d88f7c01e9c28
MD5 0c2ef2e03e03cf27fe0f7d0c146406be
BLAKE2b-256 fddee927153fa0bcdbddf4c79a78fcce2993f6b6b37242277988686c6ae734f9

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page