Skip to main content

MCP Server for Builders

The Zihin Central LLM Server includes a built-in MCP (Model Context Protocol) Server that allows builders to manage agents, schemas, triggers, and more directly from AI-powered IDEs like Claude Desktop, Cursor, or Claude Code.

Overview

The MCP Server exposes 29 tools, 3 resources, and 3 guided prompts for agent configuration.

Tools Available

CategoryToolsDescription
Agentslist-agents, get-agent, create-agent, update-agentAgent CRUD operations
Schemaslist-schemas, get-schema, create-schema, update-schemaSchema management
Triggerslist-triggers, create-trigger, update-trigger, delete-triggerWebhook configuration
Connectionslist-connections, test-connection, create-connectionDatabase connections
MCP Serverslist-mcp-servers, add-mcp-server, remove-mcp-serverExternal MCP server management
Chatchat-with-agentTest agent conversations

Resources

ResourceDescription
agentsList of all agents for the tenant
schema-templatesAvailable schema templates
modelsAvailable LLM models and pricing

Guided Prompts

PromptDescription
setup-agentStep-by-step guide to create and configure a new agent
add-toolGuide to add a tool (API, database, or MCP) to an agent
configure-webhookGuide to set up a webhook trigger for an agent

Setup

Claude Desktop / Cursor

Add the following to your MCP configuration file:

Claude Desktop (~/Library/Application Support/Claude/claude_desktop_config.json):

{
"mcpServers": {
"zihin": {
"command": "node",
"args": ["/path/to/zihin-agent-builder/server-llm/mcp-server/stdio.js"],
"env": {
"ZIHIN_API_KEY": "zhn_live_xxxxx",
"ZIHIN_BASE_URL": "https://llm.zihin.ai"
}
}
}
}

Cursor (.cursor/mcp.json):

{
"mcpServers": {
"zihin": {
"command": "node",
"args": ["/path/to/zihin-agent-builder/server-llm/mcp-server/stdio.js"],
"env": {
"ZIHIN_API_KEY": "zhn_live_xxxxx",
"ZIHIN_BASE_URL": "https://llm.zihin.ai"
}
}
}
}

HTTP Transport

For programmatic access, the MCP Server is also available via HTTP:

POST https://llm.zihin.ai/mcp

Authentication: API Key via X-Api-Key header.

Usage Examples

Create an Agent

Using the setup-agent prompt in Claude Desktop:

  1. Open Claude Desktop
  2. Select the "setup-agent" prompt
  3. Follow the guided steps to configure:
    • Agent name and description
    • LLM model and temperature
    • System prompt
    • Tools and data sources

Add a Database Tool

Using the add-tool prompt:

  1. Select the "add-tool" prompt
  2. Choose "Database Query" as the tool type
  3. Configure:
    • Connection (from available connections)
    • Query template with parameter placeholders
    • Parameter mapping from agent context

Test Your Agent

Use the chat-with-agent tool to test:

Tool: chat-with-agent
Arguments:
agent_id: "your-agent-uuid"
message: "List active contracts"

Authentication

The MCP Server uses the same API Key authentication as the REST API:

X-Api-Key: zhn_live_xxxxx

The API key determines the tenant context, so all operations are scoped to the key's tenant.