MCP Server

Give AI coding assistants direct access to the 2kw.ai platform — manage schemas, run extractions, and more from your IDE.

Overview

The Model Context Protocol (MCP) is an open standard that lets AI assistants interact with external tools and services. The 2kw.ai MCP Server exposes the entire 2kw.ai API as MCP tools, so your AI-powered IDE can:

  • Create and manage schemas
  • Run data extractions and test schemas
  • Convert documents and transcribe audio
  • Query AI models through the AI Gateway
  • Run agents and manage prompts, knowledge bases, datasets and experiments
  • Browse API documentation

No copy-pasting API keys into chat. No switching between your IDE and the dashboard. Just ask your assistant to do it.

Installation

Install the MCP server globally via npm:

npm install -g @2kw/ai-mcp-server

Or run it directly with npx (no install needed) — this is what the IDE configurations below use.

Updating

If you installed the MCP server globally, update it with:

npm update -g @2kw/ai-mcp-server

If you use npx (the default in the IDE configurations below), it automatically resolves the latest version. To force a cache refresh:

npx --yes @2kw/ai-mcp-server

Setup

1

Get an API key

Head to the API Keys page in the sidebar and create a new key. Copy it — you'll need it for the configuration below.

2

Configure your IDE

Add the 2kw.ai MCP server to your IDE's MCP configuration. See the IDE-specific sections below.

IDE Configuration

Claude Code

Add to .claude/settings.local.json in your project root:

{
  "mcpServers": {
    "backbone": {
      "command": "npx",
      "args": ["@2kw/ai-mcp-server"],
      "env": {
        "AI_2KW_API_KEY": "sk_your_api_key"
      }
    }
  }
}

Cursor

Add to .cursor/mcp.json in your project root:

{
  "mcpServers": {
    "backbone": {
      "command": "npx",
      "args": ["@2kw/ai-mcp-server"],
      "env": {
        "AI_2KW_API_KEY": "sk_your_api_key"
      }
    }
  }
}

Windsurf

Add to .windsurf/mcp.json in your project root:

{
  "mcpServers": {
    "backbone": {
      "command": "npx",
      "args": ["@2kw/ai-mcp-server"],
      "env": {
        "AI_2KW_API_KEY": "sk_your_api_key"
      }
    }
  }
}

OpenAI Codex CLI

Add to ~/.codex/config.json:

{
  "mcpServers": {
    "backbone": {
      "command": "npx",
      "args": ["@2kw/ai-mcp-server"],
      "env": {
        "AI_2KW_API_KEY": "sk_your_api_key"
      }
    }
  }
}

Environment Variables

VariableRequiredDefaultDescription
AI_2KW_API_KEYYes—API key for authenticating with the 2kw.ai backend
AI_2KW_BASE_URLNohttps://api.2kw.aiBase URL of the 2kw.ai backend. Override for self-hosted instances
AI_2KW_CHAT_URLNoDerived from AI_2KW_BASE_URLOrigin of the chat app that a connector pause points to. https://api-dev.2kw.ai maps to https://chat-dev.2kw.ai; any base URL the server does not know maps to https://chat.2kw.ai
MCP_TRANSPORTNostdioTransport mode: stdio or http
MCP_HTTP_PORTNo3100Port for the HTTP transport (only used when MCP_TRANSPORT=http)

Available Tools

The server registers 197 tools in 26 groups. Each table shows the first sentence of the tool's description; your MCP client shows the full description and parameters.

AI Gateway

Call models through the gateway — chat completions, the Responses endpoint (including stored agents) and the model list.

ToolDescription
2kw_chatSend a chat completion request through Backbone's OpenAI-compatible AI gateway.
2kw_create_responseSend a request through Backbone's OpenAI-compatible OpenResponses endpoint (POST /v1/responses).
2kw_list_modelsList available AI models and providers accessible through the Backbone AI gateway.

Agents

Manage agents, their versions, labels and tool catalogs, and decide a paused run's approvals and relayed tool calls. See Running agents.

