Congress.gov API MCP Server logo

Congress.gov API MCP Server

by bsmi021

This is a Model Context Protocol (MCP) server providing access to the official Congress.gov API (v3). It allows MCP clients to easily query and utilize U.S. legislative data through standardized URIs and tools.

View on GitHub

Last updated: N/A

What is Congress.gov API MCP Server?

The Congress.gov API MCP Server is a bridge between the Congress.gov API (v3) and MCP clients. It provides standardized access to legislative data using MCP resources for direct lookups and MCP tools for complex operations like searching and retrieving related data.

How to use Congress.gov API MCP Server?

First, install dependencies and set your Congress.gov API key in a .env file. Build and run the server. Then, connect your MCP client and use access_mcp_resource for direct lookups with URIs like congress-gov://bill/117/hr/3076. For complex queries, use use_mcp_tool with tools like congress_search to find entity IDs and congress_getSubResource to get related data. A two-step process using both tools is mandatory for many common tasks.

Key features of Congress.gov API MCP Server

  • Provides access to Congress.gov API (v3)

  • Uses Model Context Protocol (MCP)

  • Offers MCP Resources for direct lookups

  • Includes MCP Tools for complex operations

  • Supports searching across collections

  • Enables retrieving related data lists

  • Standardized URIs for accessing legislative entities

Use cases of Congress.gov API MCP Server

  • Querying U.S. legislative data with AI assistants

  • Integrating legislative data into development tools

  • Building applications that require access to Congress.gov API

  • Automating legislative research

  • Accessing information about bills, members, committees, and congresses

FAQ from Congress.gov API MCP Server

How do I get a Congress.gov API key?

You can sign up for a key at https://api.data.gov/signup/

What is the two-step process for finding entities and getting related data?

First, use congress_search to find the entity ID. Then, use congress_getSubResource with the ID to fetch related details.

Why is filtering by congress not supported in congress_search?

The underlying Congress.gov API does not support filtering general searches by congress. Congress-specific filtering usually requires using specific API paths.

What happens if I use an invalid subResource with congress_getSubResource?

Providing an invalid combination of parentUri and subResource will cause an error.

How do I run the server in development mode?

Use the command npm run dev.