{"_id":"@dearmrzhang/customs-mcp-server","_rev":"5-974c8ac1f60f205001a03b3d9b7b131e","name":"@dearmrzhang/customs-mcp-server","dist-tags":{"latest":"1.1.0"},"versions":{"0.1.0":{"name":"@dearmrzhang/customs-mcp-server","version":"0.1.0","keywords":["mcp","model-context-protocol","customs","trade","declaration","tariff","hs-code","ai-agent"],"author":{"name":"ZHANGCHAO"},"license":"MIT","_id":"@dearmrzhang/customs-mcp-server@0.1.0","maintainers":[{"name":"dearmrzhang","email":"woaimamaa@foxmail.com"}],"homepage":"https://github.com/yak33/customs-mcp-server#readme","bugs":{"url":"https://github.com/yak33/customs-mcp-server/issues"},"bin":{"customs-mcp-server":"dist/index.js"},"dist":{"shasum":"0dca05e5b8afe267487e8862ee277867e71d47e4","tarball":"https://registry.npmjs.org/@dearmrzhang/customs-mcp-server/-/customs-mcp-server-0.1.0.tgz","fileCount":7,"integrity":"sha512-wU++U2+6u5vtetzhRd1tYTBEOE7rRQtAMlIXFjMpHsJ6cwkt9wVU4vKdYpcMnhAeDE7cMlPeXmfnOtRiFr4L0w==","signatures":[{"sig":"MEUCIQDL+HNLapZGUfsbIrocBmu/RHKUBZprniE1HkVwzsPaLgIgH5JaksttPy4g34vv/9/hmr8zoZC6DUL8OJ+3moWMHjg=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":27955},"type":"module","engines":{"node":">=18.0.0"},"gitHead":"ef17199042054b2bf341d35cb32345448c672635","scripts":{"build":"tsc -p tsconfig.json","dev:http":"tsx src/index.ts --transport http","dev:stdio":"tsx src/index.ts --transport stdio","start:http":"node dist/index.js --transport http","start:stdio":"node dist/index.js --transport stdio","prepublishOnly":"tsc -p tsconfig.json"},"_npmUser":{"name":"dearmrzhang","email":"woaimamaa@foxmail.com"},"repository":{"url":"git+https://github.com/yak33/customs-mcp-server.git","type":"git"},"_npmVersion":"10.3.0","description":"MCP server for customs declaration, tariff query and shipment tracking — wraps your backend Agent APIs as standard MCP tools.","directories":{},"_nodeVersion":"22.14.0","dependencies":{"zod":"^3.24.2","dotenv":"^16.4.7","@modelcontextprotocol/sdk":"^1.8.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"tsx":"^4.19.3","typescript":"^5.8.3","@types/node":"^22.15.3"},"_npmOperationalInternal":{"tmp":"tmp/customs-mcp-server_0.1.0_1773501725732_0.19688841330839035","host":"s3://npm-registry-packages-npm-production"}},"0.1.1":{"name":"@dearmrzhang/customs-mcp-server","version":"0.1.1","keywords":["mcp","model-context-protocol","customs","trade","declaration","tariff","hs-code","ai-agent"],"author":{"name":"ZHANGCHAO"},"license":"MIT","_id":"@dearmrzhang/customs-mcp-server@0.1.1","maintainers":[{"name":"dearmrzhang","email":"woaimamaa@foxmail.com"}],"homepage":"https://github.com/yak33/customs-mcp-server#readme","bugs":{"url":"https://github.com/yak33/customs-mcp-server/issues"},"bin":{"customs-mcp-server":"dist/index.js"},"dist":{"shasum":"3b941fbb6dd57d6e974d003663c5d8207d882e66","tarball":"https://registry.npmjs.org/@dearmrzhang/customs-mcp-server/-/customs-mcp-server-0.1.1.tgz","fileCount":7,"integrity":"sha512-4cm/3+h+WcOM3EdH+Ht0Wq/hnmPCCApwbzkqvnSJcZXwNcc/STHESOoOtHwXfweFL3l4SYCjwItebvx2i9vN+A==","signatures":[{"sig":"MEQCIDaPqov0ZcQ2mtj+yx4gdrDBvfdbysJ5OZS6qX2iixeiAiB5FP3SzjrZLqk1G4MOF8v82HD47ZbJvEzKgNgmtnETLw==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":28023},"pnpm":{"overrides":{"fast-uri":"2.3.0"}},"type":"module","engines":{"node":">=18.0.0"},"gitHead":"74ec5227215884eeea91fa63d0e8e9868e1e9429","scripts":{"build":"tsc -p tsconfig.json","dev:http":"tsx src/index.ts --transport http","dev:stdio":"tsx src/index.ts --transport stdio","start:http":"node dist/index.js --transport http","start:stdio":"node dist/index.js --transport stdio","prepublishOnly":"tsc -p tsconfig.json"},"_npmUser":{"name":"dearmrzhang","email":"woaimamaa@foxmail.com"},"repository":{"url":"git+https://github.com/yak33/customs-mcp-server.git","type":"git"},"_npmVersion":"10.3.0","description":"MCP server for customs declaration, tariff query and shipment tracking — wraps your backend Agent APIs as standard MCP tools.","directories":{},"_nodeVersion":"22.14.0","dependencies":{"zod":"^3.24.2","dotenv":"^16.4.7","@modelcontextprotocol/sdk":"^1.8.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"tsx":"^4.19.3","typescript":"^5.8.3","@types/node":"^22.15.3"},"_npmOperationalInternal":{"tmp":"tmp/customs-mcp-server_0.1.1_1777254019532_0.14104525303782656","host":"s3://npm-registry-packages-npm-production"}},"0.1.2":{"name":"@dearmrzhang/customs-mcp-server","version":"0.1.2","keywords":["mcp","model-context-protocol","customs","trade","declaration","tariff","hs-code","ai-agent"],"author":{"name":"ZHANGCHAO"},"license":"MIT","_id":"@dearmrzhang/customs-mcp-server@0.1.2","maintainers":[{"name":"dearmrzhang","email":"woaimamaa@foxmail.com"}],"homepage":"https://github.com/yak33/customs-mcp-server#readme","bugs":{"url":"https://github.com/yak33/customs-mcp-server/issues"},"bin":{"customs-mcp-server":"dist/index.js"},"dist":{"shasum":"6f274a5fb788a3367a73cdb373bc536d19ffa058","tarball":"https://registry.npmjs.org/@dearmrzhang/customs-mcp-server/-/customs-mcp-server-0.1.2.tgz","fileCount":7,"integrity":"sha512-6DMFn9jzJj1K0jc9K9x80NP5VqcF2d1SyyDLnSJ+O2aD8e5IFTWhpkGXhOLNJEwusxDCGYTnwYISArDr6zGzxQ==","signatures":[{"sig":"MEQCID9r8aULT4Xg4kkVsyljHnoT5fpDnv/alL9VbADi7b+fAiBFgKS2LkYrIbDzk+j2NWDPTpLeB5FSg4gyaOITGv1Y/g==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":28048},"pnpm":{"overrides":{"fast-uri":"2.3.0"}},"type":"module","engines":{"node":">=18.0.0"},"gitHead":"6765403f561de923957228e6de14be265aa88077","scripts":{"build":"tsc -p tsconfig.json","dev:http":"tsx src/index.ts --transport http","dev:stdio":"tsx src/index.ts --transport stdio","start:http":"node dist/index.js --transport http","start:stdio":"node dist/index.js --transport stdio","prepublishOnly":"tsc -p tsconfig.json"},"_npmUser":{"name":"dearmrzhang","email":"woaimamaa@foxmail.com"},"repository":{"url":"git+https://github.com/yak33/customs-mcp-server.git","type":"git"},"_npmVersion":"10.3.0","description":"MCP server for customs declaration, tariff query and shipment tracking — wraps your backend Agent APIs as standard MCP tools.","directories":{},"_nodeVersion":"22.14.0","dependencies":{"zod":"^3.24.2","dotenv":"^16.4.7","fast-uri":"2.3.0","@modelcontextprotocol/sdk":"^1.8.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"tsx":"^4.19.3","typescript":"^5.8.3","@types/node":"^22.15.3"},"_npmOperationalInternal":{"tmp":"tmp/customs-mcp-server_0.1.2_1777254547933_0.2815930776170257","host":"s3://npm-registry-packages-npm-production"}},"1.0.0":{"name":"@dearmrzhang/customs-mcp-server","version":"1.0.0","keywords":["mcp","model-context-protocol","customs","trade","declaration","tariff","hs-code","ai-agent","claude","claude-code","cursor","windsurf"],"author":{"name":"ZHANGCHAO"},"license":"MIT","_id":"@dearmrzhang/customs-mcp-server@1.0.0","maintainers":[{"name":"dearmrzhang","email":"woaimamaa@foxmail.com"}],"homepage":"https://github.com/yak33/customs-mcp-server#readme","bugs":{"url":"https://github.com/yak33/customs-mcp-server/issues"},"bin":{"customs-mcp-server":"dist/index.js"},"dist":{"shasum":"0f93268f4b42f39f4c9c913060c87674459bebc8","tarball":"https://registry.npmjs.org/@dearmrzhang/customs-mcp-server/-/customs-mcp-server-1.0.0.tgz","fileCount":39,"integrity":"sha512-0TsUsb2vW4hw0PfVqtrTlEycq+r8bQ9MAseQ6RsZgar2K0K0bL3fGgamyTOReESQ4VAgqH94PKKcKIfH5LjEhA==","signatures":[{"sig":"MEYCIQDvZVYgkEuOFjFXNbgvpigVxrrLSD4/I30EjvSK/3+ydgIhAIQgTZ0tkago5RD0YpprZaR2dKrcKVnIyFntF/s7wo3b","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":161573},"pnpm":{"overrides":{"fast-uri":"2.3.0"}},"type":"module","engines":{"node":">=18.0.0"},"gitHead":"a3f97b17869380c4a8f2b922fe5f75fde4150dd0","scripts":{"test":"vitest run","build":"rimraf dist && tsc -p tsconfig.json","prepack":"pnpm typecheck && pnpm test && pnpm build","dev:http":"tsx src/index.ts --transport http","dev:stdio":"tsx src/index.ts --transport stdio","typecheck":"tsc -p tsconfig.json --noEmit","start:http":"node dist/index.js --transport http","test:watch":"vitest","start:stdio":"node dist/index.js --transport stdio","test:coverage":"vitest run --coverage"},"_npmUser":{"name":"dearmrzhang","email":"woaimamaa@foxmail.com"},"repository":{"url":"git+https://github.com/yak33/customs-mcp-server.git","type":"git"},"_npmVersion":"10.3.0","description":"MCP server exposing 14 customs / trade capabilities (declarations, ship info, tariff, dual-use screening, AI document maker, ...) as standard Model Context Protocol tools. Built for Claude Desktop / Claude Code / Cursor / Windsurf / Trae / Codex and any M","directories":{},"_nodeVersion":"22.14.0","dependencies":{"zod":"^3.24.2","dotenv":"^16.4.7","fast-uri":"2.3.0","@modelcontextprotocol/sdk":"^1.8.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"tsx":"^4.19.3","rimraf":"^6.0.1","vitest":"^2.1.8","typescript":"^5.8.3","@types/node":"^22.15.3"},"_npmOperationalInternal":{"tmp":"tmp/customs-mcp-server_1.0.0_1779558565368_0.6756202682765056","host":"s3://npm-registry-packages-npm-production"}},"1.1.0":{"name":"@dearmrzhang/customs-mcp-server","version":"1.1.0","type":"module","description":"MCP server exposing 14 customs / trade capabilities (declarations, ship info, tariff, dual-use screening, AI document maker, ...) as standard Model Context Protocol tools. Built for Claude Desktop / Claude Code / Cursor / Windsurf / Trae / Codex and any M","keywords":["mcp","model-context-protocol","customs","trade","declaration","tariff","hs-code","ai-agent","claude","claude-code","cursor","windsurf"],"author":{"name":"ZHANGCHAO"},"license":"MIT","repository":{"type":"git","url":"git+https://github.com/yak33/customs-mcp-server.git"},"homepage":"https://github.com/yak33/customs-mcp-server#readme","bugs":{"url":"https://github.com/yak33/customs-mcp-server/issues"},"engines":{"node":">=18.0.0"},"bin":{"customs-mcp-server":"dist/index.js"},"publishConfig":{"access":"public"},"scripts":{"build":"rimraf dist && tsc -p tsconfig.json","typecheck":"tsc -p tsconfig.json --noEmit","test":"vitest run","test:watch":"vitest","test:coverage":"vitest run --coverage","prepack":"pnpm typecheck && pnpm test && pnpm build","dev:stdio":"tsx src/index.ts --transport stdio","dev:http":"tsx src/index.ts --transport http","start:stdio":"node dist/index.js --transport stdio","start:http":"node dist/index.js --transport http"},"dependencies":{"@modelcontextprotocol/sdk":"^1.8.0","dotenv":"^16.4.7","fast-uri":"2.3.0","zod":"^3.24.2"},"devDependencies":{"@types/node":"^22.15.3","rimraf":"^6.0.1","tsx":"^4.19.3","typescript":"^5.8.3","vitest":"^2.1.8"},"pnpm":{"overrides":{"fast-uri":"2.3.0"}},"_id":"@dearmrzhang/customs-mcp-server@1.1.0","gitHead":"a3f97b17869380c4a8f2b922fe5f75fde4150dd0","_nodeVersion":"22.14.0","_npmVersion":"10.3.0","dist":{"integrity":"sha512-FZRvbfoNdU6Grrl1iVDMP50GQaFnjCwkPDOIhcu9dv7OHt5i4etnvrKX7/r9lmQvth0y87LjpPrLI7rfsGlXvg==","shasum":"9321b2cf098b9f1d60c8891b94716645192ee06b","tarball":"https://registry.npmjs.org/@dearmrzhang/customs-mcp-server/-/customs-mcp-server-1.1.0.tgz","fileCount":39,"unpackedSize":166247,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCIQC7rFiJHRN3/MhDOn/1QwAC4+14TRpm4CEESmBIQVH5agIgIbRUZJSZkegdlVAja1+Vy1eXha+jhY18c7kP54kpZoY="}]},"_npmUser":{"name":"dearmrzhang","email":"woaimamaa@foxmail.com"},"directories":{},"maintainers":[{"name":"dearmrzhang","email":"woaimamaa@foxmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/customs-mcp-server_1.1.0_1779852844256_0.8119838971749234"},"_hasShrinkwrap":false}},"time":{"created":"2026-03-14T15:22:05.678Z","modified":"2026-05-27T03:34:04.536Z","0.1.0":"2026-03-14T15:22:05.895Z","0.1.1":"2026-04-27T01:40:19.665Z","0.1.2":"2026-04-27T01:49:08.069Z","1.0.0":"2026-05-23T17:49:25.525Z","1.1.0":"2026-05-27T03:34:04.426Z"},"bugs":{"url":"https://github.com/yak33/customs-mcp-server/issues"},"author":{"name":"ZHANGCHAO"},"license":"MIT","homepage":"https://github.com/yak33/customs-mcp-server#readme","keywords":["mcp","model-context-protocol","customs","trade","declaration","tariff","hs-code","ai-agent","claude","claude-code","cursor","windsurf"],"repository":{"type":"git","url":"git+https://github.com/yak33/customs-mcp-server.git"},"description":"MCP server exposing 14 customs / trade capabilities (declarations, ship info, tariff, dual-use screening, AI document maker, ...) as standard Model Context Protocol tools. Built for Claude Desktop / Claude Code / Cursor / Windsurf / Trae / Codex and any M","maintainers":[{"name":"dearmrzhang","email":"woaimamaa@foxmail.com"}],"readme":"<div align=\"center\">\n\n# customs-mcp-server\n\n**关务能力打包成 MCP 工具 —— 任何 AI Agent 即插即用。**\n\n把 14 个生产级关务/贸易能力(报关单、船信息、税则、两用物项判定、\nAI 智能制单 ……)封装成标准 [Model Context Protocol](https://modelcontextprotocol.io/)\n工具,供 Claude Desktop、Claude Code、Cursor、Windsurf、Trae 以及其他\n任意 MCP 兼容的 AI 客户端直接调用。\n\n[![npm](https://img.shields.io/npm/v/@dearmrzhang/customs-mcp-server)](https://www.npmjs.com/package/@dearmrzhang/customs-mcp-server)\n[![Node](https://img.shields.io/node/v/@dearmrzhang/customs-mcp-server)](https://nodejs.org/)\n[![License](https://img.shields.io/npm/l/@dearmrzhang/customs-mcp-server)](LICENSE)\n[![TypeScript](https://img.shields.io/badge/typescript-strict-blue.svg)](tsconfig.json)\n[![MCP](https://img.shields.io/badge/MCP-1.x-purple.svg)](https://modelcontextprotocol.io/)\n[![GitHub stars](https://img.shields.io/github/stars/yak33/customs-mcp-server?style=social)](https://github.com/yak33/customs-mcp-server)\n\n[English](README.md) · **简体中文** · [日本語](README.ja.md)\n\n</div>\n\n---\n\n## ✨ 能力\n\n- **14 个 MCP 工具** —— 把每一个 customs-skill 业务能力做成带 zod 校验的类型化工具\n- **全 AI 客户端支持** —— Claude Desktop / Claude Code / Cursor / Windsurf / Trae / Codex / 任意 MCP 客户端\n- **生产级鉴权** —— `/session/exchange` → 5 分钟 `agentToken` → 动作码白名单 → 租户隔离\n- **调用级身份覆盖** —— server 默认身份 + 每次工具调用可选 `_identity` 字段(多用户 / 多租户友好)\n- **AI 制单** —— multipart 上传、no-wait 模式、`decId` 轮询模式\n- **错误翻译** —— 后端 `NEED_BIND` / `NEED_TENANT` 等翻译成可操作的英文指引\n- **分级超时** —— 15 秒读 / 180 秒上传 / 660 秒慢查询\n- **零运行时依赖** —— 只用 `@modelcontextprotocol/sdk` + `zod` + `dotenv`;Node 18+ 内置 `fetch` + `FormData`\n- **双 Transport** —— stdio(Claude Desktop)与 Streamable HTTP(远程 / 自托管)\n\n## 🚀 快速开始\n\n### 1. 后端绑定身份\n\n请关务系统管理员在 `agent_identity_binding` 表里插入一条记录,\n把 `(platform, externalUserId)` 映射到已有 `sys_user_id`。\n完整 SQL 见 [docs/identity-binding.md](docs/identity-binding.md)。\n\n### 2. 配置 AI 客户端\n\n从 [`examples/`](examples/) 选一个现成模板:\n- [Claude Desktop](examples/claude-desktop.json)\n- [Cursor](examples/cursor.json)\n- [Windsurf](examples/windsurf.json)\n- [Trae](examples/trae.json)\n- [Claude Code](examples/claude-code.md)\n\n或者使用通用配置:\n\n```json\n{\n  \"mcpServers\": {\n    \"customs\": {\n      \"command\": \"npx\",\n      \"args\": [\"-y\", \"@dearmrzhang/customs-mcp-server\", \"--transport\", \"stdio\"],\n      \"env\": {\n        \"CUSTOMS_API_BASE_URL\": \"http://your-backend-host:port\",\n        \"CUSTOMS_ACCESS_KEY\": \"your-access-key\",\n        \"CUSTOMS_SECRET_KEY\": \"your-secret-key\",\n        \"CUSTOMS_DEFAULT_PLATFORM\": \"mcp\",\n        \"CUSTOMS_DEFAULT_EXTERNAL_USER_ID\": \"your-bound-username\",\n        \"CUSTOMS_DEFAULT_EXTERNAL_CORP_ID\": \"mcp-prod\"\n      }\n    }\n  }\n}\n```\n\n### 3. 重启客户端开始用\n\n> \"用 `customs_query_tariff` 查一下 HS 编码 8471300000\"\n\n完成。AI Agent 会自动选择工具,MCP Server 签名请求、换 grant、\n返回结构化的税则数据。\n\n## 🏗 架构\n\n```\n                      ┌────────────────────────────────┐\n                      │  AI 客户端(Claude / Cursor /  │\n                      │  Windsurf / Trae / ……)         │\n                      └───────────────┬────────────────┘\n                                      │ MCP 协议(stdio | HTTP)\n                      ┌───────────────▼────────────────┐\n                      │  customs-mcp-server             │\n                      │                                 │\n                      │  • 14 个 tool handler           │\n                      │  • 身份解析器                   │\n                      │  • Signer + GrantBroker         │\n                      │    (5 分钟 agentToken 缓存)    │\n                      │  • 错误翻译器                   │\n                      └───────────────┬────────────────┘\n                                      │ HTTPS + 签名头\n                      ┌───────────────▼────────────────┐\n                      │  关务后端                       │\n                      │  /open-api/agent/v1/...          │\n                      └─────────────────────────────────┘\n```\n\n## 📚 文档\n\n| 文档 | 内容 |\n|---|---|\n| **[CHANGELOG.md](CHANGELOG.md)** | 所有版本变更,含 v0.1.2 → v1.0.0 破坏性变更、v1.1.0 declaration-list 增强 |\n| **[docs/tool-reference.md](docs/tool-reference.md)** | 全部 14 个工具的完整 schema 与用法 |\n| **[docs/identity-binding.md](docs/identity-binding.md)** | 后端 SQL 配置、多租户模式、troubleshooting |\n| **[examples/](examples/)** | 5 个 AI 客户端的配置示例 |\n\n## 🛠 环境变量\n\n| 变量名 | 必填 | 默认 | 说明 |\n|---|---|---|---|\n| `CUSTOMS_API_BASE_URL` | ✅ | — | 关务后端根 URL |\n| `CUSTOMS_ACCESS_KEY` | ✅ | — | 静态签名 accessKey |\n| `CUSTOMS_SECRET_KEY` | ✅ | — | 静态签名 secretKey |\n| `CUSTOMS_DEFAULT_PLATFORM` | ✅ | — | 身份 platform(如 `mcp` / `cursor`)|\n| `CUSTOMS_DEFAULT_EXTERNAL_USER_ID` | ✅ | — | 绑定的外部用户标识 |\n| `CUSTOMS_DEFAULT_EXTERNAL_CORP_ID` | ✅ | — | 绑定的外部企业标识 |\n| `CUSTOMS_API_PREFIX` | | `/open-api/agent` | API 路径前缀 |\n| `CUSTOMS_TIMEOUT_MS` | | `15000` | 默认请求超时(毫秒)|\n| `CUSTOMS_UPLOAD_TIMEOUT_MS` | | `180000` | AI 制单上传超时(毫秒)|\n| `CUSTOMS_DUAL_USE_TIMEOUT_MS` | | `660000` | 两用物项慢查询超时(毫秒)|\n| `CUSTOMS_TIMESTAMP_TIMEZONE` | | `Asia/Shanghai` | 时间戳时区(与后端一致)|\n| `CUSTOMS_DEFAULT_CHANNEL` | | `${PLATFORM}` | `/session/exchange` 的 channel 字段 |\n| `MCP_HTTP_HOST` | | `0.0.0.0` | HTTP transport 绑定 host |\n| `MCP_HTTP_PORT` | | `8787` | HTTP transport 端口 |\n| `MCP_HTTP_PATH` | | `/mcp` | HTTP transport 路径 |\n| `CUSTOMS_DEBUG` | | `0` | 设为 `1` 开启 stderr 详细调试日志 |\n\n## 🧪 可用工具\n\n14 个工具,分布在 7 个领域。完整 schema 和示例见 [tool-reference.md](docs/tool-reference.md)。\n\n| 领域 | 工具 |\n|---|---|\n| **报关单** | `customs_get_declaration_status` · `customs_query_declaration_list` · `customs_get_declaration_detail` · `customs_get_import_export_status` · `customs_get_full_process_tracking` |\n| **船信息** | `customs_query_ship_info`(含 I→E 自动兜底)· `customs_query_ship_plan` |\n| **舱单** | `customs_query_manifest_info` · `customs_query_ship_manifest_info` |\n| **税则** | `customs_query_tariff` |\n| **合规** | `customs_query_dual_use_item`(慢 AI 查询)|\n| **订单** | `customs_create_order_draft`(预检阶段)|\n| **AI 制单** | `customs_submit_ai_maker` · `customs_get_ai_maker_status` |\n\n## ⚠️ 从 v0.1.x 升级\n\nv1.0.0 是**破坏性发布**,引入了新的必填 env 变量。完整变更见\n[CHANGELOG.md → 1.0.0](CHANGELOG.md#100--2026-05-24)。TL;DR:\n\n1. 加 3 个身份 env(`CUSTOMS_DEFAULT_PLATFORM` /\n   `CUSTOMS_DEFAULT_EXTERNAL_USER_ID` / `CUSTOMS_DEFAULT_EXTERNAL_CORP_ID`)\n2. 让管理员在 `agent_identity_binding` 插入对应绑定行\n3. 把 `customs_query_tariff_info` 改名为 `customs_query_tariff`\n4. 把 `customs_get_declaration_detail` 的调用从 `cusCiqNo` 切到 `entryId`(已知 decId 时优先用 `decId`)\n\n## 🛡 安全\n\n- `CUSTOMS_SECRET_KEY` 和内存中缓存的 `agentToken` 永不出 server 进程\n- 调用级 `_identity` 覆盖不要嵌入 PII —— 它会出现在 MCP 结构化响应里\n- 所有写操作走后端动作码白名单\n- AI 制单状态查询的跨租户访问由后端拦截\n\n## 🤝 贡献\n\n欢迎在 [github.com/yak33/customs-mcp-server](https://github.com/yak33/customs-mcp-server/issues) 提 Issue / PR。\n\n```bash\ngit clone https://github.com/yak33/customs-mcp-server.git\ncd customs-mcp-server\npnpm install\npnpm build\npnpm dev:stdio      # 或 dev:http\n```\n\n## 📄 许可证\n\nMIT © [ZHANGCHAO](https://github.com/yak33),详见 [LICENSE](LICENSE)。\n\n## 🙏 相关项目\n\n- **[customs-skill](https://github.com/yak33/customs-skill)** —— 同样这 13 个关务能力的 OpenClaw 飞书/Lark 集成版\n\n---\n\n<div align=\"center\">\n<sub>Built with 🦞 by ZHANGCHAO · <a href=\"CHANGELOG.md\">v1.0.0</a> · 2026-05-24</sub>\n</div>\n","readmeFilename":"README.zh-CN.md"}