Skip to content

Configuration

VariableDescriptionDefault
TOOL_COMPASS_BASE_PATHProject root directoryAuto-detected from module location
TOOL_COMPASS_PYTHONPython executable pathCurrent interpreter or venv auto-detect
TOOL_COMPASS_CONFIGPath to config JSON file./compass_config.json
OLLAMA_URLOllama server URLhttp://localhost:11434
COMFYUI_URLComfyUI server URL (used by the comfy backend)http://localhost:8188
PORTSet to enable HTTP (streamable-http) transport instead of stdiounset (stdio mode)
HOSTHTTP bind address (only used when PORT is set)127.0.0.1 (loopback)
GRADIO_AUTHuser:pass required when launching tool-compass ui --share (also settable via --auth user:pass)unset (refuses --share without it)
HYPOTHESIS_PROFILEdev / ci / nightly profile for fuzz testsdev

Tool Compass reads settings from a JSON file at startup. The resolution order for the config path is:

  1. TOOL_COMPASS_CONFIG environment variable
  2. ./compass_config.json in the tool-compass directory

If no config file is found, built-in defaults are used. See compass_config.example.json in the repository for a complete example.

KeyTypeDefaultDescription
backendsobject(built-in defaults)Backend server connections keyed by name
embedding_modelstringnomic-embed-textOllama embedding model name
ollama_urlstringhttp://localhost:11434Ollama API base URL
index_dirstring./dbDirectory for HNSW index and SQLite databases
auto_syncbooltrueEnable automatic tool discovery from backends
default_top_kint5Default number of results for compass searches
min_confidencefloat0.3Default minimum similarity threshold
progressive_disclosurebooltrueReturn summaries only from compass (use describe for full schemas)
sync_check_on_startupbooltrueCheck for backend changes on first compass call
sync_polling_intervalint300Background polling interval in seconds (0 = disabled)
analytics_enabledbooltrueTrack search queries and tool calls in local SQLite
hot_cache_sizeint10Number of frequently used tools to keep in memory
chain_indexing_enabledbooltrueEnable tool chain detection and indexing
chain_detection_min_occurrencesint3Minimum pattern occurrences before promoting to a chain
top_chains_cache_sizeint5Number of top chains to keep in memory cache

The config file supports ${VAR} substitution. Values are resolved from environment variables first, then from a defaults block in the config file:

{
"defaults": {
"BASE": "/home/user/project"
},
"backends": {
"bridge": {
"type": "stdio",
"command": "python",
"args": ["-u", "${BASE}/app/mcp/bridge_mcp_server.py"]
}
}
}
Terminal window
# Start with Docker Compose
docker-compose up
# Include Ollama in the stack
docker-compose --profile with-ollama up

The Gradio UI is available at http://localhost:7860 when running in Docker.

If Claude Desktop logs show JSON parse errors like:

Unexpected token 'S', "Starting T"... is not valid JSON

Cause: print() statements corrupt the JSON-RPC protocol.

Fix: Use logging or write to stderr:

import sys
print("Debug message", file=sys.stderr)
Terminal window
# Check Ollama is running
curl http://localhost:11434/api/tags
# Pull the embedding model
ollama pull nomic-embed-text

Rebuild the index using the v2.2 canonical CLI:

Terminal window
tool-compass sync

If a backend fails to connect, verify:

  1. The command in your config file is correct and the script exists
  2. The backend MCP server starts successfully when run standalone
  3. Check gateway logs with --verbose for detailed connection errors
  • Data touched: Tool descriptions indexed in local HNSW vector DB, search queries logged to local SQLite, embeddings generated via local Ollama
  • Data NOT touched: No user code, no file contents, no credentials. Tool call arguments are hashed, not stored in plain text
  • Network: Connects to local Ollama for embeddings. Optional Gradio UI binds to localhost. No external telemetry