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.
Authentication
Section titled “Authentication”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.
How the OAuth sign-in works
Section titled “How the OAuth sign-in works”- Add
https://mcp.911cpb.org/mcpas a connector in the client. Leave client ID and secret blank; the client registers itself. - A browser window opens on the Authorize page, showing the client’s name and where it will redirect.
- Paste the 911CPB-MCP access key and click Approve.
- The client gets a 1-hour access token, which it refreshes automatically.
claude.ai and Claude Desktop
Section titled “claude.ai and Claude Desktop”Settings → Connectors → Add custom connector, then enter the URL https://mcp.911cpb.org/mcp. Click Connect and approve on the Authorize page.
ChatGPT
Section titled “ChatGPT”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.
MCP clients
Section titled “MCP clients”Most MCP clients take the same JSON shape. Replace <token> with your token.
Cursor
Section titled “Cursor”~/.cursor/mcp.json (global) or .cursor/mcp.json (project):
{ "mcpServers": { "postgres": { "url": "https://mcp.911cpb.org/mcp", "headers": { "Authorization": "Bearer <token>" } } }}VS Code (GitHub Copilot agent mode)
Section titled “VS Code (GitHub Copilot agent mode)”.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}" } } }}Windsurf
Section titled “Windsurf”~/.codeium/windsurf/mcp_config.json:
{ "mcpServers": { "postgres": { "serverUrl": "https://mcp.911cpb.org/mcp", "headers": { "Authorization": "Bearer <token>" } } }}Gemini CLI
Section titled “Gemini CLI”~/.gemini/settings.json:
{ "mcpServers": { "postgres": { "httpUrl": "https://mcp.911cpb.org/mcp", "headers": { "Authorization": "Bearer <token>" } } }}OpenAI Codex CLI
Section titled “OpenAI Codex CLI”~/.codex/config.toml:
[mcp_servers.postgres]url = "https://mcp.911cpb.org/mcp"bearer_token_env_var = "PG_MCP_TOKEN"Clients that only support stdio
Section titled “Clients that only support stdio”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.
Agent SDKs and APIs
Section titled “Agent SDKs and APIs”OpenAI Responses API
Section titled “OpenAI Responses API”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?",});Claude API
Section titled “Claude API”See Use from a webapp.
Vercel AI SDK
Section titled “Vercel AI SDK”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 / streamTextLangChain / LangGraph (Python)
Section titled “LangChain / LangGraph (Python)”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()Agents without MCP
Section titled “Agents without MCP”Custom GPTs and other OpenAPI importers
Section titled “Custom GPTs and other OpenAPI importers”- Import the schema from
https://mcp.911cpb.org/openapi.json. - Set authentication to API Key, type Bearer, and paste the token. If the platform only supports a custom header, use
X-API-Key.
Plain function calling
Section titled “Plain function calling”Define three functions that POST JSON to the REST endpoints. See the REST API reference.
Docs for agents
Section titled “Docs for agents”This site publishes machine-readable docs following the llms.txt convention:
/llms.txt: index/llms-full.txt: every page as one plain-text file/llms-small.txt: condensed version
Point an agent at /llms-full.txt to give it everything it needs to use 911CPB-MCP.