ATLAS Open interactive docs →

MCP Tools

Atlas exposes its graph, search, and impact analysis as MCP tools, so a connected assistant answers repository questions with bounded, cited context instead of raw file dumps. This page covers the transports, the tool set, how workspace scope is resolved, and how to keep responses small.

Transports

Choose the transport based on how the client launches Atlas. Desktop agents spawn a process and speak stdio; shared setups talk HTTP to one long-running service.

Stdio (the default; local to the launching assistant):

atlas mcp --transport stdio

HTTP, mounted on the local service at POST /mcp:

atlas serve --mcp

atlas mcp can also serve HTTP directly with --http 127.0.0.1:8765 (Streamable HTTP) or --sse 127.0.0.1:8766 (legacy HTTP+SSE); set ATLAS_API_TOKEN to require Authorization: Bearer on either. With --supervise, Atlas runs as the supervised warm MCP gateway: it uses the workspace database, starts a background watch, and serves code_query first. By default the MCP process also watches the repository to keep the graph fresh (--watch=false or ATLAS_NO_WATCH=1 to disable; --watch-path to watch a different path).

Tool Selection

ToolUse it for
code_queryNatural-language questions about a repository
searchFocused lexical or semantic discovery
symbolDefinitions, snippets, callers, callees, refs, and coverage
graphPaths or neighborhoods between symbols
impactRepository or cross-repository blast radius
routesServed routes, consumers, and dependencies
contextCode-review context for changed paths
reportRepository-level code intelligence reports
historyIndexed history and graph changes
statusIndex, readiness, and retrieval state
linkRegister a repository for workspace or cross-repository analysis
record_feedbackRecord result-quality feedback
record_taskRecord the outcome of a procedural task

Choosing a Tool

Start with code_query for most repository questions: it checks index readiness and returns cited context under a bounded response budget. Reach for a narrower tool when you already know the shape of the answer:

refs, or coverage. Add package, receiver, or arity filters when the name is overloaded.

state, which distinguishes "no index" from "no matches".

Workspace Scoping

Repository-scoped tools need to know which repository they operate on. Atlas accepts scope from, in order of availability:

If none is available, Atlas returns workspace_required instead of silently choosing a repository.

Result Statuses

Check the status field before trusting a result — it tells you whether the answer is backed by an index at all.

StatusMeaning
okAtlas returned cited context
indexingAn index was started or is still running
no_indexNo usable index exists for the workspace
insufficientThe index could not support a cited answer
budget_exceededStrict output budget was too small
workspace_requiredRepository scope was not declared

Controlling Token Spend

Tune detail and format so results fit the assistant's context window instead of trimming after the fact:

names and signatures; high for repository-local evidence; xhigh only when broader cross-repo context is required.

need structured JSON.

marked truncated:true. Strict budget mode refuses an oversized answer and returns budget_exceeded instead.

Transport Security

Stdio MCP is local to the launching assistant. HTTP MCP should stay on loopback unless authentication and origin restrictions are configured:

export ATLAS_API_TOKEN='replace-with-a-strong-token'
export ATLAS_MCP_ALLOWED_ORIGINS='https://trusted.example'
atlas serve --mcp --addr 0.0.0.0:3099

See Privacy and Data Handling before enabling networked access, and Dashboard and HTTP API for the full service surface.