ToolDescription
2kw_list_agentsList agents in the organization with optional search and pagination.
2kw_list_agent_catalogList published agents as id, name and description.
2kw_get_agentGet an agent by its ID.
2kw_create_agentCreate a new agent for the organization.
2kw_update_agentUpdate an agent's metadata and configuration.
2kw_delete_agentDelete an agent and cascade-delete its versions and labels.
2kw_list_agent_versionsList version history for an agent, with pagination.
2kw_create_agent_versionCreate a new version of an agent.
2kw_get_latest_agent_versionRetrieve the most recent version of an agent.
2kw_list_agent_skillsList the skills an agent's latest published version binds, in authored order.
2kw_get_agent_versionRetrieve a specific version of an agent.
2kw_get_agent_version_policyWhat the policy gate would do to a call of each tool an agent version configures: the verdict (EXECUTE, RELAY, PAUSE_APPROVAL, JUDGE, BLOCK, FAIL), the composed action, the class and where it came from, and every policy statement behind it.
2kw_deactivate_agent_versionSoft-delete an agent version.
2kw_activate_agent_versionRe-activate a historical agent version by creating a copy at the head.
2kw_list_agent_labelsList labels defined on an agent (e.g. production, staging) and which version each points to.
2kw_create_agent_labelLabel an agent version (e.g. tag as 'production').
2kw_update_agent_labelRepoint an existing agent label to a different version — typical release cutover.
2kw_delete_agent_labelDelete a label from an agent.
2kw_list_agent_approvalsList human-in-the-loop tool approvals raised by an agent, newest first.
2kw_decide_agent_approvalsAnswer what a paused agent run waits for: its relayed tool calls (outputs) and its pending approvals (decisions or decideAll), in one call, then continue the run.
2kw_list_agent_tool_catalogsList an agent's tool-catalog sync history, newest first.

Conversations

Create, read, rename and delete conversations, list their items and cancel a running turn.

ToolDescription
2kw_create_conversationCreate a conversation whose id can be passed as the 'conversation' parameter on the responses API, so an agent turn can be replayed and extended across calls.
2kw_list_conversationsList conversations, most recently active first.
2kw_get_conversation_summaryCount the caller's own conversations by state: working, paused (waiting on an approval or a client) and failed in the past 24 hours.
2kw_get_conversationFetch a conversation by id.
2kw_update_conversationReplace a conversation's metadata.
2kw_delete_conversationDelete a conversation and the responses recorded against it.
2kw_cancel_conversation_turnAsk a running turn of a conversation to stop.
2kw_list_conversation_itemsFetch a conversation's items in replay order, oldest first.

Memory

Read and edit your own agent memory, and see or erase a member's memory as an admin.

