Integration

MCP Integration

Configure Semantiq as an MCP server for seamless integration with AI assistants.

What is MCP?

The Model Context Protocol (MCP) is a standard for connecting AI assistants to external tools and data sources. Semantiq implements the MCP specification, making it easy to give AI assistants semantic understanding of your codebase.

Claude Code Configuration

To use Semantiq with Claude Code, add the following to your .mcp.json file in your project root:

.mcp.jsonjson
{
  "mcpServers": {
    "semantiq": {
      "command": "semantiq",
      "args": ["serve"],
      "cwd": "."
    }
  }
}

Make sure you've indexed your project first:

semantiq index .

Available MCP Tools

Once configured, Claude Code will have access to the following tools:

semantiq_search

Search for code patterns, symbols, or text semantically.

// Parameters
{
  "query": "string",   // Search query
  "limit": "number"    // Optional: max results (default: 20)
}

semantiq_find_refs

Find all references to a symbol including definitions and usages.

// Parameters
{
  "symbol": "string",  // Symbol name to find
  "limit": "number"    // Optional: max results (default: 50)
}

semantiq_deps

Analyze the dependency graph for a file.

// Parameters
{
  "file_path": "string"  // File path to analyze
}

semantiq_explain

Get detailed explanation of a symbol.

// Parameters
{
  "symbol": "string"  // Symbol name to explain
}

Auto-Indexing

Semantiq automatically updates the index when files change. The MCP server watches for file system changes and incrementally updates the index, ensuring AI assistants always have up-to-date information.

Troubleshooting

MCP server not starting

Make sure Semantiq is installed and available in your PATH. Run semantiq --version to verify.

No results from search

Ensure you've indexed your project with semantiq index . and that the .semantiq.db file exists.

Stale results

Try re-indexing with semantiq index --force to rebuild the entire index.