Poligraph MCP服务器
服务器 主控程序 (模型上下文协议)公开数据 Poligraph 作为Claude、ChatGPT和任何兼容MCP客户端的工具。
允许记者、研究人员和公民以自然语言查询法国政治数据。
快速使用
远程服务器(无安装)
服务器部署在Vercel上,可直接访问:
https://poligraph-mcp.vercel.app/mcp克劳德桌面
添加到您的文件 claude_desktop_config.json :
{
"mcpServers": {
"poligraph": {
"type": "streamable-http",
"url": "https://poligraph-mcp.vercel.app/mcp"
}
}
}克劳德代码
claude mcp add poligraph --transport http https://poligraph-mcp.vercel.app/mcpChatGPT应用程序
服务器与兼容 ChatGPT应用程序 通过MCP协议。
创建ChatGPT连接器:
- 继续 platform.openai.com > 行动 > 创建新操作
- 选择 MCP服务器 作为连接器类型
- 输入服务器URL:
https://poligraph-mcp.vercel.app/mcp- 将自动检测所有18个工具
- 在GPT或应用程序中发布操作
ChatGPT功能:
annotations:所有工具都已标记readOnlyHint: true(只读)_metaOpenAI:调用期间的状态消息(例如:“搜索政治家…”)structuredContent:除了Markdown文本之外的结构化JSON数据
安装区域设置(stdio)
git clone https://github.com/ironlam/poligraph-mcp.git
cd poligraph-mcp
npm install
npm run build在MCP客户端的配置中添加:
{
"mcpServers": {
"poligraph": {
"command": "node",
"args": ["/chemin/absolu/vers/poligraph-mcp/build/index.js"]
}
}
}Claude桌面配置文件的位置:
- macOS:
~/Library/Application Support/Claude/claude_desktop_config.json - 窗户:
%APPDATA%\Claude\claude_desktop_config.json - Linux:
~/.config/Claude/claude_desktop_config.json
可用工具(18)
政治家
| 工具 | 说明 |
|---|---|
search_politicians | 按姓名、政党或授权类型搜索政治家 |
get_politician | 完整文件:授权、资产申报、业务 |
get_politician_relations | 关系:同一政党、政府、立法机构、部门 |
司法事务
| 工具 | 说明 |
|---|---|
list_affairs | 带过滤器的法院案件列表(状态、类别) |
get_politician_affairs | 政治家的法庭案件,包括来源和细节 |
议会投票
| 工具 | 说明 |
|---|---|
list_votes 议会选举(国民议会和参议院) | |
get_politician_votes | 具有参与统计数据的议员投票 |
get_vote_stats | 按政党划分的投票统计:凝聚力、分裂投票 |
授权
| 工具 | 说明 |
|---|---|
list_mandates | 政治任务清单(类型、机构、有效/终止状态) |
政党
| 工具 | 说明 |
|---|---|
list_parties | 具有过滤器的缔约方列表(位置、活动/解散状态) |
get_party | 完整记录:成员、亲子关系、政治立场 |
事实核查
| 工具 | 说明 |
|---|---|
list_factchecks | 事实检查(事实AFP、解码器等) |
get_politician_factchecks | 提到特定政治家的事实检查 |
选举
| 工具 | 说明 |
|---|---|
list_elections | 带过滤器的法国选举(类型、状态、年份) |
get_election | 详情:申请、结果、参与 |
地理
| 工具 | 说明 |
|---|---|
get_department_stats | 按部门分列的统计数据:当选官员、占主导地位的政党、分布情况 |
get_deputies_by_department | 特定部门的现任议员 |
研究
| 工具 | 说明 |
|---|---|
search_advanced | 使用组合过滤器(部门、状态等)进行高级搜索 |
建筑
src/
├── index.ts # Point d'entrée CLI (transport stdio)
├── server.ts # Factory MCP server & enregistrement des tools
├── http.ts # Serveur Express (transport HTTP Streamable)
├── api.ts # Client API (https://poligraph.fr)
├── tools/
│ ├── politicians.ts
│ ├── affairs.ts
│ ├── votes.ts
│ ├── legislation.ts
│ ├── factchecks.ts
│ ├── parties.ts
│ ├── elections.ts
│ ├── mandates.ts
│ └── departments.ts
└── tests/
└── api-contract.test.ts
api/
└── mcp.ts # Handler Vercel (serverless)支持的运输:
- 标准 --克劳德桌面/克劳德代码本地
- HTTP 流式传输 -Express或Vercel服务器,支持ChatGPT操作
发展
npm run dev # Compilation en mode watch
npm run build # Build production
npm run start:http # Serveur HTTP local (port 3001)
npm run inspect # Tester interactivement avec MCP Inspector
npm run test:build # Build + tests de contrat API数据来源
所有数据均来自官方来源:
看 poligraph.fr/来源 以获取完整列表。
许可证
麻省理工学院
