ICPQuery-MCP
This server allows you to query China's MIIT ICP filing records and violation blacklists for websites, apps, mini-programs, and quick apps.
Query ICP Filing Information (
icp_query): Search ICP registration records by keyword (company name, domain, filing number, app name, etc.) for:web– Website filingsapp– App filings (with automatic detail enrichment)mapp– Mini-program (小程序) filings (with automatic detail enrichment)kapp– Quick app (快应用) filings (with automatic detail enrichment)Supports pagination and per-request proxy configuration
Query Illegal/Violation Blacklists (
icp_blacklist): Search the MIIT blacklist of non-compliant or illegal services by keyword for:bweb– Blacklisted websitesbapp– Blacklisted appsbmapp– Blacklisted mini-programsbkapp– Blacklisted quick apps
View Current Configuration (
config_show): Display active service settings (proxy, rate limits, timeout).Check Runtime Environment (
check_environment): Verify the Python runtime, dependencies, and supported query types to confirm the server is set up correctly.
Click on "Install 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., "@ICPQuery-MCPquery icp filing for baidu.com"
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.
支持类型
类型 | 能力 |
网站备案 | 域名、主体名称、备案号等关键词查询 |
App 备案 | App 名称、主体名称等关键词查询,并自动补充详情 |
小程序备案 | 小程序名称、主体名称等关键词查询,并自动补充详情 |
快应用备案 | 快应用名称、主体名称等关键词查询,并自动补充详情 |
违法违规黑名单 | 网站、App、小程序、快应用黑名单查询 |
Related MCP server: crawl-mcp
快速开始
1. 安装 uv
uvx(uv 自带)是 Python 生态中 npx 的等价物——在临时隔离环境中下载并运行包,无需全局安装。
# Linux / macOS(官方安装脚本)
curl -LsSf https://astral.sh/uv/install.sh | sh
# macOS(Homebrew)
brew install uv2. 配置 MCP 客户端
将以下配置加入支持 MCP 的客户端(Claude Desktop、Cursor 等),无需预先安装 ICPQuery-MCP:
{
"mcpServers": {
"icp-query": {
"command": "uvx",
"args": ["icpquery-mcp"],
"env": {
"ICP_PROXY_TUNNEL": "http://127.0.0.1:7890"
}
}
}
}目标接口有创宇盾防护,高频访问或特定 IP 可能触发拦截。触发拦截时通过 ICP_PROXY_TUNNEL 走代理访问;不需要代理时移除 env 或将值留空。代理地址须带协议前缀(http://、https:// 或 socks5://)。
版本锁定(生产环境推荐):将
args替换为["--from", "icpquery-mcp==0.3.0", "icpquery-mcp"],避免随发布版本浮动。
频率限制已内置默认值(query 5 次/分钟、blacklist 3 次/分钟),无需额外配置。完整配置示例见 mcp.json.example 和 config.example.yml。
其他安装方式
pip:
python -m pip install -U icpquery-mcp
icpquery-mcp此时将客户端配置中的 command 改为 icpquery-mcp,args 设为 []。
pipx:
pipx install icpquery-mcp
icpquery-mcp从源码:
git clone https://github.com/helGayhub233/ICPQuery-MCP.git
cd ICPQuery-MCP
uv sync
uv run icpquery-mcp从源码运行时,推荐在客户端配置中固定项目目录:
{
"mcpServers": {
"icp-query": {
"command": "uv",
"args": ["--directory", "/absolute/path/to/ICPQuery-MCP", "run", "icpquery-mcp"]
}
}
}配置
环境变量
环境变量统一使用 ICP_ 前缀。config_show 和 check_environment 会将已配置的代理地址显示为 <configured>,避免凭据泄漏到 MCP 对话上下文。
环境变量 | 说明 | 默认值 |
| HTTP 请求超时秒数 |
|
| 详情补全并发数(固定为串行,不可调) |
|
| 是否启用 MCP 工具频率限制 |
|
|
|
|
|
|
|
| 查询工具最大并发数(固定为串行,不可调) |
|
| 固定代理地址,例如 | — |
| 代理池 API 地址(当前保留) | — |
| 代理池大小(当前保留) | — |
| 本地 IPv6 出口轮换开关(当前保留) | — |
工具列表
工具 | 说明 | 参数 |
| 查询 ICP 备案信息 |
|
| 查询违法违规黑名单 |
|
| 查看当前运行配置 | — |
| 检查运行环境、依赖和支持类型 | — |
proxy 参数优先级高于 ICP_PROXY_TUNNEL 环境变量。
本地 CLI
除 MCP 工具外,项目还提供独立的 CLI 入口 icpquery:
icpquery check-env # 检查运行环境
icpquery config-show # 查看当前配置
icpquery query baidu.com # 查询网站备案
icpquery query 微信 -t app # 查询 App 备案
icpquery query baidu.com -t bweb # 查询网站黑名单请求限制
项目在单个 MCP server 实例内做本地保护,避免客户端并发请求直接打到目标接口。
工具 | 控制方式 |
| 同一 server 实例共享队列执行,默认每分钟 |
| 同一 server 实例共享队列执行,默认每分钟 |
App/小程序/快应用详情补全 | 串行执行 |
Qoder 等 MCP 客户端可能默认并发触发 5-10 个 tool call;同一 server(同一 ToolLimiter)实例会强制串行化,前一个查询完整结束后,下一个查询才会访问目标接口。多 server/worker 部署如需跨实例保持同样约束,须提供外部协调机制。
MCP 协议兼容性
服务使用官方 MCPServer API,同时兼容 2026-07-28 新协议和 2025-11-25 旧协议。SDK 会根据客户端自动选择 server/discover 或传统 initialize 流程,无需启动两套服务。
项目结构
src/icpquery_mcp/
server.py # MCP 入口
cli.py # 本地 CLI
core/
client.py # 工信部接口调用、token、验证码和详情补全
captcha.py # 滑块验证码偏移识别
config.py # YAML 和环境变量配置
ratelimit.py # 频率控制和单例队列保护
tools/
local_tools.py # MCP 工具与 CLI 复用封装开发
# 编译检查
python -m compileall src
# 检查运行环境
icpquery check-env
# 单元测试
python -m unittest discover -s tests -v
# 构建
uv build版本记录见 CHANGELOG.md。
注意事项
本项目仅供学习和技术研究使用,严禁用于任何商业或非法用途。
请只在合法授权范围内使用,并自行承担接口变化、验证码策略变化、目标风控或网络环境导致的失败风险。
许可证
MIT License,见 LICENSE。
Maintenance
Related MCP Servers
- FlicenseNot gradedqualityBmaintenanceMCP server for querying the FOFA API, enabling network asset search and account information retrieval.8
- AlicenseAqualityAmaintenanceMCP server for web crawling, searching, and AI-powered content extraction, supporting single-page, batch, and full-site crawling along with text, news, image, book, and video search.81MIT
- AlicenseAqualityDmaintenanceMCP server for Metaso Search API, providing multi-scope search and webpage reading tools.2272Apache 2.0
- AlicenseAqualityCmaintenanceMCP server providing free, IP-direct tools for web search, crawling, anti-detect browsing, and structured data from Wikipedia, Wikidata, GitHub, and YouTube.261MIT
Related MCP Connectors
MCP server for ScanMalware.com URL scanning, malware detection, and analysis.
An MCP Server that provides identity verification and anti-fraud tools for AI agents via deepidv.
保险产品搜索、推荐、保费试算、核保预检。覆盖65家保司483款产品。China insurance MCP server.
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/helGayhub233/ICPQuery-MCP'
If you have feedback or need assistance with the MCP directory API, please join our Discord server