# AI 开票助手 · 电子发票开具

> 对话式开具电子发票（数电票）：第一步免费生成发票草稿（自动校验税号、税率并算税），第二步确认开票（需 App Key，按张计费），支持开票记录查询。

- name: io.github.imoldyoung/e-invoice
- version: 0.2.0
- connection class: R1 (autonomous)
- trust: 73/100 flags: no-repository
- quality: 79/100 (good)
- owner: not claimed
- descriptor: https://api.protogrid.dev/v1/servers/io.github.imoldyoung%2Fe-invoice
- tools: https://api.protogrid.dev/v1/servers/io.github.imoldyoung%2Fe-invoice/tools

**An agent can connect on its own if it already holds `X_APP_KEY`, `X_APP_KEY`.** Remote endpoint behind a static API key or header. The registry never sees the value; the agent fills the placeholder.

## Connection (mcpServers)

```json
{
  "mcpServers": {
    "e-invoice": {
      "type": "http",
      "url": "https://e-invoice-mcp.601096790.workers.dev/mcp",
      "headers": {
        "X-App-Key": "${X_APP_KEY}",
        "Authorization": "${X_APP_KEY}"
      }
    }
  }
}
```

Placeholders to fill: `${X_APP_KEY}`, `${X_APP_KEY}`.

## Trust

- hygiene: 80
- liveness: 98
- freshness: 85
- provenance: 35
- drivers: +reachable +uptime-94% ~updated-51d-ago -no-repository
- Derived from observable signals (official registry feed and our own credential-free probes); no code audit performed.

## Quality 79/100 (good)

### protocol: 75 (weight 25)

- warn `protocol.modern`: newest supported version is 2025-11-25; 2026-07-28 not supported, older versions are deprecated until 2027-07-28
- n/a `protocol.stateless`: only applies to 2026-07-28 servers
- pass `protocol.transport`: streamable HTTP
- n/a `protocol.list_ttl`: only applies to 2026-07-28 servers

### authorization: n/a (weight 15)

- n/a `auth.prm`, `auth.as_metadata`, `auth.cimd`: no remote uses OAuth
- n/a `auth.secret_in_url`: no templated URL

### tool hygiene: 71 (weight 30)

- pass `tools.descriptions`: every tool has a description
- pass `tools.description_length`: descriptions are concise
- pass `tools.schemas`: every tool has an object input schema
- fail `tools.annotations`: no tool declares readOnlyHint or destructiveHint, so clients cannot tell safe calls from risky ones
- fail `tools.directory_hints`: no tool declares all four of readOnlyHint, destructiveHint, idempotentHint and openWorldHint; missing: invoice_create_draft (readOnlyHint, destructiveHint, idempotentHint, openWorldHint); invoice_confirm_issue (readOnlyHint, destructiveHint, idempotentHint, openWorldHint); service_info (readOnlyHint, destructiveHint, idempotentHint, openWorldHint); …
- pass `tools.token_cost`: about 396 tokens to load every tool
- pass `tools.api_dump`: tools are not a one-to-one API dump

### stability: 100 (weight 15)

- pass `stability.changes`: no tool changes in 30 days
- pass `stability.rug_pull`: no tool changed its meaning under the same name

### dependencies: n/a (weight 15)

- n/a `deps.known_vulns`, `deps.mcp_sdk_version`, `deps.resolvable`: no npm or PyPI package

- tools: 4, about 396 tokens to load them all
- tool set hash: e28fd7b7f5b4f918cc00effe9f3bf1df
- badge: [![protogrid quality](https://protogrid.dev/badge/io.github.imoldyoung/e-invoice.svg)](https://protogrid.dev/servers/io.github.imoldyoung/e-invoice)
- Checks run on what our credential-free, read-only probes observe; tools are never called and no code audit is performed.

### Tool changes

_No tool definition changes recorded._

## Remotes

- https://e-invoice-mcp.601096790.workers.dev/mcp (streamable-http, auth api_key ${X_APP_KEY}, reachable true, uptime30d 0.9380531)

## Packages

_none_

## Tools (4)

- `invoice_confirm_issue`: 第 2 步：确认开具草稿。传入 invoice_create_draft 返回的 draft_id，正式提交开票（需 App Key，按张计费）。开票后生成发票号码与交付信息。
- `invoice_create_draft`: 第 1 步：把订单信息（文字描述或结构化明细）生成发票草稿。自动校验购方税号格式、税率合法性、金额上限，并自动计算税额与价税合计。草稿免费生成，24 小时内有效。
- `invoice_query`: 查询当前 App Key 名下的发票草稿与开票记录（需 App Key）。可按状态筛选：draft（草稿）/ issued（已开具）/ all。
- `service_info`: 查看服务介绍、计费方式与联系方式（无需 App Key，免费）。
