Skip to content
Client integrations

TypeScript

Connect and discover tools with the TypeScript MCP SDK.

Configure this client in Quick Start.

Before you start

Prepare a Node.js environment and a DINQ API Key. Install the dependencies, create search.mts, then run the command in the last step.

See Authentication and API Keys for credential options. Merge only the peoplerouter entry into an existing configuration; do not overwrite other settings.

Set up the connection

Developer settings · API Key (optional)

Stored in this browser. It is only inserted into copied examples when you enable the checkbox above.

Terminal
npm install @modelcontextprotocol/sdk@1
npm install --save-dev tsx typescript
search.mts
import { Client } from "@modelcontextprotocol/sdk/client/index.js";
import { StreamableHTTPClientTransport } from "@modelcontextprotocol/sdk/client/streamableHttp.js";

const client = new Client({ name: "my-agent", version: "1.0.0" });
await client.connect(new StreamableHTTPClientTransport(new URL("https://mcp.peoplerouter.ai"), {
  requestInit: { headers: { Authorization: "Bearer <DINQ_API_KEY>" } },
}));

const result = await client.callTool({
  name: "capabilities",
  arguments: {},
});
console.log(result.content);
await client.close();
Terminal
npx tsx search.mts
Or send this to your agent

Copy these instructions into your agent to help with setup.

paste to your agent
Connect PeopleRouter in TypeScript. Check the installed version first and use this setup:

search.mts
import { Client } from "@modelcontextprotocol/sdk/client/index.js";
import { StreamableHTTPClientTransport } from "@modelcontextprotocol/sdk/client/streamableHttp.js";

const client = new Client({ name: "my-agent", version: "1.0.0" });
await client.connect(new StreamableHTTPClientTransport(new URL("https://mcp.peoplerouter.ai"), {
  requestInit: { headers: { Authorization: "Bearer <DINQ_API_KEY>" } },
}));

const result = await client.callTool({
  name: "capabilities",
  arguments: {},
});
console.log(result.content);
await client.close();



If an API key is needed, guide me to configure it locally rather than paste it into chat. If sandbox restrictions block configuration or authorization through file, network or browser callback access, request the necessary permissions through the current agent's approval mechanism. Where outside-sandbox execution is supported, run the operation only after approval. I will complete browser authorization. Do not repeatedly retry in the same restricted environment, disable the sandbox or bypass approvals. If the environment cannot request permission, give me the exact steps to perform in my local terminal or app UI. Back up existing configuration and merge only peoplerouter, preserving other servers and settings. Check an existing entry instead of adding a duplicate. Web apps require adding the connector in their UI; guide me if you cannot do that directly. Confirm success only after tools load and capabilities succeeds; otherwise report the actual error.

This example needs an API Key. Create one in the console and enable it in developer settings. Authentication and API Keys

Official setup guide

Check the connection

The SDK / HTTP examples use the capabilities response to check the connection. The API examples may continue with a people search: review the input and tool prices before running them. An HTTP success status alone does not establish a successful tool result.

After connecting, continue to Using tools. For authentication or tool errors, read Troubleshooting and inspect the client's actual error message.