- 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
- Create an API key in Omni
- Configure the key in your MCP client’s settings
- The client includes the key in all requests to Omni
Connection URL
When using API key authentication, connect directly to your Omni instance:<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 theX-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, andpickTopicuse this model.runQueryrefuses a query on a different model.X-MCP-Topic-Name-getDataandaskOmniuse this topic.runQueryrefuses a query on a different topic.
- 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.
Troubleshooting
Authentication fails
Authentication fails
- 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
Related
- MCP authentication - Compare the ways to authenticate MCP clients
- MCP OAuth authentication - Authenticate through your browser
- MCP Enterprise Managed Auth - Let users sign in through your Okta organization

