Skip to main content

MCP server for persistent codebase memory and cross-repository understanding

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.1.0.tar.gz (72.2 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.1.0-py3-none-any.whl (27.4 kB view details)

Uploaded Python 3

File details

Details for the file mcp_server_thoth-0.1.0.tar.gz.

File metadata

  • Download URL: mcp_server_thoth-0.1.0.tar.gz
  • Upload date:
  • Size: 72.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.6.9

File hashes

Hashes for mcp_server_thoth-0.1.0.tar.gz
Algorithm Hash digest
SHA256 1af802403341f5df3bbb8372301b150c220407e20b3c8e3a8a4a28c22689f030
MD5 97e32d90fb7d16bf43bd18cae4a2672b
BLAKE2b-256 b96c0716d7dd2bc463dd7aeea868ecab7ce4ff474b14c446c3ae893bbecdc49e

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for mcp_server_thoth-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 f235b6c7cc0f18a9d0eb88ff8ee4504babd1d664ae71d03e3dc3a298833e5d73
MD5 1e5d1a09c64fd7164ac67813d1d84dd4
BLAKE2b-256 917e0a2d21f65948528d51e8cd170f01e0dc891b4d7f4f460f1318ad27310fd8

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