Skip to main content

Connect a coding agent over MCP

GuideConnect a coding agent over MCP5/13

Connect a coding agent such as Claude Code, Codex, Cursor or Antigravity to your ontology folder through MCP, the Model Context Protocol. Once connected, the agent can read your codebase ontology before it changes code. It can also record new concepts and relations in the same Markdown files that the map shows.

The agent connects to the folder

Your agent starts the Atlas MCP server on your computer when a session needs it, and the server stops when the session ends. The server reads and writes the Markdown files in your ontology folder. It opens no port and makes no network request of its own. The agent itself still talks to its model provider, as it always does.

As a result:

  • The agent can read the folder while the Atlas app is closed.
  • What the agent writes appears on the map, because the map reads the same files.
  • The connection is a config file in your folder, so it shows up in git diff like any other change.

Connect from the app

  1. Open your ontology folder in the app.
  2. Choose Agents in the sidebar, then the MCP tab.
  3. Under Connect this folder to an agent, press Connect on the row for your tool.
ToolFile the button writes
Claude Code.mcp.json
Codex.codex/config.toml
Cursor.cursor/mcp.json
Antigravity.agents/mcp_config.json

Each button writes only its own tool's file, and only when that file is missing. The app never overwrites a file that already exists. The config points at the MCP server that ships inside the app and holds the folder's absolute path, so you need neither Node.js nor a copy of the Atlas source code.

If .mcp.json or .codex/config.toml already exists but is not an Atlas connection file, the row shows a warning and offers to copy a corrected config. Read it, then merge it into your file yourself.

Then quit and reopen your agent. An agent reads its MCP config only when a session starts.

Only the app writes these files, because only it knows the folder's absolute path. A web page, including ontologyatlas.com, opens no folder and writes nothing. Without the app, run the server from a source checkout, as described next. To get the app, download it.

Connect from a source checkout

Without the app, for example on Linux or an Intel Mac, run the server from a clone of the repository. You need Git, Node.js 24, pnpm and a Rust toolchain; pnpm mcp:build-binary builds the server program:

git clone https://github.com/wlsdks/ontology-atlas ~/tools/ontology-atlas
cd ~/tools/ontology-atlas && pnpm install
pnpm mcp:build-binary

Then register the server with your agent. Claude Code reads it from .mcp.json at the root of your repository, and any other client that speaks MCP over stdio takes the same three fields:

{
  "mcpServers": {
    "ontology-atlas": {
      "command": "node",
      "args": ["/absolute/path/to/ontology-atlas/mcp/src/index.js"],
      "env": { "OATLAS_VAULT": "/absolute/path/to/your/atlas" }
    }
  }
}

Use absolute paths. A config file does not expand ~. Codex can also register the server globally:

codex mcp add ontology-atlas --env OATLAS_VAULT=/absolute/path/to/your/atlas -- node /absolute/path/to/ontology-atlas/mcp/src/index.js

Codex reads a project's .codex/config.toml only after you trust that folder. After you trust it, codex mcp list should show ontology-atlas.

To give a client read-only access, add "OATLAS_READ_ONLY": "1" to env. The server then lists only its read tools and refuses every write.

Check the connection

A config file on disk does not prove that the agent has loaded it. After the restart, ask the agent:

Call connection_info and tell me which ontology folder and which code repository you are connected to.

connection_info returns the folder and repository paths the server resolved, and the tools it offers. If the folder is not the one you expected, fix the config before you let the agent write.

In the app, Confirm the connection beside the heading shows the restart step and the state of each tool's file.

What the agent can read and write

For the exact list, see the tools the server itself reports. They fall into a few groups:

  • Read before work: get_concepts returns concepts with their neighbors, find_backlinks shows what points at a concept, and query_ontology shows how two concepts connect (path) and answers questions such as a workspace overview or the impact of a change.
  • Read the code: analyze_repo_structure and infer_imports survey a repository without writing anything.
  • Write: add_concepts, add_relations, patch_concept, rename_concept, merge_concepts, delete_concept and a few more. Rename, merge, delete and relation removal first preview their changes. They write only when the agent calls them again with confirmation.
  • Check: validate_vault and compile_ontology report broken references and missing parts.

Every write lands as a Markdown change. When the agent passes the expected_mtime it read, a write tool refuses to overwrite a file that has changed on disk since then. Without it, the write goes through.

What you still decide

  • Whether a write needs your approval. With an agent you run outside the app, the agent's own permission settings decide. In the app's agent chat, a Markdown write in the folder goes ahead unless you turn on Ask before every write.
  • Whether the meaning is right. A successful write does not mean the meaning is accepted. Read the diff before you commit it.
  • What the agent works on. On the map, Copy prompt in a concept's actions copies that concept's context for your agent.

The Agents tab on the same page lists the coding tools found on your computer and checks that they can run. In the app, it can also open an agent chat with one of them beside the map, using the same MCP server.

Next: Build the first map from your code. For what leaves your computer, see Data, privacy and safety.