Skip to content
QwryAI
Documentation
Pages

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.

Workspace settings › AI tools

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.

Install › Claude

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.

Bash
claude mcp add --transport http qwryai https://api.qwryai.com/mcp-oauth

Then run /mcp in Claude Code and choose Authenticate.

How sign-in works

  1. 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.

  2. 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.

  3. The client receives a token

    Access goes to that one client, for that one workspace, limited to the permissions you approved.

Token lifetime

Access tokenExpires after 1 hour; the client refreshes it silently
ApprovalExpires after 90 days
RevocationTakes effect right away

Permissions

An app asks for a set of permissions, and on the consent screen you choose which to approve.

PermissionWhat it allows
Chat with agentsList agents, start customer conversations, send customer messages, and search knowledge and product documentation.
Manage conversations and helpdeskRead conversations, tickets and analytics; reply as a human agent, add notes, resolve, and pause the AI.
Read agent settingsInstructions, model, chat interface, sources, knowledge gaps, integrations, webhooks and deploy status.
Change agent settingsInstructions, model, chat interface, styles, spam and country rules, and deploy channels.
Change sources and trainingAdd, edit, delete and restore sources, answer knowledge gaps, and start training.
Read actions and proceduresActions, procedures, drafts, publication state, widgets and templates.
Change actions and proceduresCreate, edit, enable, disable and delete actions, procedures and webhooks.
View plan and creditsPlan, 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:

JSON
{
  "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:

CodeMeaning
REVIEW_NOT_FOUNDNo review has that reviewId.
REVIEW_ALREADY_USEDThe review was already applied.
REVIEW_EXPIREDMore than 15 minutes passed. Call the tool again for a fresh review.
STALE_REVIEWWhat the review would change has changed since. Call the tool again.
NOTHING_TO_CHANGEThe change matches what's already there.
INVALID_ARGUMENTSThe tool's input was rejected.

These errors come from the MCP endpoint itself, before any tool runs:

StatusCodeMeaning
401OAUTH_REQUIREDNo token was sent. The WWW-Authenticate header points the client to sign-in.
401INVALID_OAUTH_TOKENThe 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.

Explore the documentation