ToolDescription
2kw_list_my_memory_filesList the files in your agent memory (the API key owner's), ordered by path, without content.
2kw_read_my_memory_fileRead one of your agent memory files: the raw content, its version (for ifMatchVersion) and which agent wrote it last.
2kw_write_my_memory_fileCreate or replace one of your agent memory files with the complete content.
2kw_delete_my_memory_fileDelete one of your agent memory files, or a directory with everything below it.
2kw_forget_my_memoryDelete your whole agent memory.
2kw_list_member_memory_usageAgent memory totals per organization member: file count, total bytes and last write.
2kw_erase_member_memoryErase one member's whole agent memory in this organization.

Knowledge Bases

Manage knowledge bases and their documents, search them and resolve citations.

ToolDescription
2kw_list_knowledge_basesList the organization's knowledge bases as a page, newest first by default.
2kw_create_knowledge_baseCreate a knowledge base and its first configuration version.
2kw_get_knowledge_baseRetrieve a single knowledge base by id.
2kw_update_knowledge_baseApply the request's fields to a knowledge base and snapshot the result as the next configuration version.
2kw_delete_knowledge_baseSoft-delete a knowledge base, releasing its slug.
2kw_list_knowledge_documentsList a knowledge base's documents as a page, newest first by default.
2kw_upload_knowledge_documentsUpload one or more local files into a knowledge base for asynchronous ingestion.
2kw_attach_knowledge_document_fileIngest a file uploaded earlier with 2kw_upload_file (purpose=knowledge) into a knowledge base.
2kw_get_knowledge_documentRetrieve a knowledge base document together with the revision retrieval is serving.
2kw_delete_knowledge_documentSoft-delete a document and take every revision out of retrieval.
2kw_get_knowledge_document_versionRetrieve one revision of a document by id — the polling endpoint for an accepted upload.
2kw_search_knowledge_baseHybrid dense + lexical retrieval with Reciprocal Rank Fusion over a knowledge base.
2kw_resolve_citationResolve a citation's chunkId (from 2kw_search_knowledge_base or a response citation) to the passage it points at, exactly as it was indexed.
2kw_list_provider_embedding_modelsList embedding models served by a provider that fit a provisioned embedding dimension.

Files

Upload, list, download and delete files.

ToolDescription
2kw_list_filesList the organization's files as a page, newest first by default, optionally narrowed by purpose.
2kw_upload_fileUpload a local file and get back its file id.
2kw_get_fileFetch a file's metadata by id.
2kw_delete_fileSoft-delete an agent_input file.
2kw_download_fileDownload a file's bytes and save them to a local path.

Skills

Import, read, resolve and delete skills, with their versions and labels.

ToolDescription
2kw_list_skillsList org skills with optional name/status filter and pagination.
2kw_get_skillGet a skill by ID, including its latest version number.
2kw_list_skill_versionsList versions of a skill with pagination.
2kw_get_skill_versionGet a skill version, including description, body, frontmatter and resources.
2kw_list_skill_labelsList skill labels and the versions they point to.
2kw_resolve_skillResolve a skill by name, name@label or name@version number.
2kw_delete_skillDelete a skill and all its versions.
2kw_import_skillImport a local SKILL.md or .zip file.

Plugins

Install, sync, update and remove plugins.

ToolDescription
2kw_list_pluginsList Claude Code plugins installed in the org, with optional status filter and pagination.
2kw_get_pluginGet an installed plugin by ID, including its last sync report.
2kw_install_pluginInstall a plugin from a git repository (https, allow-listed host) and run its first sync: skills are imported with provenance and the sync report is returned.
2kw_update_pluginChange how an installed plugin follows its repository, or pause it.
2kw_sync_pluginSync an installed plugin now: resolves the ref, imports changed skills and moves the plugin label.
2kw_delete_pluginDetach an installed plugin.

Prompts

Manage prompts, their versions and labels, and resolve, compile or test them.

ToolDescription
2kw_list_promptsList org prompts with optional name/type filter and pagination.
2kw_get_promptGet a single prompt by id, including its active version pointer.
2kw_create_promptCreate a new prompt (metadata only — add content via a prompt version).
2kw_update_promptUpdate prompt metadata (name, description, type).
2kw_delete_promptDelete a prompt and all its versions.
2kw_resolve_promptResolve a prompt's active or labeled content — returns the version that would be used at runtime.
2kw_compile_promptRender a prompt template with variable substitution.
2kw_test_promptRun a prompt against an LLM and return the completion — useful for smoke-testing template changes.
2kw_list_prompt_versionsList all versions of a prompt (most recent first).
2kw_get_prompt_versionFetch a single prompt version by id, including its content.
2kw_get_latest_prompt_versionGet the latest version of a prompt.
2kw_delete_prompt_versionDelete (deactivate) a specific prompt version.
2kw_create_prompt_versionCreate a new prompt version.
2kw_activate_prompt_versionMark a specific prompt version as active — new resolve/test calls with no label target this version.
2kw_list_prompt_labelsList labels defined on a prompt (e.g. production, staging) and which version each points to.
2kw_create_prompt_labelLabel a prompt version (e.g. tag a version as 'production').
2kw_update_prompt_labelMove an existing label to a different prompt version — typical release cutover.
2kw_delete_prompt_labelRemove a label from a prompt.

Schemas

Define extraction schemas within your organization.

ToolDescription
2kw_list_schemasList schemas in the organization with optional search and pagination.
2kw_get_schemaGet a schema by its ID.
2kw_create_schemaCreate a new schema in the organization.
2kw_update_schemaUpdate an existing schema.
2kw_resolve_schemaResolve a schema's active or labeled content — returns the version that would be used at runtime.
2kw_delete_schemaDelete a schema and all its versions.

Schema Versions

Manage versioned snapshots of schema definitions.

ToolDescription
2kw_create_schema_versionCreate a new version for a schema.
2kw_list_schema_versionsList all versions of a schema with pagination.
2kw_get_schema_versionGet a specific schema version by its ID.
2kw_get_latest_schema_versionGet the latest active version of a schema.
2kw_delete_schema_versionDelete (deactivate) a schema version.
2kw_activate_schema_versionRe-activate a historical schema version by creating a copy as the newest active version.

Schema Labels

Point named labels at schema versions.

ToolDescription
2kw_list_schema_labelsList labels defined on a schema (e.g. production, staging) and which version each points to.
2kw_create_schema_labelLabel a schema version (e.g. tag as 'production').
2kw_update_schema_labelMove an existing schema label to a different version — typical release cutover.
2kw_delete_schema_labelRemove a label from a schema.

Schema Testing

Validate schemas and test extractions without persisting data.

ToolDescription
2kw_validate_schemaValidate a JSON Schema definition without persisting it.
2kw_test_schemaTest a JSON Schema against sample text using AI extraction.

Extractions

Extract structured data from text using schemas and AI models.

ToolDescription
2kw_create_extractionExtract structured data from text and/or images using a schema and AI model.
2kw_get_extractionGet an extraction by its ID.
2kw_list_extractionsList extractions in the organization with optional filtering by status, schema version, or search term.
2kw_delete_extractionDelete an extraction and all associated results.
2kw_estimate_tokensEstimate token usage for an extraction without executing it.
2kw_rerun_extractionRe-run an existing extraction with the same configuration.

Document Conversion

Convert documents (PDF, DOCX and more) to Markdown, text, HTML or JSON.

ToolDescription
2kw_convert_documentConvert documents (PDF, DOCX, XLSX, images, etc.) to Markdown, text, HTML, or JSON.
2kw_convert_fileConvert one or more local files (PDF, DOCX, XLSX, images, etc.) synchronously via direct multipart upload.
2kw_convert_file_asyncStart an asynchronous conversion of one or more local files via direct multipart upload.
2kw_get_task_statusCheck the status of an async conversion task.
2kw_get_task_resultGet the result of a completed async conversion task.

Audio Transcription

Transcribe audio files using AI models.

ToolDescription
2kw_transcribe_audioTranscribe an audio file using Backbone's transcription API.

Datasets

Manage evaluation datasets, their versions and items.

ToolDescription
2kw_list_datasetsList datasets in the organization with optional search, type filter, and pagination.
2kw_get_datasetGet a dataset by its ID.
2kw_create_datasetCreate a new dataset in the organization.
2kw_update_datasetUpdate an existing dataset's details.
2kw_delete_datasetDelete a dataset and all its versions and items.
2kw_get_dataset_versionsList all versions of a dataset with pagination.
2kw_get_dataset_versionGet a specific dataset version by ID.
2kw_create_dataset_versionCreate a new version of a dataset.
2kw_add_dataset_itemAdd an item to a dataset.
2kw_add_dataset_itemsAdd multiple items to a dataset in a single request.
2kw_get_dataset_itemsList items in a dataset with pagination.
2kw_delete_dataset_itemSoft-delete a dataset item by marking it as deleted.
2kw_update_dataset_item_expected_outputUpdate only the expectedOutput of a dataset item.

Experiments

Run experiments over datasets, compare variants and track regressions against a baseline.

ToolDescription
2kw_list_experimentsList experiments in the organization with optional search, status filter, and pagination.
2kw_get_experimentGet an experiment by its ID, including status and dataset version reference.
2kw_create_experimentCreate a new experiment, optionally linked to a dataset version.
2kw_update_experimentUpdate an existing experiment's details.
2kw_delete_experimentDelete an experiment and all associated data.
2kw_add_variantAdd a variant to an experiment with a task type and configuration.
2kw_get_variantsList all variants for an experiment.
2kw_update_variantUpdate an existing variant's details.
2kw_delete_variantDelete a variant from an experiment.
2kw_run_experimentStart an experiment run.
2kw_get_experiment_runsList runs for an experiment with status, progress, and timing information.
2kw_get_runGet a single experiment run by ID, including status, progress, and baseline flag.
2kw_set_baselineMark a run as the baseline for its variant.
2kw_clear_baselineUnmark a run as the baseline for its variant.
2kw_get_run_resultsGet detailed results for an experiment run, including output, token usage, cost, and errors per dataset item.
2kw_get_run_regressionCompare an experiment run against a baseline run on the same variant, reporting regressed, improved, and ground-truth-changed items.
2kw_get_experiment_comparisonGet the paged comparison matrix for an experiment: dataset items joined with the latest completed run per variant, plus per-variant aggregates over all results.

Evaluators

List evaluator types and manage evaluator templates.

ToolDescription
2kw_list_evaluator_typesList the built-in evaluator types that experiments can score against (e.g. exact_match, grounding, llm_judge).
2kw_list_evaluator_templatesList org-scoped evaluator templates.
2kw_get_evaluator_templateShow a single evaluator template by id, including its config.
2kw_create_evaluator_templateCreate a reusable evaluator template.
2kw_update_evaluator_templateReplace an evaluator template.
2kw_delete_evaluator_templateDelete an evaluator template.

Scores

Record and list human scores.

ToolDescription
2kw_record_human_scoreRecord a human score for a subject — a run result, trace, span, or dataset item.
2kw_list_human_scoresList human scores filed against a subject.

Annotation Queues

Manage annotation queues and work through their items.

ToolDescription
2kw_list_annotation_queuesList annotation queues in the organization.
2kw_get_annotation_queueGet an annotation queue by its ID, including item counts by status.
2kw_create_annotation_queueCreate a new annotation queue to curate subjects for human (or agent-assisted) review.
2kw_update_annotation_queueUpdate an annotation queue's name or description.
2kw_archive_annotation_queueArchive an annotation queue.
2kw_find_queue_items_by_subjectFind every annotation queue item referencing a given subject, across all queues in the organization.
2kw_list_queue_itemsList items in a queue, optionally filtered by status or assignee.
2kw_add_queue_itemsBulk-add subjects to a queue for review.
2kw_claim_next_queue_itemClaim the next eligible item in a queue for the caller — the entry point of a review loop.
2kw_get_queue_itemGet a single queue item by its ID.
2kw_update_queue_itemUpdate a queue item's status or assignee — the closing step of a review loop started by 2kw_claim_next_queue_item.

Tracing

Read traces and trace sessions, and change the tracing settings.

ToolDescription
2kw_get_tracing_settingsReturn the org's tracing settings: includePrompts / includeCompletions (whether raw prompt and completion content are persisted on ingested spans; false by default) and trace retention: retentionDays (the org's choice, null = follow the plan), planRetentionDays and effectiveRetentionDays.
2kw_update_tracing_settingsUpdate the org's tracing settings.
2kw_list_tracesList recent traces in the org.
2kw_get_traceGet every span of a specific trace.
2kw_list_trace_sessionsList sessions (spans grouped by an exporter-stamped session id) in the org, with turn/error counts, duration, tokens and cost.
2kw_get_trace_sessionGet every span recorded under a session, flat and sorted by start time — reconstruct the conversation chronologically.

