@kya-brasil/mcp 0.0.0-stage → 0.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (3) hide show
  1. package/README.md +47 -2
  2. package/dist/index.js +123432 -0
  3. package/package.json +53 -4
package/README.md CHANGED
@@ -1,3 +1,48 @@
1
- # Temporary Holding Version
1
+ # @kya-brasil/mcp
2
2
 
3
- This version is a temporary placeholder for this package. An operational version to replace this has been submitted for review and is awaiting a staged release.
3
+ KYA Brasil as a **local MCP server** (stdio). Ask, from Claude Desktop, Cursor or any MCP client, who answers for an AI
4
+ agent (a Brazilian company with its e-CNPJ, or a person with their e-CPF), what its mandate allows, and whether a
5
+ sub-agent's delegation chain holds. The free and offline tools need no key.
6
+
7
+ ```json
8
+ {
9
+ "mcpServers": {
10
+ "kya-brasil": { "command": "npx", "args": ["-y", "@kya-brasil/mcp"] }
11
+ }
12
+ }
13
+ ```
14
+
15
+ The same tools are also served remotely at `https://kya-br-agents.marcelfons.workers.dev/mcp` (streamable HTTP). This
16
+ package runs on your machine instead: the offline tools never leave it, and the issuer is only read for live data.
17
+
18
+ ## Tools
19
+
20
+ | Tool | Where | Price |
21
+ | --- | --- | --- |
22
+ | `kya_verify` | issuer | free: principal, mandate, live status and history of a credential (by id or agent key) |
23
+ | `kya_revocations` | issuer | free: credentials revoked since a date |
24
+ | `kya_sign_link` | issuer | free: the link the certificate holder opens to sign |
25
+ | `kya_check_action` | issuer | $0.01: signed verdict for an action under the mandate |
26
+ | `kya_verify_paid` | issuer | $0.01: `kya_verify` with a signed receipt, no daily limit |
27
+ | `kya_check_mandate` | offline | free: evaluate an action against a mandate, rule by rule |
28
+ | `kya_validate_mandate` | offline | free: validate and normalize a mandate before registering |
29
+ | `kya_verify_credential_offline` | offline (fetches the issuer's public key once) | free: signature and expiry of a credential you hold |
30
+ | `kya_verify_delegation` | offline | free: verify a sub-agent's delegation chain and evaluate the action on every level |
31
+ | `kya_about` | offline | free: what KYA Brasil is and how to use it |
32
+
33
+ ## Configuration
34
+
35
+ | Variable | |
36
+ | --- | --- |
37
+ | `KYA_BASE_URL` | Issuer origin. Default: the reference issuer. Point it at your own issuer if you run one. |
38
+ | `KYA_PRIVATE_KEY` | Optional `0x` key of a wallet with USDC on Base, to pay the paid tools (x402). Without it they answer `PAYMENT_REQUIRED` with the price. |
39
+
40
+ ## Build from the repository
41
+
42
+ ```sh
43
+ pnpm install --frozen-lockfile --filter @kya-brasil/mcp...
44
+ pnpm --filter @kya-brasil/mcp build # one self-contained file: packages/mcp/dist/index.js
45
+ node packages/mcp/dist/index.js # speaks MCP on stdin/stdout
46
+ ```
47
+
48
+ Specification: [docs/SPEC.md](https://github.com/celfons/kya-brasil/blob/main/docs/SPEC.md). License: MIT.