Skip to content

Connect any agent

911CPB-MCP works with any AI agent through one of two interfaces:

Interface URL Use when
MCP (Streamable HTTP) https://mcp.911cpb.org/mcp The agent or IDE supports remote MCP servers
REST + OpenAPI https://mcp.911cpb.org/api/*, spec at /openapi.json The agent supports HTTP or OpenAPI tools but not MCP

Both expose the same three tools (list_tables, describe_table, query) with the same query rules.

The MCP endpoint accepts two kinds of credentials:

Method Works on Use when
OAuth 2.1 (sign in through a browser) /mcp The client has an “add connector” flow with no place to paste a header: claude.ai, Claude Desktop, ChatGPT, Cursor’s OAuth mode
Access key in Authorization: Bearer <token> or X-API-Key: <token> /mcp and /api/* The client lets you set headers: IDEs, CLIs, SDKs, scripts, OpenAPI importers

The OpenAPI spec (/openapi.json) is public so agent platforms can import it. Every tool call needs a credential.

  1. Add https://mcp.911cpb.org/mcp as a connector in the client. Leave client ID and secret blank; the client registers itself.
  2. A browser window opens on the Authorize page, showing the client’s name and where it will redirect.
  3. Paste the 911CPB-MCP access key and click Approve.
  4. The client gets a 1-hour access token, which it refreshes automatically.

Settings → Connectors → Add custom connector, then enter the URL https://mcp.911cpb.org/mcp. Click Connect and approve on the Authorize page.

Settings → Apps & Connectors → Create (developer mode), set the MCP server URL to https://mcp.911cpb.org/mcp and authentication to OAuth, then approve on the Authorize page.

Most MCP clients take the same JSON shape. Replace <token> with your token.

~/.cursor/mcp.json (global) or .cursor/mcp.json (project):

{
"mcpServers": {
"postgres": {
"url": "https://mcp.911cpb.org/mcp",
"headers": { "Authorization": "Bearer <token>" }
}
}
}

.vscode/mcp.json. The inputs prompt keeps the token out of the file:

{
"inputs": [{ "id": "pg-token", "type": "promptString", "description": "911CPB-MCP token", "password": true }],
"servers": {
"postgres": {
"type": "http",
"url": "https://mcp.911cpb.org/mcp",
"headers": { "Authorization": "Bearer ${input:pg-token}" }
}
}
}

~/.codeium/windsurf/mcp_config.json:

{
"mcpServers": {
"postgres": {
"serverUrl": "https://mcp.911cpb.org/mcp",
"headers": { "Authorization": "Bearer <token>" }
}
}
}

~/.gemini/settings.json:

{
"mcpServers": {
"postgres": {
"httpUrl": "https://mcp.911cpb.org/mcp",
"headers": { "Authorization": "Bearer <token>" }
}
}
}

~/.codex/config.toml:

[mcp_servers.postgres]
url = "https://mcp.911cpb.org/mcp"
bearer_token_env_var = "PG_MCP_TOKEN"

Bridge with mcp-remote:

{
"mcpServers": {
"postgres": {
"command": "npx",
"args": ["-y", "mcp-remote", "https://mcp.911cpb.org/mcp", "--header", "Authorization:Bearer ${PG_MCP_TOKEN}"],
"env": { "PG_MCP_TOKEN": "<token>" }
}
}
}

Client config formats change often, so check each client’s MCP docs if a field name is rejected.

import OpenAI from "openai";
const client = new OpenAI();
const response = await client.responses.create({
model: "gpt-5",
tools: [
{
type: "mcp",
server_label: "postgres",
server_url: "https://mcp.911cpb.org/mcp",
headers: { Authorization: `Bearer ${process.env.PG_MCP_TOKEN}` },
require_approval: "never",
},
],
input: "How many devices are there?",
});

See Use from a webapp.

import { experimental_createMCPClient as createMCPClient } from "ai";
const mcp = await createMCPClient({
transport: {
type: "http",
url: "https://mcp.911cpb.org/mcp",
headers: { Authorization: `Bearer ${process.env.PG_MCP_TOKEN}` },
},
});
const tools = await mcp.tools(); // pass to generateText / streamText
from langchain_mcp_adapters.client import MultiServerMCPClient
client = MultiServerMCPClient({
"postgres": {
"transport": "streamable_http",
"url": "https://mcp.911cpb.org/mcp",
"headers": {"Authorization": f"Bearer {token}"},
}
})
tools = await client.get_tools()
  1. Import the schema from https://mcp.911cpb.org/openapi.json.
  2. Set authentication to API Key, type Bearer, and paste the token. If the platform only supports a custom header, use X-API-Key.

Define three functions that POST JSON to the REST endpoints. See the REST API reference.

This site publishes machine-readable docs following the llms.txt convention:

Point an agent at /llms-full.txt to give it everything it needs to use 911CPB-MCP.