Skip to main content
API key authentication gives you direct control over key creation and management. This approach is useful when:
  • You need to manage API keys centrally for your organization
  • You’re setting up automated workflows or CI/CD pipelines
  • You want to use a service account rather than individual user credentials
  • Your MCP client doesn’t support OAuth

How it works

  1. Create an API key in Omni
  2. Configure the key in your MCP client’s settings
  3. The client includes the key in all requests to Omni

Connection URL

When using API key authentication, connect directly to your Omni instance:
Replace <YOUR_OMNI_INSTANCE> with your Omni URL (e.g., acme.omniapp.co).

Running tools as another user

With an Organization API key, you can run tools as another user. Send that user’s ID in the X-MCP-User-ID header. Results include only what that user can access. Tools that can run as another user have the icon next to their name on the tool pages. The header works with Organization API keys only. A request that uses a PAT or OAuth and includes the header fails with a 403 error.

Restricting an agent to a model or topic

If you connect your own agent or app, you can send these headers to restrict new queries to a single model or topic:
  • X-MCP-Model-ID - getData, askOmni, and pickTopic use this model. runQuery refuses a query on a different model.
  • X-MCP-Topic-Name - getData and askOmni use this topic. runQuery refuses a query on a different topic.
This is useful for:
  • An embedded agent, where your backend restricts each user to the model or topic your product shows
  • A shared or automated agent that should stay on one model
  • Better answers. With fewer fields to search, the AI picks the right ones more often.
These headers don’t restrict saved queries. A user can still run the saved queries in any document they can open.

Troubleshooting

  • Verify the API key is correct and hasn’t been revoked
  • Check that the key has appropriate permissions
  • Ensure you’re using the correct instance URL

Next steps

Follow the setup guide for your MCP client:

ChatGPT

OpenAI’s AI assistant with developer mode

Claude Code

Command-line based version of Anthropic Claude

Claude Desktop

App version of Anthropic Claude

Codex

OpenAI’s agentic coding tool

Cursor

AI-powered IDE designed for fast, agentic programming

Microsoft Copilot

Microsoft’s AI assistant, configured through Copilot Studio

Visual Studio Code

Popular open-source IDE with powerful AI features