Onyx MCP

v0.2.1
io.github.ByWaleed/onyx-mcp Checked 2 hours ago Published 3 months ago

Secure MCP access to Onyx search, chat, projects, and administration.

Values you need

VariableWhat it is
ONYX_API_URLrequired Onyx API base URL, for example https://onyx.example.com/api
ONYX_API_TOKENrequired secret Onyx Personal Access Token or API key
ONYX_DEFAULT_PERSONA_IDoptional Default Onyx agent ID for new chats Default: 0
ONYX_MCP_ENABLE_WEB_FETCHoptional Enable web search and allowlisted URL fetching Default: false
ONYX_MCP_WEB_FETCH_ALLOWLISToptional Comma-separated hostnames permitted for HTTPS URL fetching

npm (npx) discovery passed

Requires Node.js 18+

Run in a terminal
claude mcp add onyx-mcp -e 'ONYX_API_TOKEN=<ONYX_API_TOKEN>' -e 'ONYX_API_URL=<ONYX_API_URL>' -- npx -y onyx-mcp@0.2.1
Add to claude_desktop_config.json
{
  "mcpServers": {
    "onyx-mcp": {
      "args": [
        "-y",
        "onyx-mcp@0.2.1"
      ],
      "command": "npx",
      "env": {
        "ONYX_API_TOKEN": "<ONYX_API_TOKEN>",
        "ONYX_API_URL": "<ONYX_API_URL>"
      }
    }
  }
}
Add to ~/.cursor/mcp.json
{
  "mcpServers": {
    "onyx-mcp": {
      "args": [
        "-y",
        "onyx-mcp@0.2.1"
      ],
      "command": "npx",
      "env": {
        "ONYX_API_TOKEN": "<ONYX_API_TOKEN>",
        "ONYX_API_URL": "<ONYX_API_URL>"
      }
    }
  }
}
Add to .vscode/mcp.json
{
  "inputs": [
    {
      "description": "ONYX_API_TOKEN",
      "id": "onyx-api-token",
      "password": true,
      "type": "promptString"
    },
    {
      "description": "ONYX_API_URL",
      "id": "onyx-api-url",
      "password": true,
      "type": "promptString"
    }
  ],
  "servers": {
    "onyx-mcp": {
      "args": [
        "-y",
        "onyx-mcp@0.2.1"
      ],
      "command": "npx",
      "env": {
        "ONYX_API_TOKEN": "${input:onyx-api-token}",
        "ONYX_API_URL": "${input:onyx-api-url}"
      },
      "type": "stdio"
    }
  }
}
Add to ~/.codex/config.toml
[mcp_servers.onyx-mcp]
command = "npx"
args = ["-y", "onyx-mcp@0.2.1"]
env = { "ONYX_API_TOKEN" = "<ONYX_API_TOKEN>", "ONYX_API_URL" = "<ONYX_API_URL>" }

For AI agents

  1. Ask the user for: ONYX_API_URL, ONYX_API_TOKEN. Never invent or guess these values; secrets go into the client config, not into chat logs.
  2. Pick the user's MCP client and apply the matching config from the first install method (it is the one verified by the smoke test when available).
  3. Restart or reload the client so it starts the server.
  4. Verify: the server should expose these tools: onyx_health, onyx_version, onyx_whoami, onyx_permissions, onyx_capabilities, onyx_list_agents, onyx_get_agent, onyx_list_tools, ….
  5. If it fails, check that the required runtime is installed (Node.js 18+) and that the values above are set.

Machine-readable: install.md · manifest.json