article
README
🚀 Congress.gov MCP服务器
你是否曾好奇美国国会在忙些什么?是否厌倦了通过阅读新闻来了解相关信息?现在,你可以直接向美国国会API询问。这是一个非官方的 Congress.gov API MCP服务器。
🚀 快速开始
本项目提供了一个非官方的MCP服务器,用于访问Congress.gov API,你可以通过它直接获取美国国会的相关信息。
📦 安装指南
通过Smithery安装
若要通过 Smithery 自动为Claude Desktop安装 congress_gov_mcp,请执行以下命令:
npx -y @smithery/cli install @AshwinSundar/congress_gov_mcp --client claude
手动安装
前提条件
- 安装 uv。在macOS和Linux上,最简单的方法是执行以下命令:
curl -LsSf https://astral.sh/uv/install.sh | sh - 获取 Congress.gov API密钥。
- 安装Claude Desktop、Claude Code或其他支持 MCP集成 的客户端。
初始设置
- 完成 前提条件。
- 克隆本仓库,并进入仓库目录:
git clone http://github.com/AshwinSundar/congress_gov_mcp cd congress_gov_mcp - 安装依赖:
uv sync - 根据模板创建
.env文件:cp .env.template .env - 将你的Congress.gov API密钥添加到
.env文件中:congress_gov_mcp/.env
CONGRESS_GOV_API_KEY="your-api-key-here"
客户端配置
Claude Desktop
- 完成 前提条件。
- 复制
uv安装的绝对路径:which uv - 将以下内容添加到Claude Desktop配置文件的
mcpServers块中:- macOS:
~/Library/Application Support/Claude/claude_desktop_config.json - Windows:
%APPDATA%\Claude\claude_desktop_config.json
{ "mcpServers": { "congress_gov_mcp": { "command": "/absolute_path/to/uv", "args": [ "run", "/absolute_path_to/congress_gov_mcp/server.py" ] } } } - macOS:
Claude Code
- 完成 前提条件。
- 将以下内容添加到运行Claude Code的目录下的
.mcp.json文件的mcpServers块中:{ "mcpServers": { "congress_gov_mcp": { "command": "uv", "args": [ "run", "/absolute_path_to/congress_gov_mcp/server.py" ] } } }
📚 详细文档
路线图
- [x] api.congress.gov
- [x] /bill
- [x] /{congress}
- [x] /{congress}/{billType}
- [x] /{congress}/{billType}/{billNumber}
- [ ] /actions
- [ ] /amendments
- [ ] /committees
- [ ] /cosponsors
- [ ] /relatedbills
- [ ] /subjects
- [ ] /summaries
- [ ] /text
- [ ] /titles
- [x] /amendment
- [x] /{congress}
- [x] /{congress}/{amendmentType}
- [x] /{congress}/{amendmentType}/{amendmentNumber}
- [ ] /actions
- [ ] /cosponsors
- [ ] /amendments
- [ ] /text
- [x] /summaries
- [x] /{congress}
- [x] /{congress}/{billType}
- [x] /congress
- [x] /{congress}
- [ ] /current
- [x] /member
- [x] /{bioguideId}
- [ ] /sponsored-legislation
- [ ] /cosponsored-legislation
- [x] /{bioguideId}
- [x] /committee
- [x] /{systemCode}
- [ ] /bills
- [ ] /reports
- [ ] /nominations
- [ ] /meetings
- [ ] /hearings
- [ ] /house-communication
- [ ] /senate-communication
- [x] /{systemCode}
- [x] /committee-report
- [x] /{congress}
- [x] /{congress}/{reportType}
- [x] /{congress}/{reportType}/{reportNumber}
- [ ] /text
- [x] /committee-print
- [x] /{congress}
- [x] /{congress}/{printType}
- [x] /{congress}/{printType}/{printNumber}
- [ ] /text
- [x] /committee-meeting
- [x] /{congress}
- [x] /{congress}/{chamber}
- [ ] /meetings
- [x] /hearing
- [x] /{congress}
- [x] /{congress}/{chamber}
- [x] /{congress}/{chamber}/{hearingNumber}
- [x] /house-vote
- [x] /{congress}
- [x] /{congress}/{session}
- [x] /{congress}/{session}/{rollCallNumber}
- [x] /congressional-record
- [x] /{volume}
- [x] /{volume}/{pagePrefix}
- [x] /{volume}/{pagePrefix}/{pageNumber}
- [x] /daily-congressional-record
- [x] /{volume}
- [x] /{volume}/{issue}
- [x] /bound-congressional-record
- [x] /{year}
- [x] /{year}/{month}
- [x] /{year}/{month}/{day}
- [x] /house-communication
- [x] /{congress}
- [x] /{congress}/{communicationType}
- [x] /{congress}/{communicationType}/{communicationNumber}
- [x] /house-requirement
- [x] /{congress}
- [x] /{congress}/{requirementNumber}
- [x] /senate-communication
- [x] /{congress}
- [x] /{congress}/{communicationType}
- [x] /{congress}/{communicationType}/{communicationNumber}
- [x] /nomination
- [x] /{congress}
- [x] /{congress}/{nominationNumber}
- [ ] /actions
- [ ] /hearings
- [x] /crsreport
- [x] /{productCode}
- [x] /treaty
- [x] /{congress}
- [x] /{congress}/{treatyNumber}
- [ ] /actions
- [ ] /committees
- [x] /bill
微信扫一扫