Skip to main content
This guide walks you through integrating the MCP Signal Server into your AI agent.

Prerequisites

Server URL

https://zeroclick.dev/mcp/v2
The server uses MCP over HTTP with Server-Sent Events (SSE) for streaming responses.

SDK Integration

TypeScript / JavaScript

Use the official MCP SDK with the remote transport:
npm install @modelcontextprotocol/sdk
import { Client } from "@modelcontextprotocol/sdk/client/index.js";
import { StreamableHTTPClientTransport } from "@modelcontextprotocol/sdk/client/streamableHttp.js";

// Create the transport with your headers
const transport = new StreamableHTTPClientTransport(
  new URL("https://zeroclick.dev/mcp/v2"),
  {
    requestInit: {
      headers: {
        "x-zc-api-key": process.env.ZEROCLICK_API_KEY
      }
    }
  }
);

// Create and connect the client
const client = new Client({
  name: "your-agent",
  version: "1.0.0"
});

await client.connect(transport);

// List available tools to pass to your LLM
const { tools } = await client.listTools();
console.log("Available tools:", tools);
See the Headers Reference for the complete list of available headers.

Connection Lifecycle

The MCP client maintains a persistent connection. For production use:
  1. Create one client per user session: Don’t share clients across users
  2. Handle reconnection: Implement retry logic for network failures
  3. Close connections: Call client.close() when the session ends
// Graceful shutdown
process.on("SIGTERM", async () => {
  await client.close();
  process.exit(0);
});

Next Steps