MCP API
Endpoints for managing Model Context Protocol (MCP) servers.
What is an MCP Server?
In Dwizi, an "MCP Server" is a logical grouping of Tools, Resources, and Prompts exposed under a single endpoint. This allows you to give an AI agent access to a specific set of capabilities with one URL.
Create MCP Server
Define a new group of tools.
POST /v1/mcp
Request Body:
{
"name": "Customer Support Kit",
"toolIds": ["tool_id_1", "tool_id_2"],
"resources": [
// Static resource definitions
{
"uri": "resource://docs/faq",
"name": "FAQ",
"content": "..."
}
],
"prompts": [
// Static prompt templates
{
"name": "triage-ticket",
"description": "Analyze a support ticket",
"arguments": [
{ "name": "ticketBody", "required": true }
]
}
]
}
List MCP Servers
GET /v1/mcp
Get MCP Server
GET /v1/mcp/:id
JSON-RPC Endpoint
This is the standard MCP entry point that AI clients connect to.
POST /mcp/:slug
Headers:
Authorization: Bearer <mcp_token>
Supported Methods:
initialize: Handshake.tools/list: Returns the tools grouped in this server.tools/call: Executes a tool.resources/list: Lists defined resources.resources/read: Reads a specific resource.prompts/list: Lists defined prompts.prompts/get: Retrieves a prompt.
This endpoint is fully compliant with the Model Context Protocol specification.