Documentation Index
Fetch the complete documentation index at: https://mintlify.com/S1LV4/th0th/llms.txt
Use this file to discover all available pages before exploring further.
Overview
The Model Context Protocol (MCP) enables AI assistants to access external tools. th0th provides an MCP server that exposes semantic search, memory, and compression capabilities to any MCP-compatible client.Supported Clients
th0th MCP server works with:OpenCode
Recommended AI coding assistant with native MCP support
Claude Desktop
Anthropic’s desktop app with MCP integration
VSCode
Via Copilot or Antigravity extensions
Custom Clients
Any MCP-compatible client via stdio
Prerequisites
Configuration by Client
OpenCode
- Via Package
- Via Plugin
- From Source
Edit
~/.config/opencode/opencode.json:opencode.json
Claude Desktop
- macOS
- Windows
- Linux
Edit
~/Library/Application Support/Claude/claude_desktop_config.json:claude_desktop_config.json
VSCode
Create.vscode/mcp.json in your workspace:
.vscode/mcp.json
Docker
Use the MCP service from docker-compose:Run from the th0th directory, or use
-f /path/to/docker-compose.yml to specify the file location.MCP Client CLI
The MCP client includes a configuration CLI for managing settings.Quick Config Commands
Initialize with Specific Provider
Set Specific Values
Configuration File
The MCP client stores configuration in~/.config/th0th/config.json:
~/.config/th0th/config.json
The config file is auto-created on first run with sensible defaults.
Environment Variables
Override config values with environment variables:| Variable | Description | Default |
|---|---|---|
TH0TH_API_URL | th0th API endpoint | http://localhost:3333 |
OLLAMA_BASE_URL | Ollama server URL | http://localhost:11434 |
OLLAMA_EMBEDDING_MODEL | Embedding model | nomic-embed-text:latest |
OLLAMA_EMBEDDING_DIMENSIONS | Embedding dimensions | 768 |
MISTRAL_API_KEY | Mistral API key | - |
OPENAI_API_KEY | OpenAI API key | - |
Testing the Connection
Manual Test
Test the MCP server directly:Via Client
In your AI assistant, try:th0th_indexth0th_searchth0th_rememberth0th_recallth0th_compressth0th_optimized_contextth0th_analytics
Available MCP Tools
th0th_index
th0th_index
Index a project directory for semantic search.Parameters:
projectPath(string) - Absolute path to projectprojectId(string, optional) - Unique identifier
th0th_search
th0th_search
Semantic + keyword search with filters.Parameters:
query(string) - Search queryprojectId(string) - Target projectfilters(object, optional) - File patterns, etc.limit(number, optional) - Max results (default: 10)
th0th_remember
th0th_remember
Store important information in persistent memory.Parameters:
content(string) - Information to remembertype(string, optional) - decision, fact, note, etc.tags(array, optional) - Searchable tags
th0th_recall
th0th_recall
Search stored memories from previous sessions.Parameters:
query(string) - What to recalllimit(number, optional) - Max resultsfilters(object, optional) - Type, date range, etc.
th0th_compress
th0th_compress
Compress context while preserving structure.Parameters:
content(string) - Content to compressstrategy(string, optional) - code_structure, summarizetargetReduction(number, optional) - Desired % reduction
th0th_optimized_context
th0th_optimized_context
Search + compress in one call for max efficiency.Parameters:
query(string) - Search queryprojectId(string) - Target projectmaxTokens(number, optional) - Token budget
th0th_analytics
th0th_analytics
View usage patterns and performance metrics.Parameters:
timeRange(string, optional) - day, week, monthmetrics(array, optional) - Specific metrics to return
Advanced Configuration
Multiple th0th Instances
Connect to multiple th0th servers:Custom Timeout
Increase timeout for large projects:Debug Mode
Enable verbose logging:Troubleshooting
Server not starting
Server not starting
Check the API is running:If not:
Tools not appearing
Tools not appearing
Test the MCP client directly:Common issues:
- Wrong
TH0TH_API_URLin config - API not running or not healthy
- Client not restarted after config change
Permission denied
Permission denied
Ensure the MCP client is executable:
Connection timeout
Connection timeout
The API may be slow to start or under heavy load:
- Check API logs for errors
- Increase timeout in config
- Verify network connectivity
- Check if Ollama is running (for embeddings)
Invalid JSON-RPC
Invalid JSON-RPC
Ensure you’re using the correct MCP protocol version:
Next Steps
MCP Tools Reference
Detailed documentation for all MCP tools
Configuration
Configure embedding providers and models
OpenCode Integration
Optimize for OpenCode usage
VSCode Integration
Setup with VSCode Copilot