Skip to main content

MCP skills API

Manage skill-embedded MCP servers that provide additional tools to agents. Each skill can bundle its own MCP server with a set of tools. Activate a skill’s MCP server on demand and deactivate it when no longer needed.
All MCP skill endpoints require session-based authentication through NextAuth. Idle MCP servers are automatically cleaned up.

Activate a skill MCP

POST /api/mcp/:skillId
Starts the MCP server bundled with the specified skill. Returns the server metadata including its name, version, available tools, and activation timestamp.

Path parameters

ParameterTypeRequiredDescription
skillIdstringYesIdentifier of the skill whose MCP server to activate

Built-in skills

The following skills ship with built-in MCP servers:
Skill IDDescription
websearchWeb search tool server
context7Context retrieval and semantic search
grep_appCode search using grep patterns

Response

{
  "success": true,
  "skillId": "websearch",
  "mcp": {
    "name": "websearch-mcp",
    "version": "1.0.0",
    "tools": ["web_search", "web_fetch"],
    "startedAt": "2026-04-04T12:00:00.000Z"
  }
}
FieldTypeDescription
successbooleanWhether activation succeeded
skillIdstringThe skill that was activated
mcp.namestringMCP server name from the skill configuration
mcp.versionstringMCP server version
mcp.toolsstring[]List of tool names provided by this MCP server
mcp.startedAtstringISO 8601 timestamp of when the server was started

Errors

CodeDescription
401Unauthorized — no valid session
500Failed to activate MCP. The error message describes the failure (for example, skill not found or server failed to start).

Deactivate a skill MCP

DELETE /api/mcp/:skillId
Stops the MCP server for the specified skill and frees its resources.

Path parameters

ParameterTypeRequiredDescription
skillIdstringYesIdentifier of the skill whose MCP server to deactivate

Response

{
  "success": true,
  "skillId": "websearch",
  "message": "MCP deactivated"
}
FieldTypeDescription
successbooleanWhether deactivation succeeded
skillIdstringThe skill that was deactivated
messagestringConfirmation message

Errors

CodeDescription
401Unauthorized — no valid session
500Failed to deactivate MCP. The error message describes the failure.

Automatic idle cleanup

MCP servers that remain idle are automatically deactivated to free resources. You do not need to manually deactivate servers that are no longer in use, though explicit deactivation is recommended when you know a skill’s tools are no longer needed.