@avalkit/mcp 0.1.2 → 0.1.3

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 (2) hide show
  1. package/README.md +68 -26
  2. package/package.json +1 -1
package/README.md CHANGED
@@ -1,16 +1,34 @@
1
1
  # @avalkit/mcp
2
2
 
3
- [Avalkit](https://avalkit.com) MCP server — adds spend governance and tamper-evident audit logging to your AI assistant.
3
+ The spend governance and audit layer for AI agents. Rail-agnostic. Tamper-evident.
4
4
 
5
- ## What it does
5
+ [Avalkit](https://avalkit.com) sits above your AI agents and any payment toolkit (Stripe Agent Toolkit, custom payment systems, internal AP, expense platforms) and answers one question every time an agent wants to spend money: **should this be allowed?**
6
6
 
7
- Avalkit gives AI agents and AI-using teams:
8
- - **Pre-flight spend approval** — every payment, charge, or budget consumption checked against your rules before it happens
9
- - **Per-user budgets** — different limits for different teams, customers, or agent identities
10
- - **Tamper-evident audit log** — hash-chained record of every approval and denial, suitable for compliance reviews
11
- - **Stripe integration** — execute approved intents as real charges with one call
7
+ ## Why this exists
12
8
 
13
- This MCP server exposes Avalkit's API as five tools: `avalkit_create_intent`, `avalkit_execute_intent`, `avalkit_list_audit`, `avalkit_list_rules`, `avalkit_upsert_rules`.
9
+ AI agents are starting to spend real money — paying for AI inference, software subscriptions, vendor invoices, customer refunds. Without governance:
10
+
11
+ - Agents can blow through budgets in minutes
12
+ - There's no defensible audit trail for compliance reviews
13
+ - Every payment toolkit needs its own homegrown policy layer
14
+
15
+ Avalkit is the policy + audit layer that goes BEFORE any payment. The hash-chained audit log is cryptographically tamper-evident — exportable for SOC 2 reviews, regulator packages, and internal investigations.
16
+
17
+ ## What this MCP server gives you
18
+
19
+ Avalkit exposes five tools to your AI assistant:
20
+
21
+ - **`avalkit_create_intent`** — Declare a planned spend. Avalkit checks against your rules and returns approve/deny with reasons.
22
+ - **`avalkit_execute_intent`** — Optionally execute an approved intent via Stripe (one of several adapters; bring your own).
23
+ - **`avalkit_list_audit`** — Query the tamper-evident audit log.
24
+ - **`avalkit_list_rules`** — See the spend rules configured for your account.
25
+ - **`avalkit_upsert_rules`** — Configure per-user budgets, category allowlists, and daily limits.
26
+
27
+ Every intent and every receipt is hash-chained — each entry's hash includes the previous entry's hash, so any tampering breaks the chain.
28
+
29
+ ## What it's NOT
30
+
31
+ Avalkit is not a payment processor. It does not move money. It decides whether money should move, and records the decision for posterity. Your existing payment systems handle execution.
14
32
 
15
33
  ## Install
16
34
 
@@ -23,13 +41,13 @@ Add this to `~/Library/Application Support/Claude/claude_desktop_config.json`:
23
41
  "mcpServers": {
24
42
  "avalkit": {
25
43
  "command": "npx",
26
- "args": ["@avalkit/mcp"]
44
+ "args": ["--yes", "@avalkit/mcp"]
27
45
  }
28
46
  }
29
47
  }
30
48
  ```
31
49
 
32
- Restart Claude Desktop. The first time you use an Avalkit tool, your browser will open to authorize the connection. Click Allow once and you're done.
50
+ Restart Claude Desktop. The first time you use an Avalkit tool, your browser opens to authorize the connection. Click Allow once — tokens save automatically and refresh in the background.
33
51
 
34
52
  ### Cursor
35
53
 
@@ -39,36 +57,34 @@ Add to your Cursor MCP settings:
39
57
  {
40
58
  "avalkit": {
41
59
  "command": "npx",
42
- "args": ["@avalkit/mcp"]
60
+ "args": ["--yes", "@avalkit/mcp"]
43
61
  }
44
62
  }
45
63
  ```
46
64
 
47
65
  ### Other MCP clients
48
66
 
49
- Same pattern — `npx @avalkit/mcp` is the command, no arguments needed.
67
+ Same pattern — `npx --yes @avalkit/mcp` is the command, no arguments needed.
50
68
 
51
69
  ## Authentication
52
70
 
53
- Two modes:
71
+ ### OAuth (default, recommended)
54
72
 
55
- ### OAuth (default)
73
+ When you first use an Avalkit tool, the MCP server opens your browser to `mcp.avalkit.com/oauth/authorize`. You sign in with your email (magic link, no password), click Allow, and tokens save to `~/.avalkit/tokens.json` with `0600` permissions. Access tokens auto-refresh; you re-authenticate once per year.
56
74
 
57
- When you first use an Avalkit tool, the MCP server opens your browser to `mcp.avalkit.com/oauth/authorize`. You sign in with your email (magic link), click Allow, and tokens are saved to `~/.avalkit/tokens.json`. Tokens auto-refresh.
58
-
59
- To re-authenticate: `npx @avalkit/mcp login`
60
- To disconnect: `npx @avalkit/mcp logout`
75
+ - Re-authenticate: `npx @avalkit/mcp login`
76
+ - Disconnect: `npx @avalkit/mcp logout`
61
77
 
62
78
  ### API key (for SDK or scripted use)
63
79
 
64
- Set `AVALKIT_API_KEY` as an environment variable:
80
+ If you prefer to skip OAuth — for example, when running Avalkit from a server or CI pipeline — set an environment variable:
65
81
 
66
82
  ```json
67
83
  {
68
84
  "mcpServers": {
69
85
  "avalkit": {
70
86
  "command": "npx",
71
- "args": ["@avalkit/mcp"],
87
+ "args": ["--yes", "@avalkit/mcp"],
72
88
  "env": {
73
89
  "AVALKIT_API_KEY": "ak_test_..."
74
90
  }
@@ -77,19 +93,45 @@ Set `AVALKIT_API_KEY` as an environment variable:
77
93
  }
78
94
  ```
79
95
 
80
- Get an API key at [app.avalkit.com](https://app.avalkit.com).
96
+ Get an API key from your dashboard at [app.avalkit.com](https://app.avalkit.com).
97
+
98
+ ## Example: how an agent would use this
99
+
100
+ A finance team's AI assistant wants to renew a software subscription:
101
+
102
+ ```
103
+ Agent: avalkit_create_intent({
104
+ amount: 1500000, // $15,000 in cents
105
+ currency: "usd",
106
+ purpose: "Annual renewal: customer analytics platform",
107
+ category: "software",
108
+ user_id: "finance_team"
109
+ })
110
+
111
+ Avalkit: {
112
+ status: "denied",
113
+ denial_reason: "amount_exceeds_limit",
114
+ denial_message: "Amount 1500000 exceeds per-intent limit of 1000000 for finance_team."
115
+ }
116
+ ```
117
+
118
+ The agent sees the denial, reduces scope to $9,500, gets approved, then proceeds with whatever payment system actually handles the transaction. Avalkit doesn't care which one — its job was the decision, and the cryptographic record of why.
81
119
 
82
120
  ## Pricing
83
121
 
84
- Free during beta. Up to 10,000 intents per month per account. Email founders@avalkit.com if you need more.
122
+ Free during beta — up to 10,000 intents per month per account. Paid plans coming soon for higher volume, longer audit retention, and enterprise features (SSO, SOC 2, audit exports). Email founders@avalkit.com if you need more than the free tier covers.
85
123
 
86
- ## License
124
+ ## Status
87
125
 
88
- MIT — see LICENSE.
126
+ Alpha. Live and working, but expect rough edges. Talk to us before deploying to a production system that handles real money.
89
127
 
90
128
  ## Links
91
129
 
92
- - [Avalkit dashboard](https://app.avalkit.com)
130
+ - [Dashboard](https://app.avalkit.com) — manage API keys, OAuth grants, rules
93
131
  - [Documentation](https://avalkit.com)
94
132
  - [GitHub](https://github.com/avalkit/avalkit)
95
- - [Contact](mailto:founders@avalkit.com)
133
+ - [Contact](mailto:founders@avalkit.com)
134
+
135
+ ## License
136
+
137
+ MIT — see LICENSE.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@avalkit/mcp",
3
- "version": "0.1.2",
3
+ "version": "0.1.3",
4
4
  "description": "MCP server for Avalkit — spend governance and audit for AI agents",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",