Skip to main content

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

th0th integrates with VSCode through the Model Context Protocol (MCP), providing semantic search, memory, and context compression to:
  • VSCode Copilot - GitHub’s AI pair programmer
  • Antigravity - Alternative AI coding assistant for VSCode

Quick Setup

The fastest way to configure th0th for VSCode is using the setup script:
cd th0th
./scripts/setup-vscode.sh
This script will:
  1. Check prerequisites (Bun, Ollama)
  2. Start the th0th API if not running
  3. Create .vscode/mcp.json in your workspace
  4. Test the MCP server connection
  5. Generate example configurations
The setup script creates both workspace-level (.vscode/mcp.json) and user-level (~/.config/th0th/mcp.json.example) configurations.

Manual Setup

If you prefer to configure manually, follow these steps:
1

Start th0th API

Ensure the th0th API server is running:
cd th0th
bun run start:api
Verify: curl http://localhost:3333/health
2

Create MCP configuration

Create .vscode/mcp.json in your workspace root:
.vscode/mcp.json
{
  "servers": {
    "th0th": {
      "command": "bunx",
      "args": ["@th0th-ai/mcp-client"],
      "env": {
        "TH0TH_API_URL": "http://localhost:3333"
      }
    }
  }
}
3

Reload VSCode

Restart VSCode to load the MCP configuration:
  • Press Cmd+Shift+P (Mac) or Ctrl+Shift+P (Windows/Linux)
  • Select “Developer: Reload Window”

Configuration Options

Using npx Instead of bunx

If you don’t have Bun installed, use npx:
.vscode/mcp.json
{
  "servers": {
    "th0th": {
      "command": "npx",
      "args": ["@th0th-ai/mcp-client"],
      "env": {
        "TH0TH_API_URL": "http://localhost:3333"
      }
    }
  }
}

Custom API URL

If your th0th API runs on a different host or port:
.vscode/mcp.json
{
  "servers": {
    "th0th": {
      "command": "bunx",
      "args": ["@th0th-ai/mcp-client"],
      "env": {
        "TH0TH_API_URL": "http://192.168.1.100:3333"
      }
    }
  }
}

Development Mode

To run th0th from source for development:
.vscode/mcp.json
{
  "servers": {
    "th0th": {
      "command": "bun",
      "args": ["run", "/absolute/path/to/th0th/apps/mcp-client/src/index.ts"]
    }
  }
}
Always use absolute paths when running from source. Relative paths may not resolve correctly.

Workspace vs User Configuration

Configure th0th for a specific project:Location: .vscode/mcp.json in your project rootUse when:
  • The project has specific th0th requirements
  • You want to commit the configuration to version control
  • Different projects use different th0th instances
.vscode/mcp.json
{
  "servers": {
    "th0th": {
      "command": "bunx",
      "args": ["@th0th-ai/mcp-client"],
      "env": {
        "TH0TH_API_URL": "http://localhost:3333"
      }
    }
  }
}

Using with VSCode Copilot

Once configured, th0th tools are available in GitHub Copilot Chat:
1

Open Copilot Chat

Click the Copilot icon in the activity bar or press:
  • Cmd+Shift+I (Mac)
  • Ctrl+Shift+I (Windows/Linux)
2

Verify tools are loaded

In the chat, type:
List all available MCP tools
You should see th0th tools listed.
3

Use th0th tools

Example prompts:
Index this project with th0th
Use th0th to search for authentication code
Remember this decision: We're using JWT for auth

Using with Antigravity

Antigravity follows the same MCP configuration:
1

Install Antigravity

Install the Antigravity extension from the VSCode marketplace
2

Configure MCP

Use the same .vscode/mcp.json configuration
3

Reload and test

Restart VSCode and open Antigravity chat to verify th0th tools are available

Setup Script Details

The setup-vscode.sh script automates the entire setup process:
#!/bin/bash
# Location: ./scripts/setup-vscode.sh

# What it does:
# 1. Checks for bun/bunx/npx
# 2. Verifies Ollama is running
# 3. Starts th0th API if needed
# 4. Creates .vscode/mcp.json
# 5. Creates example config in ~/.config/th0th/
# 6. Tests MCP server connection

Script Output

Successful setup looks like this:
╔═══════════════════════════════════════════════════════════════╗
             th0th - VSCode/Antigravity Setup
╚═══════════════════════════════════════════════════════════════╝

[1/5] Checking prerequisites...
 bun: 1.0.0
 bunx: 1.0.0

[2/5] Checking Ollama...
 Ollama: healthy at http://localhost:11434 (v0.1.0)

[3/5] Checking th0th API...
 API: healthy at http://localhost:3333

[4/5] Configuring VSCode/Antigravity...
 Created: .vscode/mcp.json
 Created example: ~/.config/th0th/mcp.json.example

[5/5] Testing MCP server...
 MCP server: OK (7 tools discovered)

╔═══════════════════════════════════════════════════════════════╗
                    Setup Complete
╚═══════════════════════════════════════════════════════════════╝

Verification

1

Check MCP output

In VSCode, open the Output panel:
  • Press Cmd+Shift+U (Mac) or Ctrl+Shift+U (Windows/Linux)
  • Select “MCP” from the dropdown
  • Look for th0th connection messages
2

Test tool listing

In Copilot Chat:
List all th0th tools
3

Test indexing

Use th0th_index to index this workspace
4

Test search

Use th0th_search to find error handling code

Troubleshooting

  1. Check VSCode Output → MCP for error messages
  2. Verify th0th API is running: curl http://localhost:3333/health
  3. Reload VSCode window: Cmd+Shift+P → “Developer: Reload Window”
  4. Check .vscode/mcp.json syntax is valid JSON
Install Bun or switch to npx:
# Install Bun
curl -fsSL https://bun.sh/install | bash

# Or update .vscode/mcp.json to use npx
"command": "npx"
The API may not be running or using a different port:
# Check if running
lsof -i :3333

# Start API
cd th0th && bun run start:api

# Check logs
tail -f /tmp/th0th-api.log
Ensure the MCP client package has execute permissions:
# For global install
npm install -g @th0th-ai/mcp-client

# Or use bunx/npx which handle permissions automatically
Check the VSCode Output → MCP for stack traces, then:
  1. Verify your Node/Bun version is compatible
  2. Try running the MCP client directly: bunx @th0th-ai/mcp-client --help
  3. Check for conflicting MCP servers in .vscode/mcp.json

API Management

Useful commands for managing the th0th API:
# Check if API is running
lsof -i :3333

# Stop API
kill $(lsof -t -i:3333)

# Start API (development mode with hot reload)
bun run dev:api

# Start API (production mode)
bun run start:api

# View API logs (if started with setup script)
tail -f /tmp/th0th-api.log

# Check API health
curl http://localhost:3333/health

# View API documentation
open http://localhost:3333/swagger

Next Steps

MCP Tools Reference

Learn about all available th0th MCP tools

Configuration

Configure embedding providers and models

OpenCode Integration

Use th0th with OpenCode for better performance

Docker Setup

Run th0th in Docker containers