pollution-permit-mcp
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., "@pollution-permit-mcpFind pollution permit details for a cement factory in Hebei"
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.
AIGC: Label: "1" ContentProducer: 001191440300708461136T1XGW3 ProduceID: c3e1d189ed77864364abef970f361174_cc96e0c0a1e511f1abe1525400e6dd8f ReservedCode1: NJWv7pof6N4zs+DCuplZqym42Cus+bRWvStMbVpSzCwaQatuiHqVSoqLluXUc3DFHznps6pKH2yl0CzMRN0VafbyYMwviAhLbyPc/zOKHRlhIXaJ44xs8iQRgxXni3BMOMnMZpK1aZBQ2voImDv35w31/lwbAwrJrW3uzKLynrUZJDUQbbYK460tPi8= ContentPropagator: 001191440300708461136T1XGW3 PropagateID: c3e1d189ed77864364abef970f361174_cc96e0c0a1e511f1abe1525400e6dd8f ReservedCode2: NJWv7pof6N4zs+DCuplZqym42Cus+bRWvStMbVpSzCwaQatuiHqVSoqLluXUc3DFHznps6pKH2yl0CzMRN0VafbyYMwviAhLbyPc/zOKHRlhIXaJ44xs8iQRgxXni3BMOMnMZpK1aZBQ2voImDv35w31/lwbAwrJrW3uzKLynrUZJDUQbbYK460tPi8=
National Pollution Discharge Permit Public Portal MCP Server
A transparent MCP service built on the National Pollution Discharge Permit Management Information Platform public portal (permit.mee.gov.cn). Enter any company name and instantly retrieve the permit original and copy, discharge outlet coordinates, post-permit management status in real time, and full text of policies and regulations.
Related MCP server: Bidding MCP Server
Features
Capability | Description |
Company search | Paginated queries by province/city/unit name/permit number/industry, covering 38,000+ pages nationwide |
Permit details | Basic info, original version, copy summary, hidden coordinate fields, discharge outlet points (AES auto-decryption) |
Full copy text | Page-by-page PNG download (~42 pages), integrated with upstream OCR to reconstruct full text (process flow/products/discharge standards) |
Post-permit management | Compliance reports (report period/treatment facility operation/compliance status), supervision and enforcement, self-monitoring entry |
Announcements | Rectification deadlines, cancellation/revocation/loss declarations |
Policies & regulations | 6 major category directories + full text + attachment downloads |
Engineering | WebShield session auto-maintenance, 1s rate limiting, exponential backoff retry, SQLite cache |
Quick Start
pip install -r requirements.txt
python server.pyOnce connected via the standard MCP client protocol, tools can be invoked.
Tool List
Tool | Purpose |
| Query the public license info list (returns dataid) |
| Details: text info + coordinates + discharge outlet points |
| List of copy image pages |
| Download a single copy page PNG (for OCR) |
| Discharge outlet QR code URL |
| Post-permit management: compliance reports/supervision/self-monitoring |
| Rectification deadline public notice |
| Cancellation/revocation/loss announcements |
| Policy and regulation category directory |
| Full text of policies and regulations |
| Decrypted discharge outlet point results |
| Self-monitoring platform integration URL |
Architecture
server.py (FastMCP 入口)
└─ permit_mcp/tools.py 工具定义(12 个)
├─ client.py WebShield 会话 / 限速 / 重试 / 缓存
├─ parser.py HTML→JSON / AES-ECB 解密 / 表格解析
└─ config.py 接口地址与常量Key Implementation Details
No login required: The public portal needs no account, only a WebShield session token (obtained by automatically visiting the homepage to warm up).
List API:
POST /perxxgkinfo/syssb/xkgg/xkgg!licenseInformation.action, parametersprovince/city/unitName/licenseNumber/industry/pageIndex/pageSize.Detail API:
GET xkgkAction!xkgk.action?xkgk=getxxgkContent&dataid=<ID>, coordinates are stored in hidden input fields; discharge outlet points are inline AES-128-ECB ciphertext, with the key hardcoded in the page JS and decrypted automatically.Copy images:
showImage.action?dataid=<ID>to get pkid and page count →downFilePng.action?datafileid=<pkid>_<page number>to download PNGs page by page.Post-permit management: Compliance reports use the async JSON API
hpsp-company-sewage!getZxbgByYear.action(parameters reportYear/dataid), returning annual/quarterly reports andpermitrepreport document links; self-monitoring integrates withwryjc.mee.gov.cn.Regulation full text:
lawsStandardList.action?columntype=<category>lists the directory →getNewsDetail.action?pkid=<UUID>returns plain-text body (extracted from the.file-bottomcontainer, navigation noise removed).Announcement tables: Cancellation/revocation/loss are plain table lists (no detail links), parsed by dynamic mapping based on column headers.
Self-Test Results (2026-08-27)
Verification item | Result |
Dependency environment | fastmcp 2.14.7 + pydantic 2.13.4 no conflicts (do not use 3.4.x, its wheel is an empty shell) |
12 MCP tools registered | All passed |
stdio protocol connectivity (list_tools / call_tool) | Passed |
| 10 hits, 38,132 pages in full database |
| Coordinates 112.92680/23.45318, 12 discharge outlets, AES decryption OK |
| 42-page list, single page PNG 102,757 bytes |
| Fetched 2024/2025 annual reports + self-monitoring entry |
| 10 cancellation notices/page, 16,118 pages in full database |
| Full text of the "Regulations on the Administration of Pollutant Discharge Permits" 8,099 characters, no navigation noise |
Fix log: client.py deadlock (Lock→RLock), get_license_pages parsing, download_license_page missing
dataid/fileType parameters, announcement table parser, regulation body container extraction.
Compliance Notes
Only accesses public portal data, no login, no CAPTCHA bypass.
Built-in 1-second request interval rate limiting and local caching to avoid putting pressure on the site.
Real-time discharge data belongs to the automatic monitoring private network (not a public API); the service provides the self-monitoring platform entry rather than unauthorized scraping.
Known Limitations
The copy is image-based and requires an OCR layer (can integrate PaddleOCR / Hunyuan vision models) to convert to text.
When some companies have no compliance report/supervision enforcement records, the corresponding tables being empty is normal.
get_rectification(rectification deadline) API currently returns empty data; parameters require further investigation. (AI-generated content, for reference only)
This server cannot be installed
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Related MCP Connectors
EPA Emissions MCP — wraps EPA Envirofacts REST API (free, no auth)
EPA ECHO MCP — wraps EPA ECHO Web Services (free, no auth)
Provide access to Chinese stock market data including historical prices, real-time data, news, and…
Judged, citation-checked policy corpus over MCP. Keyless public reads; API key for AI tools.
Related MCP Servers
- FlicenseNot gradedqualityFmaintenanceEnables querying Chinese enterprise business data including company profiles, shareholder information, investments, branch offices, and key personnel through fuzzy search and detailed lookups.4
- FlicenseNot gradedqualityDmaintenanceProvides comprehensive access to Chinese bidding and tendering data, enabling users to search for companies, analyze bidding statistics, query tender announcements, and discover project opportunities for market analysis and business development.10
- FlicenseNot gradedqualityDmaintenanceProvides comprehensive enterprise qualification and certificate data, including honors, administrative licenses, and professional background statistics. It enables users to search for companies and verify their bidding eligibility or compliance status through natural language queries.3
- FlicenseAqualityDmaintenanceFacilitates retrieval and parsing of Chinese central government policies from gov.cn, offering structured search results and full-text extraction.225
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/xiejianjun000/pollution-permit-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server