Connect an AI assistant (MCP)
Policy Eagle runs a remote Model Context Protocol server at https://www.policyeagle.org/mcp (Streamable HTTP). It uses the same API key as the REST API, sent as Authorization: Bearer …. It doesn't use OAuth, so your client must let you set that header.
Tools
| Tool | What it does |
|---|---|
list_sessions | Florida sessions with ids; marks the current one. |
search_bills | Bills in a session by chamber, number, title words, stage, progress, topic or recent movement. Returns ids, a total and a cursor. |
get_bill | One bill by session_id and bill_id. |
get_bill_actions | The bill's history, oldest first. |
All tools are read-only. Each MCP request counts against your rate limit, including connecting and listing tools.
Client setup
Set POLICY_EAGLE_API_KEY in your environment first (see the quickstart).
Claude Code
Run in a terminal:
claude mcp add --transport http --scope user policy-eagle https://www.policyeagle.org/mcp \
--header "Authorization: Bearer $POLICY_EAGLE_API_KEY"The shell fills in the key when you run this, and Claude Code saves it in ~/.claude.json. Check with `claude mcp list`.
Codex CLI
Run in a terminal:
codex mcp add policy-eagle --url https://www.policyeagle.org/mcp \
--bearer-token-env-var POLICY_EAGLE_API_KEYOr add to ~/.codex/config.toml: [mcp_servers.policy-eagle] url = "https://www.policyeagle.org/mcp" bearer_token_env_var = "POLICY_EAGLE_API_KEY" Codex reads the key from the environment each time it starts.
OpenCode
Add to opencode.json (project) or ~/.config/opencode/opencode.json:
{
"$schema": "https://opencode.ai/config.json",
"mcp": {
"policy-eagle": {
"type": "remote",
"url": "https://www.policyeagle.org/mcp",
"enabled": true,
"oauth": false,
"headers": {
"Authorization": "Bearer {env:POLICY_EAGLE_API_KEY}"
}
}
}
}`oauth: false` stops OpenCode from trying OAuth; the key comes from the environment. Check with `opencode mcp list`.
Other clients
Any client that accepts an HTTP header:
{
"mcpServers": {
"policy-eagle": {
"type": "http",
"url": "https://www.policyeagle.org/mcp",
"headers": {
"Authorization": "Bearer ${POLICY_EAGLE_API_KEY}"
}
}
}
}Compatibility
| Client | Status |
|---|---|
| Claude Code | Configuration above; not yet verified |
| Codex CLI | Configuration above; not yet verified |
| OpenCode | Configuration above; not yet verified |
| Claude (desktop and web connectors) | Not yet verified: custom connectors may not accept a static header |
| ChatGPT | Not yet verified: connectors may not accept a static header |
Don't paste your key into a field that isn't meant for secrets, such as a server name, URL or chat message.
Try it
Ask: “Using Policy Eagle, find education bills in the current Florida session that became law, then show the history of one of them.”
The assistant should call list_sessions, then search_bills with a category and stage, then get_bill_actions.
Troubleshooting
- 401: the header is missing, or the key is wrong, expired or revoked. Check with
curl … /api/v1/me. - 403 “Origin not allowed”: browser-based clients must run from an allowed site. Desktop and CLI clients aren't affected.
- 429: rate limit reached; wait and retry.
- 405 on GET: expected. The server answers POST only and keeps no sessions.
To disconnect, remove the server from your client and revoke the key in your account.