SDKs
Official client libraries and integrations for the Zihin platform.
Available Packages
| Package | Status | Install |
|---|---|---|
@zihin/agent-client | Rolling out | npm install @zihin/agent-client |
@zihin/mcp-server | Published | npx @zihin/mcp-server |
| Python SDK | Planned | pip install zihin |
Agent Client
@zihin/agent-client is the Node.js client for invoking agents — the
shared core behind the n8n, Activepieces and Zapier connectors, and the recommended way to reach Zihin
from your own backend.
import { createClient } from '@zihin/agent-client';
const zihin = createClient({ apiKey: process.env.ZIHIN_API_KEY }); // zhn_live_*
const res = await zihin.invokeAgent({ agentId, message: 'Hello' });
See the Agent Client SDK reference for the full API.
MCP Server (stdio proxy)
The @zihin/mcp-server package is a stdio-to-HTTP proxy that connects MCP clients (Claude Desktop, Cursor, Claude Code, Codex, Windsurf) to the Zihin MCP Server.
ZIHIN_API_KEY=YOUR_API_KEY npx @zihin/mcp-server
See the MCP Server page for setup instructions for each client.
REST API
For direct HTTP integration, use the REST API:
curl -X POST https://llm.zihin.ai/api/v3/llm/public/call \
-H "X-Api-Key: YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{"query": "Hello", "model": "auto"}'
See the API Overview for conventions and the full API Reference.
MCP over HTTP
For server-to-server tools and custom scripts, connect directly to the MCP HTTP endpoint without the npm package:
curl -X POST "https://llm.zihin.ai/mcp" \
-H "X-Api-Key: YOUR_API_KEY" \
-H "Content-Type: application/json" \
-H "Accept: application/json, text/event-stream" \
-d '{"jsonrpc":"2.0","id":1,"method":"initialize","params":{"protocolVersion":"2025-03-26","capabilities":{},"clientInfo":{"name":"my-app","version":"1.0"}}}'
See MCP Server - HTTP Transport for details.
No-code connectors
For no-code automation, use a Zihin connector — n8n,
Activepieces or Zapier. All of them invoke agents
through @zihin/agent-client. See the Integrations Overview to choose a path.