@avalkit/mcp 0.1.4 → 0.1.6

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 +14 -106
  2. package/package.json +1 -1
package/README.md CHANGED
@@ -1,40 +1,14 @@
1
1
  # @avalkit/mcp
2
2
 
3
- The spend governance and audit layer for AI agents. Rail-agnostic. Tamper-evident.
3
+ Spend governance and audit for AI agents. The policy + audit layer that sits above any payment toolkit.
4
4
 
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
-
7
- ## Why this exists
8
-
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.
5
+ [Avalkit](https://avalkit.com) gives your AI assistant five tools: declare a planned spend, get approve/deny based on your rules, query a tamper-evident audit log, and manage per-user budgets — all with one config line.
32
6
 
33
7
  ## Install
34
8
 
35
9
  ### Claude Desktop
36
10
 
37
- Add this to `~/Library/Application Support/Claude/claude_desktop_config.json`:
11
+ Add to `~/Library/Application Support/Claude/claude_desktop_config.json`:
38
12
 
39
13
  ```json
40
14
  {
@@ -47,91 +21,25 @@ Add this to `~/Library/Application Support/Claude/claude_desktop_config.json`:
47
21
  }
48
22
  ```
49
23
 
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.
51
-
52
- ### Cursor
24
+ Restart Claude Desktop. First use opens your browser to sign in — click Allow and you're done.
53
25
 
54
- Add to your Cursor MCP settings:
26
+ ### Cursor, Windsurf, Claude Code
55
27
 
56
- ```json
57
- {
58
- "avalkit": {
59
- "command": "npx",
60
- "args": ["--yes", "@avalkit/mcp"]
61
- }
62
- }
63
- ```
64
-
65
- ### Other MCP clients
66
-
67
- Same pattern — `npx --yes @avalkit/mcp` is the command, no arguments needed.
28
+ Same pattern in their MCP settings: `npx --yes @avalkit/mcp`, no arguments.
68
29
 
69
30
  ## Authentication
70
31
 
71
- ### OAuth (default, recommended)
72
-
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.
74
-
75
- - Re-authenticate: `npx @avalkit/mcp login`
76
- - Disconnect: `npx @avalkit/mcp logout`
32
+ OAuth by default — first tool call opens your browser, you sign in with email (magic link), tokens save to `~/.avalkit/tokens.json` and auto-refresh.
77
33
 
78
- ### API key (for SDK or scripted use)
34
+ For scripted use, set `AVALKIT_API_KEY` in the `env` block. Get a key from [app.avalkit.com](https://app.avalkit.com).
79
35
 
80
- If you prefer to skip OAuth — for example, when running Avalkit from a server or CI pipeline — set an environment variable:
81
-
82
- ```json
83
- {
84
- "mcpServers": {
85
- "avalkit": {
86
- "command": "npx",
87
- "args": ["--yes", "@avalkit/mcp"],
88
- "env": {
89
- "AVALKIT_API_KEY": "ak_test_..."
90
- }
91
- }
92
- }
93
- }
94
- ```
95
-
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.
119
-
120
- ## Pricing
121
-
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.
123
-
124
- ## Status
125
-
126
- Alpha. Live and working, but expect rough edges. Talk to us before deploying to a production system that handles real money.
36
+ CLI: `npx @avalkit/mcp login` / `logout`.
127
37
 
128
38
  ## Links
129
39
 
130
- - [Dashboard](https://app.avalkit.com) — manage API keys, OAuth grants, rules
131
- - [Documentation](https://avalkit.com)
132
- - [GitHub](https://github.com/avalkit/avalkit)
133
- - [Contact](mailto:founders@avalkit.com)
134
-
135
- ## License
40
+ - [avalkit.com](https://avalkit.com) — docs, pricing, how it works
41
+ - [app.avalkit.com](https://app.avalkit.com) — dashboard
42
+ - [github.com/avalkit/avalkit](https://github.com/avalkit/avalkit) — source
43
+ - founders@avalkit.com — say hi
136
44
 
137
- MIT — see LICENSE.
45
+ MIT licensed.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@avalkit/mcp",
3
- "version": "0.1.4",
3
+ "version": "0.1.6",
4
4
  "description": "MCP server for Avalkit — spend governance and audit for AI agents",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",