cdgmcp
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@cdgmcp What bills were introduced in the House yesterday?"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
cdgmcp
A Model Context Protocol (MCP) server that exposes a Congress.gov-style legislative GraphQL API to MCP clients (such as VS Code, Claude Desktop, or other agents). It provides high-level tools for querying bills, actions, committee activities and cosponsors, plus a raw GraphQL escape hatch for advanced queries.
Features
Tools
Tool | Description |
| Search/list bills with filters (congress, chamber, type, title, latest action, dates, sponsor). |
| Fetch a single bill's full details, with optional actions, cosponsors, committee activities, titles and text versions. |
| Find committee referrals/activities and their related bills. |
| Search the legislative action history (e.g. "Passed House", "Became Public Law"). |
| Search cosponsorship records across bills. |
| Fetch any object directly by its Relay global |
| Run an arbitrary read-only GraphQL query (mutations rejected). |
The API is built with Hot Chocolate 16.2.0 and follows Relay conventions. The
search tools are connection-based: each returns pageInfo.endCursor, which you
can pass back as the after argument to fetch the next page.
Resources
URI | Description |
| The live GraphQL schema (SDL). |
| Data model and usage guide. |
| The configured GraphQL endpoint. |
Related MCP server: CongressMCP-full
Example questions it can answer
What bills have been recently introduced in the House or Senate?
What bills have passed the House or Senate and became law recently?
What bills have been referred to the Commerce Committee recently?
Of the bills referred to the Agriculture Committee, which cosponsors recur across them?
Configuration
The GraphQL endpoint defaults to http://dotnet10-dev:5208/graphql/. Override
it with the CDG_GRAPHQL_ENDPOINT environment variable.
Build & run
npm install
npm run build
npm start # or: node dist/index.jsFor development (no build step) use:
npm run dev # runs src/index.ts via tsxUse with VS Code
Add to your .vscode/mcp.json (or user mcp.json):
{
"servers": {
"cdgmcp": {
"command": "node",
"args": ["${workspaceFolder}/cdgmcp/dist/index.js"],
"env": {
"CDG_GRAPHQL_ENDPOINT": "http://dotnet10-dev:5208/graphql/"
}
}
}
}The server communicates over stdio.
This is supposed to be a standalone testing something, but I haven't seen it work.
HOST=0.0.0.0 npx @modelcontextprotocol/inspector node dist/index.jsAvailable Tools
7 toolsget_billGet bill detailsA
Fetch a single bill's full details. Identify it either by cdgId or by the combination of congress + billType + number. Optionally include related actions, cosponsors, committee activities, titles and text versions.
Inputs: cdgId, congress, billType, number, +5 more.
get_nodeFetch an object by Relay global IDA
Fetch any object directly by its Relay global id (the opaque id field returned on Bills, Actions, CommitteeActivities, Cosponsors, BillTitles and TextVersions). Returns the concrete type's fields. Use this when you already have a node's global id; to look a bill up by congress/type/number use get_bill instead.
Inputs: id (required).
graphql_queryRun a raw GraphQL queryA
Execute an arbitrary read-only GraphQL query against the legislative API. Use this for complex questions the specialised tools do not cover (e.g. cross-referencing committee activities with bill cosponsors). Read the 'cdg://schema' resource for the full schema. Mutations are rejected.
Inputs: query (required), variables.
search_actionsSearch bill actionsA
Search the legislative action history across bills. Use this to find events like 'Passed House', 'Passed Senate', 'Became Public Law', or to inspect actions by type/code. Each result includes the related bill.
Inputs: textContains, actionType, actionCode, actionDateAfter, +5 more.
search_billsSearch billsA
Search and list bills/resolutions with flexible filters. Use this for questions like 'bills recently introduced in the House', 'bills that became law recently' (latestActionContains: 'Became Public Law'), or 'bills that passed the Senate' (latestActionContains: 'Passed Senate'). Results are paginated; increase 'limit' (max 50) for more.
Inputs: congress, billType, originChamber, titleContains, +10 more.
search_committee_activitiesSearch committee activitiesA
Find committee activities (e.g. referrals) and the bills they relate to. Use this for questions like 'bills referred to the Commerce Committee recently' (committeeNameContains: 'Commerce', activityNameContains: 'Referred'). Each result includes the related bill summary.
Inputs: committeeNameContains, committeeCode, chamber, activityNameContains, +4 more.
search_cosponsorsSearch cosponsorsA
Search bill cosponsorship records across bills. Useful for finding all the bills a member has cosponsored, or analysing cosponsorship by state/party. To get the cosponsors of a specific bill, prefer get_bill with includeCosponsors: true.
Inputs: bioguideId, fullNameContains, state, party, +5 more.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 7 tools
Each tool targets a distinct entity or operation: bill lookup, generic node fetch, arbitrary GraphQL queries, and searches for actions, bills, committees, and cosponsors. No two tools have overlapping purposes.
Most tools follow a clear verb_noun pattern (e.g., get_bill, search_actions), but graphql_query breaks this by using a noun_noun format. Overall naming is still consistent and predictable.
Seven tools is well-scoped for the legislative domain, covering core entities (bills, actions, committees, cosponsors) plus a generic query tool. Not too many or too few.
The tool set covers bill retrieval, search, and relational data (actions, committees, cosponsors). The graphql_query tool fills any gaps, making the surface effectively complete for read-only legislative data access.
Related MCP Connectors
Access U.S. congressional data (bills, votes, members, committees) via MCP.
An MCP server that provides congressional transcripts
GovTrack MCP — federal US Congress data (free, no auth)
Congress MCP — US Congress bill/law/member data via the official congress.gov API (Library of…
Related MCP Servers
- AlicenseNot gradedqualityFmaintenanceAn MCP server for the Congress.gov API that consolidates 91 operations into 6 comprehensive legislative tools that can be used by any MCP client (i.e. Claude Desktop), or MCP-compatible AI agent, to query and reason about congressional data.12 npm1JavaScriptMIT
- AlicenseAqualityCmaintenanceThe open Congress.gov MCP server. Provides comprehensive access to the Congress.gov API through 6 organized toolsets, enabling AI systems to retrieve and interact with legislative data from the United States Congress with a clean, unified interface.2448 PyPI36Sustainable Use v1.0
- AlicenseNot gradedqualityDmaintenanceEnables querying U.S. legislative data from Congress.gov API using MCP resources for direct lookups and tools for searching and retrieving related data.8MIT
- AlicenseNot gradedqualityCmaintenanceEnables querying legislative data from the LegiScan API, including bills and votes, via natural language through an MCP gateway.260 npmMIT