MCP Integration
Endpoints for Model Context Protocol configuration and tool discovery.
POST /api/toolkit-parse-config
Parse and normalize MCP configuration.
Authentication: Required
Request Body:
| Field | Type | Required | Description |
|---|---|---|---|
config | string or object | Yes | MCP configuration (various formats supported) |
Example Request (Claude Desktop format):
{
"config": {
"mcpServers": {
"filesystem": {
"command": "npx",
"args": ["-y", "@modelcontextprotocol/server-filesystem", "/path"]
}
}
}
}
Example Request (String format):
{
"config": "npx -y @modelcontextprotocol/server-filesystem /workspace"
}
Response:
{
"normalized": {
"type": "mcp-stdio",
"config": {
"command": "npx",
"args": ["-y", "@modelcontextprotocol/server-filesystem", "/workspace"]
}
}
}
Supported Formats:
- Claude Desktop
mcpServersJSON - Simple command strings
- Full stdio/SSE configurations
- Remote MCP URLs
POST /api/toolkits/{id}/discover
Discover tools from an MCP remote server.
Authentication: Required
Permission: toolkit:write
Path Parameters:
| Parameter | Type | Description |
|---|---|---|
id | string | Toolkit ID (must be mcp-remote type) |
Response:
{
"tools": [
{
"name": "search_repositories",
"description": "Search GitHub repositories",
"inputSchema": {
"type": "object",
"properties": {
"query": { "type": "string" },
"limit": { "type": "integer" }
}
}
},
{
"name": "create_issue",
"description": "Create a new issue",
"inputSchema": {...}
}
],
"serverInfo": {
"name": "GitHub MCP Server",
"version": "1.0.0"
}
}
Use Case:
- Create an
mcp-remotetoolkit with server URL - Call discover endpoint to query available tools
- Tools are automatically saved to toolkit
- Tools become available for AI use
Error Responses:
400 Bad Request- Toolkit is notmcp-remotetype503 Service Unavailable- MCP server unreachable500 Internal Server Error- Discovery failed
Server-Side Discovery
This endpoint performs server-side tool discovery for mcp-remote toolkits. For mcp-stdio toolkits, discovery happens client-side (Informer GO).
MCP Configuration Examples
stdio - Local Process
{
"type": "mcp-stdio",
"config": {
"command": "node",
"args": ["mcp-server.js"],
"env": {
"API_KEY": "secret"
}
}
}
SSE - Server-Sent Events
{
"type": "mcp-remote",
"config": {
"url": "https://mcp.example.com/sse",
"transport": "sse",
"headers": {
"Authorization": "Bearer token"
}
}
}
HTTP - REST API
{
"type": "mcp-remote",
"config": {
"url": "https://api.example.com/mcp",
"transport": "http",
"method": "POST",
"headers": {
"X-API-Key": "key"
}
}
}
GET /api/toolkit-drivers
Get available toolkit driver types.
Authentication: Required
Response:
{
"_links": {
"self": { "href": "/api/toolkit-drivers" }
},
"_embedded": {
"inf:toolkit-driver": [
{
"id": "mcp-stdio",
"name": "MCP stdio",
"description": "Local MCP server via subprocess"
},
{
"id": "mcp-remote",
"name": "MCP Remote",
"description": "Remote MCP server via HTTP/SSE"
},
{
"id": "custom",
"name": "Custom Tools",
"description": "User-defined custom tools"
}
]
},
"start": 0,
"count": 3,
"total": 3
}
GET /api/toolkit-templates
Get toolkit templates for creating new toolkits.
Authentication: Required
Response: Array of template objects with pre-configured settings