Skip to main content
Glama
china-usci-mcp

china-usci-mcp

by zbl1998-sdjn

china-usci-mcp

MCP server for checking the Unified Social Credit Identifier (USCI) — the 18-character code printed on a mainland China business licence.

Offline. Zero network calls. It tells the model what a passing code establishes, and, on every response including failures, what it does not.

Why this exists

Ask an assistant "is this Chinese supplier real?" and, without a tool, it will reason from the shape of the string and sound confident. That is the worst possible failure mode for this particular question, because the person asking is usually about to send money.

There is exactly one thing that can be established about a USCI without contacting anyone: whether the code is internally consistent. The final character is a check character over the first 17, defined by GB 32100-2015, computed mod 31 over a 31-character alphabet that deliberately excludes I, O, Z, S and V. A mistyped digit, a transposed pair, or a fabricated code will usually fail that check.

This server exposes that one fact, and refuses to let it grow into anything larger.

Related MCP server: mcp-creditcard

Install

npm install -g china-usci-mcp

Or run it without installing:

npx china-usci-mcp

Client configuration

{
  "mcpServers": {
    "china-usci": {
      "command": "npx",
      "args": ["-y", "china-usci-mcp"]
    }
  }
}

Tools

validate_usci

Input: code — the identifier as printed. Whitespace, full-width spaces, hyphens and lower case are tolerated.

Returns whether the code is well formed, decodes its segments (registering authority, entity category, administrative division, subject identifier, check character), and states the boundary.

VALID FORMAT: 91330100799655058B

Segments:
  Registration authority code: 9 — Market regulation (工商)
  Entity category code: 1 — Enterprise (企业)
  Administrative division code: 330100 — Registered in Zhejiang.
  Subject identifier (organization code): 799655058
  Check character: B

What this establishes:
  - The 18 characters are internally consistent, so the code was transcribed correctly.
  - The code is formatted as GB 32100-2015 requires.

What this does NOT establish, in any outcome:
  - That the company exists. A correctly formed code can be invented.
  - That the company is still active rather than revoked or deregistered.
  - That its registered business scope covers what you are buying.
  - That it may legally export to you. Export eligibility turns on the registered
    scope and customs registration, neither of which is encoded here.
  - That the company on this code is the same one issuing your invoice or
    receiving your payment.

A wrong check character reports the expected and actual characters, so a transcription error can be found rather than merely flagged.

usci_check_character

Input: first17. Computes the character the 18th position should hold. Use it when checking a code copied off a photographed licence.

What this cannot do

It queries no registry. It cannot tell you that a company exists, is currently registered, is in good standing, does what it claims, or is safe to pay. A well-formed code that belongs to nobody is still a well-formed code.

For the record itself you need the official source — and getting there from outside mainland China is its own problem. We measured eight official Chinese verification portals from public vantage points abroad: the national enterprise credit system (GSXT) answered none of the overseas nodes tested. Methodology and per-node data: currawongweb.com/verify/china-official-source-availability/, with the underlying datasets on Harvard Dataverse under DOIs and a mirror on Hugging Face.

Licence

MIT. Built by Currawong, which also sells supplier verification reports — stated plainly, since you are being asked to run our code.

Available Tools

2 tools
usci_check_characterA

Compute the expected check character for the first 17 characters of a Unified Social Credit Identifier. Use when verifying a transcription: compute what the 18th character should be and compare it with what is printed. Offline; queries nothing.

Inputs: first17 (required).

validate_usciA

Check whether an 18-character Unified Social Credit Identifier (USCI/USCC) from a mainland China business licence is well formed, and decode its segments. Offline arithmetic check per GB 32100-2015: verifies the character set and the mod-31 check character, and reports the registering authority, entity category and administrative division encoded in the code. Returns explicitly what a passing code does and does not establish. Does NOT query any registry and does NOT prove the company exists, is active, or is trustworthy.

Inputs: code (required).

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    TDQS

    A4.1/5.0

    Scored across 2 tools

    Disambiguation5/5

    validate_usci performs full validation and decoding of an entire USCI, while usci_check_character computes only the check character for a partial code. Their purposes are clearly separated, with no practical confusion between validating a complete code and verifying a single digit.

    Naming Consistency3/5

    The names follow different structural patterns: validate_usci is verb-noun, while usci_check_character is noun-noun (or noun-verb-noun) and reads more like an object than an action. Although both consistently use lowercase 'usci', the lack of a uniform verb-first convention prevents a higher score.

    Tool Count4/5

    With only two tools, the server is slightly below the typical 3-15 range, but it targets a very narrow domain (offline USCI validation). Each tool has a distinct and necessary role, so the count feels reasonable even if minimal.

    Completeness5/5

    The server covers the core operations needed for offline USCI processing: full validation/decode and check-character computation. It explicitly declares it does not query registries, so the lack of a lookup tool is an intentional boundary rather than a gap, making the surface complete for its stated purpose.

    Maintenance

    ActivitySlowing
    ResponsivenessNo recent community issues

    Related MCP Connectors

    Related MCP Servers

    • A
      license
      Not graded
      quality
      D
      maintenance
      Validates Indian GSTIN numbers with structural checks, embedded PAN extraction, state-code lookup, and mod-36 check character validation, all via local compute.
      MIT
    • A
      license
      Not graded
      quality
      C
      maintenance
      Provides a Luhn check-digit validation tool for numeric strings such as credit cards, IMEI, and national IDs.
      71 npm
      MIT
    • A
      license
      Not graded
      quality
      C
      maintenance
      Validates IMEI numbers with Luhn check and computes the check digit; works offline without API keys.
      75 npm
      MIT
    • A
      license
      A
      quality
      C
      maintenance
      Enables offline, fully local lookups and validations tuned for Chinese development work: statutory holiday and adjusted-workday checks, workday arithmetic, ID card/USCC/mobile format validation, Chinese-to-pinyin conversion, lunar-solar date conversion, and administrative region queries. It also provides searchable summaries of common uni-app, mini program, Element Plus, and Vant APIs, so assistants can answer these questions without any network calls or third-party services.
      13
      1
      MIT