Connect an MCP client
Connect an MCP 2026-07-28 client to GridRouter over stateless Streamable HTTP.
Before you start
The GridRouter MCP server is at:
https://mcp.gridrouter.io/mcpGridRouter implements MCP 2026-07-28 stateless Streamable HTTP. Earlier clients that require the
initialize handshake cannot connect. Add the URL to a client that supports this protocol revision;
the exact configuration format depends on the client:
{
"mcpServers": {
"gridrouter": { "url": "https://mcp.gridrouter.io/mcp" }
}
}Sign in with OAuth
Clients that support MCP authorization send you to GridRouter on first use. Sign in and approve,
and the client is granted access to your active workspace. The grant can never exceed your role:
developers cannot grant key or agent management, and billing and viewer members grant read scopes
only. Each grant appears as a key named mcp: <client name> in Settings → API keys, where you can
revoke it.
Access tokens last an hour and refresh for 30 days. A reused refresh token revokes the grant.
Headless clients: use an API key
Scripts, CI and clients without OAuth send a GridRouter API key instead. The Agent / MCP key preset has the scopes most agents need.
{
"mcpServers": {
"gridrouter": {
"url": "https://mcp.gridrouter.io/mcp",
"headers": { "Authorization": "Bearer ${GRID_API_KEY}" }
}
}
}Try it
Ask the client to find a work email. It should call catalog_search to find an endpoint, then
run with people.email.find. The built-in find_verified_email prompt does exactly that and
verifies the result.
The MCP reference lists every tool, its REST equivalent and the scope it needs.
TypeScript client
For a native TypeScript client, install the MCP SDK and a TypeScript runner:
npm install @modelcontextprotocol/client@2.2.0 tsxSet GRID_API_KEY in your environment, then save and run this as connect.mts:
import { Client, StreamableHTTPClientTransport } from "@modelcontextprotocol/client";
const apiKeyFromEnv = process.env.GRID_API_KEY;
if (!apiKeyFromEnv) throw new Error("Set GRID_API_KEY in the environment.");
const client = new Client(
{ name: "gridrouter-example", version: "1.0.0" },
{ versionNegotiation: { mode: "auto" } },
);
const transport = new StreamableHTTPClientTransport(new URL("https://mcp.gridrouter.io/mcp"), {
authProvider: { token: async () => apiKeyFromEnv },
});
try {
await client.connect(transport);
const { tools } = await client.listTools();
console.log(tools.map(({ name }) => name));
} finally {
await client.close();
}Run the example with:
npx tsx connect.mtsThe client negotiates the modern protocol before listing tools. This example only discovers tools; it does not call a vendor.
Next