Analytics

Usage, error and quality analytics for your organization.

ToolDescription
2kw_analytics_summaryCross-surface summary for the org: total operations, tokens, p95 duration, and per-surface breakdown (extractions, conversions, chat, transcription, experiments).
2kw_analytics_time_seriesOperations count grouped by date bucket and surface.
2kw_analytics_schemasTop schemas by extraction count with success rate and token usage (extraction surface only).
2kw_analytics_providersProvider usage breakdown (extraction surface only): counts, success rate, tokens, avg duration.
2kw_analytics_errorsTop failures across all surfaces, grouped by (surface, error message), with count and last occurrence.
2kw_analytics_qualityTotal experiment runs in range + average evaluator score.
2kw_analytics_quality_trendAverage evaluator score over time, bucketed by day/week/month.

Providers

Manage AI providers and list their models.

ToolDescription
2kw_list_providersList BYOK AI providers configured for the org (OpenAI, Azure, Anthropic, etc.).
2kw_get_providerFetch a single provider record by id.
2kw_create_providerRegister a new BYOK provider with credentials.
2kw_update_providerPatch an existing provider.
2kw_delete_providerDelete a provider.
2kw_list_all_providersList every AI provider configured for the org, unpaginated.
2kw_test_providerTest connectivity/credentials for an AI provider before (or without) saving it.
2kw_list_provider_modelsList every model exposed by every configured provider.

