Advanced Integration
MCP Server
Connect Claude, ChatGPT, Claude Code, Codex, Cursor and other MCP clients to your QwryAI workspace over OAuth
The QwryAI MCP server lets an AI assistant work directly in your QwryAI workspace. It can read and update your agents, manage their sources, search conversations, handle tickets and build Actions and Procedures, without you copying data between tools.
It's a remote Model Context Protocol server. There's nothing to install or host yourself.
Find your MCP URL
Open Workspace settings › AI tools. The MCP URL card shows the endpoint with a copy button, and the page lists every client QwryAI has setup steps for. Select Install on a client to see its steps and the exact command or configuration to copy.
Claude and ChatGPT
Add QwryAI as a custom connector, then approve access when asked.
In Claude, open Settings → Connectors and choose Add custom connector. Name it QwryAI, paste the MCP URL, select Add, then Connect and sign in when asked. Works in Claude.ai and the Claude desktop app.
In ChatGPT, open Settings → Apps & Connectors, turn on Developer mode under Advanced settings, then choose Create. Name it QwryAI, paste the MCP URL, choose OAuth, select Create and sign in when asked.
Claude Code, Codex, Cursor and other clients
Point the client at the endpoint. Don't add an Authorization header: the client handles OAuth itself and opens the sign-in page for you.
claude mcp add --transport http qwryai https://api.qwryai.com/mcp-oauthThen run /mcp in Claude Code and choose Authenticate.
codex mcp add qwryai --url https://api.qwryai.com/mcp-oauth
codex mcp login qwryaiThe second command opens your browser to sign in.
On AI tools, select Install on Cursor, then Open in Cursor. Or merge this into ~/.cursor/mcp.json, then open Cursor Settings → MCP and select Connect for qwryai:
{
"mcpServers": {
"qwryai": {
"url": "https://api.qwryai.com/mcp-oauth"
}
}
}On AI tools, select Install on VS Code, then Open in VS Code. Or merge this into .vscode/mcp.json, then run MCP: List Servers from the Command Palette and start qwryai:
{
"servers": {
"qwryai": {
"type": "http",
"url": "https://api.qwryai.com/mcp-oauth"
}
}
}AI tools has ready-made steps for Gemini CLI, GitHub Copilot CLI, opencode, Windsurf, Grok Build, Goose, Zed, Amp, Cline, Kilo Code, Hermes, OpenClaw and LM Studio. Select Install on your client and copy what it shows. For example, Gemini CLI:
gemini mcp add --transport http --scope user qwryai https://api.qwryai.com/mcp-oauthThen run /mcp auth qwryai in Gemini CLI to sign in.
How sign-in works
- Your client registers itself
The first time a client connects, it registers with QwryAI on its own using Dynamic Client Registration. You don't create anything in advance.
- You approve access in the browser
QwryAI shows a consent screen with the workspace and the permissions the app asks for. Choose the workspace, keep the permissions you want and select Approve connection.
- The client receives a token
Access goes to that one client, for that one workspace, limited to the permissions you approved.
Token lifetime
| Access token | Expires after 1 hour; the client refreshes it silently |
| Approval | Expires after 90 days |
| Revocation | Takes effect right away |
Permissions
An app asks for a set of permissions, and on the consent screen you choose which to approve.
| Permission | What it allows |
|---|---|
| Chat with agents | List agents, start customer conversations, send customer messages, and search knowledge and product documentation. |
| Manage conversations and helpdesk | Read conversations, tickets and analytics; reply as a human agent, add notes, resolve, and pause the AI. |
| Read agent settings | Instructions, model, chat interface, sources, knowledge gaps, integrations, webhooks and deploy status. |
| Change agent settings | Instructions, model, chat interface, styles, spam and country rules, and deploy channels. |
| Change sources and training | Add, edit, delete and restore sources, answer knowledge gaps, and start training. |
| Read actions and procedures | Actions, procedures, drafts, publication state, widgets and templates. |
| Change actions and procedures | Create, edit, enable, disable and delete actions, procedures and webhooks. |
| View plan and credits | Plan, credit balance and credit usage. |
To give an app read-only access, approve only the read permissions.
A client sees only the tools its permissions cover, so a short tool list usually means a narrow approval rather than a missing feature. Ask the assistant to call get_account_context, which reports the workspace, your role, the plan and the permissions in use.
What the assistant can do
The server exposes the same tools as Backstage, the Tools API and the CLI, grouped by area.
Agents and settings
List agents, read and change instructions, the model, the chat interface and styles, deploy channels and voice settings.
list_agents · agent_configuration · update_instructions · update_model · update_chat_interface · toggle_deploy_channel
Sources
Add, edit, remove and restore the knowledge an agent learns from, answer knowledge gaps and start training.
list_sources · get_sources_summary · add_url_source · add_qna_pairs · update_source · delete_source · start_training
Conversations
Search and read conversations, start one with an agent, send messages, and resolve or pause the AI.
query_conversations · search_conversations · get_conversation_detail · create_conversation · send_message · resolve_conversation
Helpdesk
Search and read tickets, reply as a teammate, add internal notes, and manage rules, teams, shifts and macros.
query_tickets · get_ticket_detail · send_agent_message · add_internal_note · save_helpdesk_rule · save_macro
Actions and procedures
Build, test and publish Actions, create and update Procedures, and manage webhooks.
list_action_catalog · build_action · create_procedure · update_procedure · publish_draft · create_webhook
Reviewed changes
Tools that change something don't change it right away. They return a review instead:
{
"status": "review_required",
"reviewId": "<reviewId>",
"changes": [ "…what will change…" ],
"expiresAt": "2026-12-01T10:15:00.000Z"
}The assistant shows you the changes, and only after you agree does it call apply_change with the reviewId. A review expires after 15 minutes and works only once.
Limits
- The workspace needs a paid plan: Starter, Growth or Enterprise. On Free, the consent screen shows Paid plan required.
- Each connection can make 2,000 requests every 15 minutes.
- Tools that return lists are paged. See Pagination.
Errors
A failed tool call returns a tool error with a code, such as REVIEW_EXPIRED or INVALID_ARGUMENTS. The review codes:
| Code | Meaning |
|---|---|
REVIEW_NOT_FOUND | No review has that reviewId. |
REVIEW_ALREADY_USED | The review was already applied. |
REVIEW_EXPIRED | More than 15 minutes passed. Call the tool again for a fresh review. |
STALE_REVIEW | What the review would change has changed since. Call the tool again. |
NOTHING_TO_CHANGE | The change matches what's already there. |
INVALID_ARGUMENTS | The tool's input was rejected. |
These errors come from the MCP endpoint itself, before any tool runs:
| Status | Code | Meaning |
|---|---|---|
| 401 | OAUTH_REQUIRED | No token was sent. The WWW-Authenticate header points the client to sign-in. |
| 401 | INVALID_OAUTH_TOKEN | The token has expired or was revoked. Sign in again. |
Manage connected apps
Every app you approve appears under Workspace settings › General › Connected apps, with when it connected, when it was last used and when its approval expires.
Select Revoke, then confirm in Revoke access?, to cut off an app. The app has to ask for your approval again before it can reconnect.
Troubleshooting
The client says the server needs authentication
That's expected before you sign in. Run your client's sign-in step (/mcp in Claude Code, codex mcp login qwryai in Codex) and approve the consent screen.
A tool the assistant needs is missing
The approval was narrower than the task needs. Ask the assistant to call get_account_context to see the permissions in use, then revoke the app under Connected apps and reconnect, approving the permissions it needs.
If a permission isn't offered on the consent screen at all, your own role doesn't include it. A workspace admin has to give you a role that does.
A change didn't happen
Changes wait for review. If the assistant didn't call apply_change within 15 minutes, the review expired and nothing changed. Ask it to run the tool again and apply the new review.
A source isn't live yet
Training runs in the background. Ask the assistant to call check_training_status instead of assuming the change finished.