Use Kejue Voice from Claude (MCP)
Connect Claude — or any MCP client — and build, test, and review voice agents in plain language.
Connect Claude or another MCP client to Kejue Voice and ask it to build agents, write evals, review calls, or prepare releases. Add one URL and sign in with your normal login. The assistant acts as you, within the teams and permissions you approve.
claude mcp add --transport http kejue https://api.kejue.co/mcpThere is nothing to install or host and no API key to copy. This is the opposite direction from MCP servers, which let your agents call external tools during a call.
Connect
The server URL is https://api.kejue.co/mcp. On a self-hosted deployment it is
https://<your API host>/mcp.
Claude on the web or desktop
- Open Settings → Connectors and choose Add custom connector.
- Name it
Kejue Voice, pastehttps://api.kejue.co/mcp, and select Add. Claude detects the sign-in settings itself — leave them as they are. - Select Connect. Sign in to Kejue Voice, choose your teams and permissions, and approve.
Claude Code
claude mcp add --transport http kejue https://api.kejue.co/mcpRun /mcp inside Claude Code, pick kejue, and sign in when your browser
opens.
Other MCP clients
Add it as a remote (Streamable HTTP) server. There's no client ID or secret to configure — clients that support MCP authorization discover our sign-in automatically.
You can also copy the URL from Settings → Connected apps in the dashboard, where every connection you approve is listed.
What you approve
Signing in opens a consent screen in the Kejue Voice dashboard. It shows which app is asking, the address it returns to, and two choices.
Teams. Pick which of your teams the assistant may work in, and which one it uses by default. Teams that switched AI assistant access off, that require single sign-on you didn't use, or that require two-factor authentication you haven't set up are shown but can't be selected. To add a team later, connect again — or tick All teams, including teams I join later instead (see All teams).
Permissions. The assistant never gets more than your own role. These narrow it further:
| Permission | Lets the assistant | Default |
|---|---|---|
| Read | View agents, tools, evals, redacted calls, analytics and settings | On |
| Build | Create and edit agents, tools, evals and other resources; promote agents to staging | On |
| Deploy to production | Publish agent versions to production | Off |
| Calls & live actions | Place outbound and web calls, test tools against real systems, control live calls | Off |
| Unmasked PII | Read raw transcripts and recordings (every access is audited) | Off |
| Team admin | Manage members, roles, API keys and team settings; delete or legally hold calls | Off |
Everything that costs money, reaches a real person, or touches production is off unless you turn it on. Keep it that way unless you need otherwise.
All teams
All teams, including teams I join later sits above the team list on the consent screen and is off by default. With it on, the assistant can use every team you belong to now, and any team you join later — straight away, on the same connection, without signing in again. A team you leave stops working for the assistant immediately.
It never grants more than you have. In each team the assistant gets your
current role there, limited by the permissions you approved, and the team's
AI assistant access setting still
applies. A team you join later must meet the same rules as on the consent
screen: if it requires two-factor authentication, you need 2FA set up; if it
requires single sign-on, you must have approved the connection while signed
in with SSO. Until then that team returns 403 team_not_connected. You still
pick a default team, and it must be one you can connect right now.
You can't switch an existing connection between all teams and specific teams. Revoke it in Settings → Connected apps, where it shows as All teams (including future), and connect again.
How it works
The assistant acts as you, in one team per request, with your current role there. Leave a team or change role and its access changes on the next request. Its role is still limited by the permissions you approved. Apps that self-register, rather than proving their own domain, are labelled unverified on the consent screen.
Every change the assistant makes is recorded in the audit log under your name, marked as via the app — for example "Alex via Claude". Connections stay signed in for up to 30 days of use; revoke a connection at any time from Settings → Connected apps.
What the assistant can do
Dedicated tools cover agents, models, evals, calls, tool testing, analytics, and flow cloning. Everything else — phone numbers, campaigns, groups, webhooks, members and the rest of the API reference — goes through the general tools, and the server tells the assistant so when it connects.
| Area | Tools |
|---|---|
| Teams and help | list_teams, get_guide |
| Agents | list_agents, get_agent, create_agent, clone_agent, update_agent_draft, estimate_agent, promote_agent_to_staging, deploy_agent_to_production |
| Flows | clone_flow |
| Models and voices | list_models, list_voices |
| Evals | author_eval_suite, get_eval_check_schema, run_eval, get_eval_run |
| Calls and analytics | search_calls, get_call, query_analytics |
| HTTP tools | create_and_test_tool |
| Everything else | list_api_areas, find_api_operations, describe_api_operation, api_get, api_write |
clone_agenttakes an agent ID or slug, a new name, and a source version (draft,staging, orproduction). It creates a new agent with one draft.clone_flowtakes a flow UUID and a new name. It copies the saved configuration and keeps the existing member agent references.author_eval_suitecreates a suite with its scenarios and checks in one call, validating every check before anything is created. Re-running it with the same input is safe.get_eval_check_schemalists each check rule's arguments.create_and_test_toolcreates an HTTP tool and runs a test against your real upstream, returning the exact request sent.query_analyticsanswers ad-hoc questions over calls, extractions, guardrail events, tool calls and contacts without saving a board.list_api_areasmaps every API area with its operation count (alsoget_guide("api-map")).find_api_operationssearches by keyword or lists a whole area bytag, with paging;describe_api_operationtrims long contracts unless asked forfull.api_writechecks the body against the operation's schema before sending and returns every problem at once;skip_validationbypasses the local check, never the API's own.list_modelsshows whether each model can run right now, and the assistant is warned when an agent selects an unavailable model.api_get,list_agentsandlist_modelsacceptfieldsandcompactto keep answers short.
Tokens and secrets in responses are masked: a web call created through the
assistant returns its call_id and ws_url, never the join token.
Edits go to the agent's draft. A change reaches callers only after you promote and deploy, which the assistant confirms with you first. Your MCP client can also require approval per tool.
It can't create API keys or read secret values. Set secrets in the dashboard
and reference them as {{secrets.NAME}} (Secrets).
Built-in guidance
The server ships guides the assistant reads before it works: a map of the
API, writing voice prompts, choosing models, tools, evals, the release flow,
reviewing calls and safety. They encode what works across production voice agents — for example,
keep spoken turns short, and put every live value such as {{system.*}},
{{vars.*}} and pre-call results in a final context section at the end of
the prompt. The guides are defaults: when you ask for something different, the
assistant follows you.
Clients that support MCP prompts also get ready-made workflows: build an agent, improve an agent, write evals, and review calls.
Try asking
- "List my teams, then show me the agents in the Riyadh team that changed this week."
- "Create a booking agent for our clinic in English and Arabic. Use our best support agent as the style reference."
- "Write ten eval scenarios for the billing agent, including angry callers and language switches, and run them on the draft."
- "Why did yesterday's failed calls on the sales agent fail? Group them by cause."
- "Compare the prompts of our two collections agents and flag where they disagree."
For team admins
Turn AI assistant access on or off
Each team decides whether assistants may connect. The setting is
ai_connectors on the workspace settings, changed in
Settings → Connected apps or with PATCH /orgs/current (needs
org:update).
| Value | Effect |
|---|---|
enabled | Members may connect, limited by their role and what they approve |
read_only | Connected assistants keep read access only |
disabled | Every assistant request for this team is refused |
Teams with a signed BAA start disabled; everything else starts enabled.
A change applies to the next request — you don't need to revoke existing
connections.
See and remove connections
GET /connected-apps lists every connection that reaches your team: who
connected it, the app, the permissions they approved and when it was last
used. Needs connected-apps:read.
curl https://api.kejue.co/v1/connected-apps \
-H "Authorization: Bearer $KEJUE_API_KEY"Connections a member approved for all their teams appear here too, with
all_teams: true, labelled All of their teams (including future) in the
dashboard.
DELETE /connected-apps/{id} removes your team from that connection
immediately. The member's other teams keep working; a connection left with no
team ends. An all-teams connection never ends this way: it keeps working in
the member's other and future teams, and your team stays excluded even if the
member leaves and rejoins. Needs connected-apps:delete.
Both permissions belong to the admin and owner roles by default (Roles and members).
For developers
Assistants call the same public API you use with API keys. Their access tokens
start with kejue_oat_ and act as the signed-in member. Choose the team per
request with the Kejue-Org-Id header; without it, the request runs in the
default team picked on the consent screen. Existing sonus_oat_ tokens and
the Sonus-Org-Id header remain valid. An existing local connector named
sonus can keep its name; new examples use kejue. GET /auth/me returns
principal.type = oauth and lists the reachable teams in memberships.
For an all-teams connection, principal.all_teams is true and
memberships follows the member as they join and leave teams, minus teams an
admin removed and teams whose SSO or 2FA requirement they don't meet. The
list_teams tool says whether the connection covers teams joined later.
Sign-in follows the MCP authorization spec, so clients configure themselves:
| Document | URL |
|---|---|
| Protected resource metadata | https://api.kejue.co/.well-known/oauth-protected-resource/mcp |
| Authorization server metadata | https://api.kejue.co/.well-known/oauth-authorization-server |
We support client ID metadata documents and dynamic client registration for public clients, with PKCE (S256). Access tokens last an hour; refresh tokens rotate on every use, and reusing an old one ends the connection.
Failure modes
| Error | What it means |
|---|---|
403 team_not_connected | The connection doesn't include that team, you left it, a team admin removed it, or the team requires SSO or 2FA you haven't met. Ask the assistant to list your teams, or connect again and approve the team. |
403 ai_connectors_disabled | A team admin turned AI assistant access off for that team. |
403 forbidden | Your role, or the permissions you approved, don't allow that action. details.required_permission names what's missing. |
401 unauthorized | The connection was revoked or expired. Reconnect from your assistant. |
All codes are listed in Error codes.