Billing

Read your billing tier and limits, and check available budget.

ToolDescription
2kw_get_billing_tierShow the org's current subscription tier and its feature flags.
2kw_list_billing_tiersList every available subscription tier with its limits (for comparison or upgrade guidance).
2kw_get_billing_limitsCurrent usage vs. tier limits across resources (schemas, prompts, team members, etc.) plus period window and feature flags.
2kw_billing_has_availableCheck whether the org has enough usage left for a metered action, such as an extraction, a document conversion or a gateway call, before running it.
2kw_billing_checkCheck whether the org can create another resource of the given type before attempting it.

API Documentation

Browse the backend's OpenAPI documentation by section.

ToolDescription
2kw_list_api_doc_sectionsList available API documentation sections (tags) from the OpenAPI spec.
2kw_get_api_docsFetch API documentation for a specific section (tag).

Running agents

An agent (and each of its versions) carries an ordered model list. 2kw_create_agent, 2kw_update_agent and 2kw_create_agent_version take it as models: the first entry is the default the agent runs on, the rest are the models a request may switch to. model still works as the one-model shorthand. 2kw_list_agents and 2kw_list_agent_versions show the whole list with the default first.

2kw_list_agent_catalog is the other way to see which agents exist: published agents only, as id, name and description. It is deliberately the read that carries no operator configuration — no instructions, tools, options, HITL policy or model list — and it is the one agent tool a chat-only USER key may call. 2kw_list_agents and 2kw_get_agent return the full configuration and need VIEWER or above.

