This page covers Onyx as an MCP server. To give Onyx Agents tools from another MCP server,
see MCP plugins.
Before you connect
- Get your Onyx MCP URL from your administrator, such as
https://onyx.example.com/mcp/. - Your Onyx account needs the Search and Create User Access Token permissions.
- Self-hosted Onyx needs HTTPS for OAuth. The MCP server is in all editions and is on by default.
Connect your AI tools
Claude
Claude Desktop and claude.ai.
ChatGPT
ChatGPT on the web and desktop.
Codex
CLI, desktop app, and IDE extension.
Claude Code
User or project configuration.
Sign in and approve access
Your client opens Onyx in your browser. Sign in with your own user account, check the app name and account, and select Allow access. API keys and service accounts cannot approve access.
Test the connection
Send this prompt from your client:search_indexed_documents and return document titles and source links.
An empty result can be valid. Try a document that you know you can open in Onyx.
Permissions and data access
A connected app gets theread:search scope. It can search documents that you can access, search the web,
and open web pages. It cannot create API keys or use other Onyx APIs. Your document permissions still apply.
Your AI client receives the content that Onyx returns. Use a client that your organization allows to receive it.
Connection expiry
After 30 days, sign in and approve access again. If a client reuses an old refresh token,
Onyx revokes the authorization and you must connect again.
Manage connected apps

Use a personal access token instead
If your client cannot use OAuth, create a personal access token withread:search under Settings > Accounts & Access > Access Tokens. On Onyx Cloud,
tokens need a paid subscription.
Export the token without saving it in your shell history:
Prompts you can use
Replace names and dates with values from your workspace.Find a procedure
Search a document set
Use an Onyx agent’s knowledge scope
agent with document_set_names in the same search.
Find recently updated documents
Compare workspace guidance with public documentation
Tool reference
search_indexed_documents
Search the knowledge indexed in Onyx. The search includes query expansion, retrieval, document selection, and context expansion.time_cutoff can result in a search without a date restriction.
The response has a results array. Each result includes title, url, source_type, content, and updated_at.
Results are ordered by relevance. content contains retrieved document text,
which can be a selected chunk rather than the entire document. There is no limit parameter for this tool.
search_web
Search public web content. Availability depends on your Onyx web-search configuration.results and query. Results include page titles, URLs, and snippets.
Use open_urls for page text when a snippet is insufficient.
open_urls
Retrieve text from web pages. This tool does not provide a way to bypass a site’s sign-in or Onyx document permissions.results array with fetched page text and metadata.
Resource reference
Clients that support MCP resources can read these JSON resources to discover search filters:
Resource support varies by client. A resource lookup is not required before searching:
named filters are resolved on the search call and return an error when they cannot be resolved.