Skip to main content

MCP agents

"MCP agents" is used to register external AI platforms and control which ApiGo tools they can use through the admin-side MCP. It is a separate system from the conversational AI assistant on the AI Assistant page:

SystemLocationPurpose
Conversational AI assistantAI Assistant pageBuilt-in conversational entry point for operating the platform
MCP agentsAccount Center → MCPCredentials and tool authorization for external AI clients accessing the admin-side MCP

Agent list​

Entry: Account Center → MCP.

ColumnDescription
CodeAgent code, i.e. the {agentCode} in the MCP address
NameDisplay name of the agent
TypeWorkBuddy, Qianwen Office, Doubao, or Custom
ProjectProject the agent belongs to
StatusEnabled / disabled
Last modifiedMost recent update time
ActionsTools, MCP configuration, Reset key, Delete

The list supports filtering by keyword and type. You can toggle the enabled state directly with a switch; once disabled, all MCP requests from that agent are rejected.

Create an agent​

Creating an agent takes two steps:

1. Select a type​

TypeDescriptionDefault tools
WorkBuddyGeneral-purpose office agent9 tools, including data source query, API query, log query, and API save/release/unpublish
Qianwen OfficeQianwen Office agent4 tools for data source and API query
DoubaoDoubao agent2 API query tools
CustomGeneric MCP clientNo preset tools

The template only determines the initial tool set; after creation you can adjust it freely under "Tools".

2. Fill in the details​

FieldRequiredDescription
Agent typeYesThe type selected in the previous step; can be changed after creation
Project—Read-only, taken from the current project
CodeYes^[a-z0-9_-]{3,64}$, cannot be changed after creation, and is also used as the MCP path parameter
NameYesDisplay name of the agent
IconNoNot available in the current UI
DescriptionNoPurpose description

Choose a code that reflects the caller and purpose, for example workbuddy-dev or ops-assistant.

Agent Key​

After the agent is created, an Agent Key dialog appears:

  • The format is ak_ followed by a random string;
  • The server stores only the SHA-256 hash and an 8-character prefix; the plaintext is shown only once;
  • The dialog also provides an MCP configuration snippet for the corresponding platform;
  • If you forget the key or it leaks, click "Reset key" in the list and the old key is invalidated immediately.

The core structure of the configuration snippet:

{
"mcpServers": {
"ApiGo-Admin": {
"type": "http",
"url": "https://{your-gateway}/api/box/mcp/{agentCode}",
"headers": {
"X-Agent-Key": "{AgentKey}"
}
}
}
}

For the admin-side MCP endpoint, protocol, and error codes, see MCP access.

Tool authorization​

Click "Tools" in the list to open the tool drawer:

  • Tools are grouped by data source, API development, logs, groups, and other categories;
  • Each tool is marked as a write operation or not;
  • Supports searching by name/description, showing only selected tools, and selecting all tools in a category;
  • The footer shows the number of selected tools and the number of write tools;
  • Changes take effect in tools/list results immediately after saving.

The tool catalog contains 32 tools: 18 read-only and 14 write. Write tools trigger a second confirmation in the AI assistant; api_debug_invoke is also treated as a write operation because it may produce business side effects.

The tools actually available to an agent are also constrained by the creator's admin-side permissions. Even if a tool is bound, it does not appear in tools/list when the creator lacks the corresponding permission.

Permissions and isolation​

The admin-side MCP permission model:

  1. Agent dimension: only bound tools are exposed;
  2. Creator dimension: the creator must still be an active user and have access to the project the agent belongs to;
  3. Project dimension: all tool calls execute in the context of the agent's project and cannot access resources across projects;
  4. State dimension: a disabled agent, a reset key, or an invalid creator all cause calls to fail.

An agent is therefore not a super account: it inherits the creator's permissions within its project and is further narrowed to the bound tool set.

Invocation and management​

  • External clients use POST /api/box/mcp/{agentCode} with the X-Agent-Key header;
  • Supports initialize, tools/list, and tools/call;
  • Each successful authentication refreshes the last active time;
  • Call records are written to the agent call log, including the tool, parameter summary, result, and execution time;
  • Deleting an agent also deletes its tool bindings and key; the operation cannot be undone.

FAQ​

SymptomCauseResolution
Client reports a missing API keyX-Agent-Key is not sentAdd the Agent Key to the request headers
Agent does not existagentCode is wrong or the agent has been deletedCheck the code in the list
Agent is disabledThe status switch is offEnable it in the list
Key is invalidThe key was reset or copied incompletelyUse the latest key
Tool list is emptyNo tools are bound, or the creator lacks the corresponding permissionsBind tools in the tool drawer and check the creator's permissions
Tool call reports no permissionThe creator lost project accessRestore project permissions or recreate the agent