Skip to content

Connect your agent

The installation’s Connect your agent page is the preferred source of snippets: it uses the configured endpoint and your API key. The examples below use a local installation at http://localhost:8080/mcp. For a team installation, replace that URL with its HTTPS endpoint.

Create a key in the app first. Replace YOUR_API_KEY privately and keep the completed configuration out of Git, screenshots and shared logs.

Merge this entry into ~/.cursor/mcp.json or your project MCP settings. Preserve your other servers.

{
"mcpServers": {
"ontlgy": {
"url": "http://localhost:8080/mcp",
"headers": { "Authorization": "Bearer YOUR_API_KEY" }
}
}
}

Reload MCP servers and confirm ontlgy is enabled.

Run the command generated by the app:

Terminal window
claude mcp add --transport http ontlgy http://localhost:8080/mcp --header "Authorization: Bearer YOUR_API_KEY"

The substituted command contains a secret. Use your team’s secret-handling practices for shell history and configuration. Restart or reload the client after adding the server.

Merge this into ~/.codex/config.toml:

[mcp_servers.ontlgy]
url = "http://localhost:8080/mcp"
bearer_token_env_var = "ONTLGY_API_KEY"

Set the key in the environment of the process that launches Codex:

Terminal window
export ONTLGY_API_KEY='YOUR_API_KEY'

Restart Codex from that environment. A desktop app launched separately may not inherit a variable exported in a terminal; configure the environment for the actual launch method.

  1. Use the app’s connection test to verify the key and endpoint.
  2. Confirm your agent lists repo_find, search, symbol and the other default tools.
  3. Ask the agent to find a repository and complete the first-query walkthrough.

The app’s test proves its endpoint works with the key. It does not prove the separate agent process loaded its configuration or can reach the server.

localhost means the machine where the agent runs. A remote agent or container needs a reachable installation URL; it cannot use your laptop’s loopback address. Do not expose a plain HTTP installation publicly; configure HTTPS.

The shared product uses authenticated HTTP at /mcp. A source-development stdio server also exists, but it reads the configured graph without installation source credentials. Live doc_read requires HTTP MCP or your own source connector. Use the HTTP endpoint of your installation unless you are developing ontlgy itself.

Next: Add repository guidance.