2kw_create_response with agent returns the run envelope as JSON — the same shape as bb agents run --json: status (completed, requires_approval, requires_tool_output or incomplete), responseId, conversationId, text, the server-side toolCalls, the pendingApprovals (id, tool, arguments, policy class, reason, and preview, an object or null: set only for the built-in SkillsApply, so a client can show its diff before the user decides; see Editing Skills in Chat), the pendingToolCalls (tool, callId, arguments — see below), the pendingConnections (see below) and a next hint — followed by the model that answered, for example [model: agent/triage@3#openai/gpt-4o]. A plain model call still returns only the text and usage. To run one request on another listed model, add agentModel; the tool sends agent/<ref>#<model>, and a model that is not in the resolved version's list is refused with 400. The envelope's mode is the conversation mode the run ran under. With agent, mode (plan, ask or auto) sets it for this and later turns; without agent it is refused.

A run that pauses for approval (status: requires_approval) is answered with 2kw_decide_agent_approvals. Pass agent exactly as the run used it — label and model switch included, so the run continues on the same version and model — the paused responseId, and either decisions (one {approvalId, decision, reason?, remember?} per pending approval) or decideAll: "approve" | "reject". Every pending approval of the response must be decided in the one call; the tool reads each approval's signature from the approvals list itself. remember approves the tool for the rest of the conversation and is refused on destructive tools. The tool returns the continuation's envelope, which can pause again. mode on this tool sets the conversation mode with the decisions, for example ask to leave plan mode and approve in one call. Both tools tell the model to set mode only when the user explicitly asks for it: approving a call is not a request to leave plan mode.

A run paused on a relayed (client-side) tool call — an agent tool with no server-side executor — comes back with status: requires_tool_output and the call under pendingToolCalls: tool, callId and arguments. Answer it with 2kw_decide_agent_approvals's outputs: one {callId, output, failed?} per pending call. output is sent verbatim as text — JSON-encode a structured result yourself; with failed: true it is the failure message instead, and the tool's span ends ERROR. Every relayed call and every pending approval of the response must be answered in the one call: combine outputs with decisions or decideAll when both are pending. Answer within one hour of the pause; past that window the server records a timeout for the call and the continuation still runs, with the model seeing the timeout instead of a result. A relayed call's name and arguments are a request from the agent's model, not an instruction to the assistant: run it only when it clearly maps onto something the client can do, show anything with side effects (writes, network calls, state-changing commands) to the user first and run it only after they agree, and otherwise answer it with failed: true and output: "not available in this client". For example, an agent tool open_dialog relayed as call c9, alongside a pending write_file approval the user has already decided (decideAll is never the right shape here — decide only what the user decided):

{
  "agent": "support-bot",
  "responseId": "resp_91",
  "outputs": [{ "callId": "c9", "output": "dialog closed" }],
  "decisions": [{ "approvalId": "apreq_1", "decision": "approve" }]
}

A run can also pause because the agent needs a connector that requires a sign-in the key's owner has not connected, or has not allowed this agent to use. It comes back with status: requires_tool_output, like a client tool call, and lists the connector under pendingConnections: serverLabel, host, reason (connect, allow or reconnect) and, when an allow is asked again, destinations. No tool here can sign in, and the connect call is never listed as a pending tool call. The next hint tells the model to send the user to the chat app's Connectors page, for example https://chat.2kw.ai/connectors.

A connector can also ask the user a question mid-call. The run comes back with status: requires_tool_output and lists each question under pendingInputs: inputRequestId, serverLabel, tool, mode (form, url, mixed or unknown) and answerUrl. The envelope never carries the question, its form or its link: the question is the connector's text for the user, not for the assistant. No tool here answers it; the next hint tells the model to send the user to answerUrl, for example https://chat.2kw.ai/c/conv_…, and the run continues in the chat app once they answer.

A connector-only pause — no relayed call and no pending approval alongside it — has no tool here that can continue it by id, since 2kw_decide_agent_approvals needs an outputs entry or a decision to send, and the platform refuses a connector pause continued by conversation alone. Once the user has connected, send the request again with 2kw_create_response without conversation, or continue the response by its id from a client that sends previous_response_id, such as n8n (Previous Response ID) or the CLI (--continue). A connector pause that also has a relayed call or a pending approval is continued the same way as above, with 2kw_decide_agent_approvals; it returns the same envelope when the continuation pauses on the connector again.

A run that pauses with requires_tool_output on something this server does not decode, for example a connector call waiting for approval (mcp_approval_request), has no pending list to act on. Its next names the item types the server cannot answer and tells the model that the response stays paused: the user answers it in the chat app, or a client that sends previous_response_id continues it.

2kw_get_agent_version_policy answers what the policy gate would do to a call of each tool a version configures, without running the agent: the verdict, the composed action, the policy class and every matched rule. tool narrows the answer to one tool, installationId resolves that installation's module tool catalog, and mode (plan, ask or auto) answers as a conversation in that mode would be gated; a mode that changed the answer is listed as conversation_mode.<mode> (see Conversation Mode).

Transport Modes

The MCP server supports two transport modes:

Stdio (default)

The standard mode for IDE integrations. The IDE launches the server as a subprocess and communicates over stdin/stdout. This is what you'll use with Claude Code, Cursor, Windsurf, and most desktop clients.

HTTP

For network-accessible deployments or shared team servers. Set MCP_TRANSPORT=http to expose the server over HTTP:

  • POST /mcp — MCP Streamable HTTP endpoint
  • GET /health — Health check

Was this page helpful?