关于 tenderapi-mcp
tenderapi-mcp 将 TenderAPI 的法国 BOAMP 和欧盟 TED 公共采购数据封装为 MCP 工具,供 AI Agent 查询招标与中标信息。它提供免密托管入口,也可本地运行以使用完整工具集。
主要功能
- 01搜索 BOAMP 与 TED 招标
- 02按编号获取招标详情
- 03搜索和查看中标公告
- 04汇总中标企业统计
- 05管理新招标提醒配置
适用场景
- 01按地区、预算或截止日期筛选招标
- 02核查单条招标或中标公告
- 03比较特定类别或地区的中标企业
- 04设置新招标的邮件或 webhook 提醒
MCP 相关
向 MCP 客户端公开 TenderAPI 的招标、授标、赢家统计和提醒配置工具。托管端点无需密钥但功能受限;本地服务器需配置 API key。
配置
远程服务无需本地安装。选择你使用的客户端,复制配置或使用一键安装。
https://tenderapi.fr/mcpclaude mcp add --transport http idnsidns-tenderapi https://tenderapi.fr/mcp{"mcpServers":{"idnsidns-tenderapi":{"type":"http","url":"https://tenderapi.fr/mcp"}}}在 Cursor 中打开{"servers":{"idnsidns-tenderapi":{"type":"http","url":"https://tenderapi.fr/mcp"}}}在 VS Code 中打开{"mcpServers":{"idnsidns-tenderapi":{"type":"http","url":"https://tenderapi.fr/mcp"}}}{"mcpServers":{"idnsidns-tenderapi":{"serverUrl":"https://tenderapi.fr/mcp"}}}命令在终端中运行;JSON 粘贴到对应客户端的 MCP 配置后重启。需要授权的服务会在首次连接时提示登录。
工具
3| 参数 | 类型 | 必填 | 说明 |
|---|---|---|---|
| cpv | any | 否 | 8 位数字的精确 CPV 代码,例如服务信息技术的 '72000000'。约 40% 的 BOAMP 公告没有 CPV 代码:仅使用 CPV 筛选会将其排除。 |
| page | integer | 否 | 页码,从 1 开始。 |
| sort | any | 否 | 'date'(按时间倒序,默认)、'relevance'(BM25 排序)或 'deadline'(截止日期最近的排在前面,没有截止日期的公告排在最后)。'relevance' 仅在设置 keyword 时有意义;未设置时会被拒绝。'deadline' 应与 status='open' 或 deadline_after 搭配,否则列表开头会是数年前已截止的公告。 |
| region | any | 否 | 法国大区的 slug,例如 'bretagne'、'ile-de-france'、'occitanie'。未知值会导致错误,并提示最接近的 slug。 |
| source | any | 否 | 'boamp'(法国公告)或 'ted'(欧洲公告)。未指定时搜索两者。 |
| status | any | 否 | 'open'(截止日期尚未过期,按请求时刻判断)或 'closed'。⚠️ 不使用此筛选条件时,搜索范围将涵盖自 2015 年以来的全部数据,包括已截止的公告(约 290 万条):如果要查找仍可提交投标的公告,请设置 'open'。 |
| country | any | 否 | 2 个字母的 ISO 国家代码,例如 'FR'、'DE'、'ES'。适用于仅保留法国数据('FR')或在 TED 数据集中筛选特定国家。 |
| keyword | any | 否 | 对标题和描述进行全文搜索,不区分重音符号。同一条公告中必须包含所有词语:请先搜索单个词语,再逐步细化。支持 FTS5 的 OR 运算符,例如 'BIM OR "maquette numerique"'。 |
| page_size | integer | 否 | 每页公告数,默认 10 条;匿名访问时上限为 20 条。每条公告约 1,300 个字符;只有在打算全部阅读时才将其提高到 20 条。 |
| budget_max | any | 否 | 欧元计的最高金额。 |
| budget_min | any | 否 | 欧元计的最低金额。除非 include_null_budget=true,否则会排除未填写预算的公告。 |
| cpv_family | any | 否 | 2 位 CPV 前缀,例如“72”表示所有 IT,“45”表示工程。 |
| department | any | 否 | 部门代码,例如“35”、“2A”、“974”。多个值以逗号分隔。 |
| buyer_siret | any | 否 | 采购方的 SIRET,必须恰好为 14 位数字(机构代码,而非企业代码)。 |
| descripteur | any | 否 | BOAMP 描述符代码(DILA 术语表),是法国方面 CPV 的替代项。 |
| buyer_keyword | any | 否 | 采购方名称片段,至少 3 个字符,例如“metropole”、“CHU”。 |
| contract_type | any | 否 | 'services'、'works' 或 'supplies'。也接受法语形式 'travaux' 和 'fournitures' 作为别名。 |
| deadline_after | any | 否 | 提交截止日期晚于此 ISO 日期(AAAA-MM-JJ)。 |
| procedure_type | any | 否 | 程序类型,例如 'open'、'restricted'、'negotiated'。未知值将导致错误,并列出可接受的值。 |
| deadline_before | any | 否 | 提交截止日期早于此 ISO 日期(AAAA-MM-JJ)。 |
| published_after | any | 否 | 在此 ISO 日期(AAAA-MM-JJ)之后发布。这是每日监控的筛选条件。 |
| include_planning | boolean | 否 | 包含预告公告(仅计划采购、尚未开放的市场)。默认排除。 |
| published_before | any | 否 | 在此 ISO 日期(AAAA-MM-JJ)之前发布。 |
| include_null_budget | boolean | 否 | 即使设置了金额筛选条件,也保留未填写预算的公告。许多 BOAMP 公告不公布金额。 |
| include_null_deadline | boolean | 否 | 即使设置了截止日期筛选条件,也保留没有截止日期的公告。否则,deadline_* 筛选条件会静默排除这些公告。 |
详细介绍
TenderAPI MCP 服务
将 TenderAPI(法国 BOAMP + 欧盟 TED 公共采购数据)封装为 MCP 工具,供 AI Agent 使用(Claude Desktop、Cursor、Continue、Zed 等)。
这是对 https://tenderapi.fr 公共 REST API 的轻量封装。
覆盖范围:自 2015 年 3 月起的 BOAMP(法国),以及自 2015 年起的 TED(覆盖 FR/DE/IT/ES/UK;2023 年底之前采用旧版 XML 格式,之后采用 eForms),每日更新。
两种使用方式
1. 托管服务 — 无需安装,无需密钥
最快的试用方式。将任意 MCP 客户端指向托管端点:
https://tenderapi.fr/mcp
Claude Desktop / Claude Code:
{
"mcpServers": {
"tenderapi": {
"type": "streamable-http",
"url": "https://tenderapi.fr/mcp"
}
}
}
提供 search_tenders 和 get_tender。**匿名免费使用,每个 IP 每日最多调用工具 30 次。**无需账户,也无需安装任何内容。
匿名用户无法使用中标信息、获胜方情报和提醒配置文件——这些功能需要密钥,详见下文。
2. 本地服务(pip)— 完整工具集
需要 Python 3.10+ 和免费 API 密钥。
pip install tenderapi-mcp
在 https://tenderapi.fr/ 获取免费密钥(包含每周一封邮件提醒),然后:
{
"mcpServers": {
"tenderapi": {
"command": "tenderapi-mcp",
"env": {
"TENDERAPI_KEY": "ta_your_key_here"
}
}
}
}
Claude Desktop 配置文件位置:
- macOS:
~/Library/Application Support/Claude/claude_desktop_config.json - Windows:
%APPDATA%\Claude\claude_desktop_config.json - Linux:
~/.config/Claude/claude_desktop_config.json
重启客户端。工具选择器中应会出现 tenderapi 服务。
也可以从源代码安装,而非从 PyPI 安装:
git clone https://github.com/IDNSIDNS/tenderapi-mcp
cd tenderapi-mcp
pip install -e .
任何支持 stdio 传输的 MCP 客户端均可使用。通过 pip 安装的 tenderapi-mcp 二进制文件是入口点。
提供的工具
| 工具 | 层级 | 托管版(无需密钥) | 说明 |
|---|---|---|---|
search_tenders | 免费 | ✅ | 使用类型化筛选条件(CPV、地区、预算、截止日期、来源等)搜索 BOAMP + TED 招标 |
get_tender | 免费 | ✅ | 按 ID 获取单条招标信息 |
search_awards | Pro | — | 搜索授标公告(谁中标了哪份合同,金额是多少) |
get_award | Pro | — | 按 ID 获取单条授标信息 |
winner_intel | Pro | — | 汇总获胜方统计信息:按 CPV / 地区 / 年份排列的顶尖公司 |
me | 任意 | — | 当前密钥层级、剩余配额、可用功能 |
list_profiles、get_profile、create_profile、update_profile、delete_profile | 免费(1 个,每周邮件)/ Pro | — | 管理新招标匹配提醒配置文件:免费密钥每周发送邮件;Pro 每天发送邮件摘要、Teams 卡片或 Webhook |
upgrade_tier、billing_portal | 任意 | — | Stripe 结账和账单管理链接 |
默认情况下,search_tenders 会排除 PIN(预先信息公告);传入 include_planning=true 可将其包含在内。使用 deadline_after / deadline_before 筛选时,没有提交截止日期的公告会被排除,除非设置 include_null_deadline=true。
层级
- 托管版,无需密钥:每个 IP 每日 30 次工具调用,仅限招标信息
- 免费密钥:招标信息、1 个提醒配置文件(每周一向账户邮箱发送邮件摘要)
- Pro(15 €/月):增加授标信息和获胜方情报,最多 10 个提醒配置文件;每天早晨发送(邮件摘要、Teams 或 Webhook)
请求限制仅用于保护服务(免费:每日 1 000 次、每分钟 30 次;Pro:每日 1 500 次、每分钟 120 次);分页列表最多返回第 1 000 行。
标价为最终价格——不收取增值税(法国《税法》第 293 B 条)。参见 https://tenderapi.fr/#pricing。
本地开发
通过 TENDERAPI_BASE_URL 覆盖 API 基础 URL(默认为 https://tenderapi.fr)。
要求
固定使用 mcp 1.x 系列:2.0.0 版本移除了 mcp.server.fastmcp,而本服务基于该模块构建。迁移到 2.x API 的工作另行跟踪。
许可证
MIT,参见 LICENSE。
评论
一个开放协议,规定了 AI 应用如何以统一方式连接外部工具与数据源。客户端负责与模型对话,MCP 服务负责提供工具、资源和提示模板,两者通过标准消息通信,同一个服务可以被不同客户端复用。