@sardis/mcp-server 0.2.6 → 1.0.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 (54) hide show
  1. package/CHANGELOG.md +11 -1
  2. package/CLAUDE_DESKTOP_CONFIG.md +10 -19
  3. package/README.md +179 -221
  4. package/dist/api.d.ts +1 -1
  5. package/dist/api.d.ts.map +1 -1
  6. package/dist/api.js +4 -2
  7. package/dist/api.js.map +1 -1
  8. package/dist/cli.js +185 -20
  9. package/dist/cli.js.map +1 -1
  10. package/dist/index.d.ts +1 -0
  11. package/dist/index.d.ts.map +1 -1
  12. package/dist/index.js +4 -2
  13. package/dist/index.js.map +1 -1
  14. package/dist/tools/events.d.ts +7 -0
  15. package/dist/tools/events.d.ts.map +1 -0
  16. package/dist/tools/events.js +413 -0
  17. package/dist/tools/events.js.map +1 -0
  18. package/dist/tools/fiat.d.ts +2 -2
  19. package/dist/tools/fiat.d.ts.map +1 -1
  20. package/dist/tools/fiat.js +649 -266
  21. package/dist/tools/fiat.js.map +1 -1
  22. package/dist/tools/groups.d.ts +7 -0
  23. package/dist/tools/groups.d.ts.map +1 -0
  24. package/dist/tools/groups.js +312 -0
  25. package/dist/tools/groups.js.map +1 -0
  26. package/dist/tools/guardrails.d.ts +7 -0
  27. package/dist/tools/guardrails.d.ts.map +1 -0
  28. package/dist/tools/guardrails.js +379 -0
  29. package/dist/tools/guardrails.js.map +1 -0
  30. package/dist/tools/index.d.ts +27 -8
  31. package/dist/tools/index.d.ts.map +1 -1
  32. package/dist/tools/index.js +91 -5
  33. package/dist/tools/index.js.map +1 -1
  34. package/dist/tools/payments.d.ts +2 -0
  35. package/dist/tools/payments.d.ts.map +1 -1
  36. package/dist/tools/payments.js +2 -0
  37. package/dist/tools/payments.js.map +1 -1
  38. package/dist/tools/policy.d.ts.map +1 -1
  39. package/dist/tools/policy.js +32 -4
  40. package/dist/tools/policy.js.map +1 -1
  41. package/dist/tools/sandbox.js +1 -1
  42. package/dist/tools/types.d.ts +51 -0
  43. package/dist/tools/types.d.ts.map +1 -1
  44. package/dist/tools/types.js +20 -0
  45. package/dist/tools/types.js.map +1 -1
  46. package/dist/tools/wallet-management.d.ts.map +1 -1
  47. package/dist/tools/wallet-management.js +55 -45
  48. package/dist/tools/wallet-management.js.map +1 -1
  49. package/dist/version.d.ts +2 -0
  50. package/dist/version.d.ts.map +1 -0
  51. package/dist/version.js +2 -0
  52. package/dist/version.js.map +1 -0
  53. package/mcp.json +139 -53
  54. package/package.json +39 -24
package/CHANGELOG.md CHANGED
@@ -5,6 +5,15 @@ All notable changes to this project will be documented in this file.
5
5
  The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
6
6
  and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
7
7
 
8
+ ## [0.2.7] - 2026-02-13
9
+
10
+ ### Changed
11
+
12
+ - Synchronized package/server/catalog version metadata to `0.2.7`
13
+ - Updated embedded MCP tool catalog to match current registered tool set
14
+ - Refreshed CLI/help copy to reflect current tool coverage and canonical docs/GitHub URLs
15
+ - Updated tool category mapping to include newer wallet, sandbox, approval, spending, and group tools
16
+
8
17
  ## [0.1.0] - 2025-01-27
9
18
 
10
19
  ### Added
@@ -66,4 +75,5 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
66
75
  - Risk scoring for each payment request
67
76
  - Human-in-the-loop approval workflows
68
77
 
69
- [0.1.0]: https://github.com/sardis-network/sardis/releases/tag/mcp-server-v0.1.0
78
+ [0.2.7]: https://github.com/EfeDurmaz16/sardis/releases/tag/mcp-server-v0.2.7
79
+ [0.1.0]: https://github.com/EfeDurmaz16/sardis/releases/tag/mcp-server-v0.1.0
@@ -151,30 +151,21 @@ After configuration, restart Claude Desktop. You should see Sardis tools availab
151
151
  2. Check your wallet ID exists
152
152
  3. Ensure sufficient balance for operations
153
153
 
154
- ## Available Tools (36)
154
+ ## Available Tools (50+)
155
155
 
156
- After configuration, Claude will have access to:
156
+ After configuration, Claude gets access to wallet, payment, policy, hold,
157
+ card, fiat, approval, analytics, group-governance, and sandbox tools.
157
158
 
158
- **Wallet**: sardis_get_wallet, sardis_get_balance, sardis_create_wallet, sardis_update_wallet_policy, sardis_list_wallets
159
+ To inspect the exact current tool catalog in your environment, run:
159
160
 
160
- **Payment**: sardis_pay, sardis_get_transaction, sardis_list_transactions
161
-
162
- **Policy**: sardis_check_policy, sardis_validate_limits, sardis_check_compliance
163
-
164
- **Hold**: sardis_create_hold, sardis_capture_hold, sardis_void_hold, sardis_get_hold, sardis_list_holds, sardis_extend_hold
165
-
166
- **Agent**: sardis_create_agent, sardis_get_agent, sardis_list_agents, sardis_update_agent
167
-
168
- **Card**: sardis_issue_card, sardis_get_card, sardis_list_cards, sardis_freeze_card, sardis_unfreeze_card, sardis_cancel_card
169
-
170
- **Fiat**: sardis_fund_wallet, sardis_withdraw_to_bank, sardis_get_funding_status, sardis_get_withdrawal_status
171
-
172
- **Approval**: sardis_request_approval, sardis_get_approval_status
161
+ ```bash
162
+ npx @sardis/mcp-server start
163
+ ```
173
164
 
174
- **Analytics**: sardis_get_spending_summary, sardis_get_spending_by_vendor, sardis_get_spending_by_category
165
+ Then query the `sardis://tools` MCP resource from your client.
175
166
 
176
167
  ## Support
177
168
 
178
- - Documentation: https://docs.sardis.sh
179
- - GitHub Issues: https://github.com/sardis-network/sardis/issues
169
+ - Documentation: https://sardis.sh/docs
170
+ - GitHub Issues: https://github.com/EfeDurmaz16/sardis/issues
180
171
  - Email: support@sardis.sh
package/README.md CHANGED
@@ -4,340 +4,303 @@
4
4
  [![npm downloads](https://img.shields.io/npm/dm/@sardis/mcp-server.svg)](https://www.npmjs.com/package/@sardis/mcp-server)
5
5
  [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)
6
6
 
7
- > Model Context Protocol (MCP) server for Sardis - Enable AI agents to execute secure payments with Financial Hallucination Prevention
7
+ **Payment tools for AI agents works with Claude, ChatGPT, Cursor, VS Code, and any MCP-compatible client.**
8
8
 
9
- ## Table of Contents
9
+ Enable AI agents to execute secure payments, manage wallets, and enforce spending policies through the Model Context Protocol. Non-custodial, policy-enforced, and audit-ready.
10
10
 
11
- - [Quick Start](#quick-start)
12
- - [What is this?](#what-is-this)
13
- - [Installation](#installation)
14
- - [Available Tools](#available-tools-36-total)
15
- - [Policy Engine](#policy-engine)
16
- - [Example Session](#example-session)
17
- - [Environment Variables](#environment-variables)
18
- - [Simulated Mode](#simulated-mode)
19
- - [API Reference](#api-reference)
20
- - [License](#license)
11
+ ---
21
12
 
22
- ## Quick Start
23
-
24
- ```bash
25
- npx @sardis/mcp-server start
26
- ```
27
-
28
- ## What is this?
29
-
30
- Sardis MCP Server allows AI agents (Claude, Cursor, etc.) to execute payments through your Sardis wallet using the Model Context Protocol. It provides **Financial Hallucination Prevention** through natural language spending policies.
31
-
32
- ## Installation
33
-
34
- ### Option 1: npx (Recommended)
35
-
36
- No installation required - run directly:
37
-
38
- ```bash
39
- npx @sardis/mcp-server start
40
- ```
41
-
42
- ### Option 2: Global Install
43
-
44
- ```bash
45
- npm install -g @sardis/mcp-server
46
- sardis-mcp start
47
- ```
48
-
49
- ### Option 3: Local Install
50
-
51
- ```bash
52
- npm install @sardis/mcp-server
53
- npx sardis-mcp start
54
- ```
55
-
56
- ## Configuration
13
+ ## Quick Start (30 seconds)
57
14
 
58
15
  ### Claude Desktop
59
16
 
60
- Add to your Claude Desktop configuration file:
61
-
62
17
  **macOS**: `~/Library/Application Support/Claude/claude_desktop_config.json`
63
18
  **Windows**: `%APPDATA%\Claude\claude_desktop_config.json`
64
19
  **Linux**: `~/.config/Claude/claude_desktop_config.json`
65
20
 
66
- #### Minimal Configuration (Simulated Mode)
67
-
68
21
  ```json
69
22
  {
70
23
  "mcpServers": {
71
24
  "sardis": {
72
25
  "command": "npx",
73
- "args": ["@sardis/mcp-server", "start"]
26
+ "args": ["-y", "@sardis/mcp-server"],
27
+ "env": {
28
+ "SARDIS_API_KEY": "sk_live_your_api_key_here"
29
+ }
74
30
  }
75
31
  }
76
32
  }
77
33
  ```
78
34
 
79
- #### Production Configuration
35
+ ### Cursor
36
+
37
+ `.cursor/mcp.json`:
80
38
 
81
39
  ```json
82
40
  {
83
41
  "mcpServers": {
84
42
  "sardis": {
85
43
  "command": "npx",
86
- "args": ["@sardis/mcp-server", "start"],
44
+ "args": ["-y", "@sardis/mcp-server"],
87
45
  "env": {
88
- "SARDIS_API_KEY": "sk_live_your_api_key_here",
89
- "SARDIS_WALLET_ID": "wal_your_wallet_id",
90
- "SARDIS_MODE": "live"
46
+ "SARDIS_API_KEY": "sk_live_your_api_key_here"
91
47
  }
92
48
  }
93
49
  }
94
50
  }
95
51
  ```
96
52
 
97
- ### Cursor
53
+ ### Windsurf
98
54
 
99
- Add to your Cursor MCP settings (`.cursor/mcp.json` or Cursor settings):
100
-
101
- #### Minimal Configuration
55
+ `.windsurf/mcp.json`:
102
56
 
103
57
  ```json
104
58
  {
105
59
  "mcpServers": {
106
60
  "sardis": {
107
61
  "command": "npx",
108
- "args": ["@sardis/mcp-server", "start"]
62
+ "args": ["-y", "@sardis/mcp-server"],
63
+ "env": {
64
+ "SARDIS_API_KEY": "sk_live_your_api_key_here"
65
+ }
109
66
  }
110
67
  }
111
68
  }
112
69
  ```
113
70
 
114
- #### Production Configuration
71
+ ### VS Code
72
+
73
+ Install the [MCP Extension](https://marketplace.visualstudio.com/items?itemName=modelcontextprotocol.mcp) and add to settings:
115
74
 
116
75
  ```json
117
76
  {
118
- "mcpServers": {
77
+ "mcp.servers": {
119
78
  "sardis": {
120
79
  "command": "npx",
121
- "args": ["@sardis/mcp-server", "start"],
80
+ "args": ["-y", "@sardis/mcp-server"],
122
81
  "env": {
123
- "SARDIS_API_KEY": "sk_live_your_api_key_here",
124
- "SARDIS_WALLET_ID": "wal_your_wallet_id",
125
- "SARDIS_MODE": "live"
82
+ "SARDIS_API_KEY": "sk_live_your_api_key_here"
126
83
  }
127
84
  }
128
85
  }
129
86
  }
130
87
  ```
131
88
 
132
- ### Other MCP Clients
89
+ ### Claude Code
133
90
 
134
- For any MCP-compatible client, use:
91
+ ```bash
92
+ claude mcp add sardis -- npx -y @sardis/mcp-server
93
+ ```
94
+
95
+ Then set your API key:
96
+
97
+ ```bash
98
+ export SARDIS_API_KEY=sk_live_your_api_key_here
99
+ ```
135
100
 
136
- - **Command**: `npx`
137
- - **Arguments**: `["@sardis/mcp-server", "start"]`
138
- - **Transport**: `stdio`
101
+ ### ChatGPT
139
102
 
140
- ## Available Tools (36 total)
103
+ 1. Open ChatGPT Settings
104
+ 2. Navigate to **MCP Servers**
105
+ 3. Click **Add Custom**
106
+ 4. Enter:
107
+ - **Name**: `sardis`
108
+ - **Command**: `npx -y @sardis/mcp-server`
109
+ - **Environment Variable**: `SARDIS_API_KEY=sk_live_your_api_key_here`
141
110
 
142
- ### Wallet Tools (5)
111
+ ---
112
+
113
+ ## Available Tools
114
+
115
+ ### Payments
143
116
 
144
117
  | Tool | Description |
145
118
  |------|-------------|
146
- | `sardis_get_wallet` | Get wallet details and configuration |
147
- | `sardis_get_balance` | Get current wallet balance and spending limits |
148
- | `sardis_create_wallet` | Create a new MPC wallet with optional spending policy |
149
- | `sardis_update_wallet_policy` | Update the spending policy for a wallet |
150
- | `sardis_list_wallets` | List all wallets, optionally filtered by agent or status |
119
+ | `sardis_pay` | Execute a payment to a merchant or wallet address |
120
+ | `sardis_get_transaction` | Retrieve details of a specific transaction |
121
+ | `sardis_list_transactions` | List recent transactions with filters |
151
122
 
152
- ### Payment Tools (3)
123
+ ### Wallets
153
124
 
154
125
  | Tool | Description |
155
126
  |------|-------------|
156
- | `sardis_pay` | Execute a secure payment with policy validation |
157
- | `sardis_get_transaction` | Get transaction status and details |
158
- | `sardis_list_transactions` | List recent transactions for a wallet |
127
+ | `sardis_create_wallet` | Create a new non-custodial MPC wallet |
128
+ | `sardis_get_balance` | Get wallet balance across chains and tokens |
129
+ | `sardis_fund_wallet` | Fund wallet via on-ramp or transfer |
159
130
 
160
- ### Policy Tools (3)
131
+ ### Cards
161
132
 
162
133
  | Tool | Description |
163
134
  |------|-------------|
164
- | `sardis_check_policy` | Check if a payment would be allowed before executing |
165
- | `sardis_validate_limits` | Validate spending against daily/monthly limits |
166
- | `sardis_check_compliance` | Check vendor against compliance rules |
135
+ | `sardis_issue_card` | Issue a virtual card for an agent |
136
+ | `sardis_create_card` | Create a virtual card with spending limits |
137
+ | `sardis_freeze_card` | Temporarily freeze a card |
138
+ | `sardis_cancel_card` | Permanently cancel a card |
167
139
 
168
- ### Hold Tools (6)
140
+ ### Policy
169
141
 
170
142
  | Tool | Description |
171
143
  |------|-------------|
172
- | `sardis_create_hold` | Create a pre-authorization hold on funds |
173
- | `sardis_capture_hold` | Capture a previously created hold |
174
- | `sardis_void_hold` | Void/cancel a hold without capturing |
175
- | `sardis_get_hold` | Get hold status and details |
176
- | `sardis_list_holds` | List active holds for a wallet |
177
- | `sardis_extend_hold` | Extend the expiration of a hold |
144
+ | `sardis_check_policy` | Validate a transaction against spending policies |
145
+ | `sardis_validate_limits` | Check if transaction is within limits |
146
+ | `sardis_get_policies` | List all active spending policies |
178
147
 
179
- ### Agent Tools (4)
148
+ ### Holds
180
149
 
181
150
  | Tool | Description |
182
151
  |------|-------------|
183
- | `sardis_create_agent` | Create a new AI agent with identity |
184
- | `sardis_get_agent` | Get agent details and capabilities |
185
- | `sardis_list_agents` | List all agents in the organization |
186
- | `sardis_update_agent` | Update agent configuration |
152
+ | `sardis_create_hold` | Create a payment hold (authorize without capture) |
153
+ | `sardis_capture_hold` | Capture a previously authorized hold |
154
+ | `sardis_release_hold` | Release a hold without capturing |
155
+ | `sardis_void_hold` | Void an authorization |
187
156
 
188
- ### Card Tools (6)
157
+ ### Approvals
189
158
 
190
159
  | Tool | Description |
191
160
  |------|-------------|
192
- | `sardis_issue_card` | Issue a virtual card linked to a wallet |
193
- | `sardis_get_card` | Get virtual card details (masked) |
194
- | `sardis_list_cards` | List all virtual cards for a wallet |
195
- | `sardis_freeze_card` | Temporarily freeze a virtual card |
196
- | `sardis_unfreeze_card` | Unfreeze a previously frozen card |
197
- | `sardis_cancel_card` | Permanently cancel a virtual card |
161
+ | `sardis_request_approval` | Request human approval for a transaction |
162
+ | `sardis_check_approval` | Check status of a pending approval request |
163
+ | `sardis_list_pending_approvals` | List all pending approval requests |
198
164
 
199
- ### Fiat Tools (4)
165
+ ### Analytics
200
166
 
201
167
  | Tool | Description |
202
168
  |------|-------------|
203
- | `sardis_fund_wallet` | Fund a wallet from bank account, wire, or card |
204
- | `sardis_withdraw_to_bank` | Withdraw funds to a bank account |
205
- | `sardis_get_funding_status` | Check status of a funding transfer |
206
- | `sardis_get_withdrawal_status` | Check status of a withdrawal |
169
+ | `sardis_get_spending_summary` | Get spending summary for a time period |
170
+ | `sardis_get_spending_trends` | Analyze spending trends and patterns |
207
171
 
208
- ### Approval Tools (2)
172
+ ### Groups
209
173
 
210
174
  | Tool | Description |
211
175
  |------|-------------|
212
- | `sardis_request_approval` | Request human approval for payments exceeding limits |
213
- | `sardis_get_approval_status` | Check status of a pending approval request |
176
+ | `sardis_create_group` | Create an agent group with shared budget |
177
+ | `sardis_add_agent_to_group` | Add an agent to a spending group |
178
+ | `sardis_get_group_spending` | Get spending summary for a group |
214
179
 
215
- ### Spending Analytics Tools (3)
180
+ ### Fiat
216
181
 
217
182
  | Tool | Description |
218
183
  |------|-------------|
219
- | `sardis_get_spending_summary` | Get spending summary with totals and limits |
220
- | `sardis_get_spending_by_vendor` | Get spending breakdown by vendor |
221
- | `sardis_get_spending_by_category` | Get spending breakdown by category |
184
+ | `sardis_onramp` | Convert fiat to crypto via on-ramp |
185
+ | `sardis_offramp` | Convert crypto to fiat via off-ramp |
186
+ | `sardis_fiat_balance` | Check fiat balance in connected accounts |
187
+
188
+ ### Sandbox
222
189
 
223
- ## Policy Engine
190
+ | Tool | Description |
191
+ |------|-------------|
192
+ | `sardis_sandbox_*` | Sandbox tools for testing (no API key needed) |
224
193
 
225
- The server validates all payments against your configured spending policy:
194
+ ---
226
195
 
227
- - **Allowed Categories**: SaaS, DevTools, Cloud, API
228
- - **Blocked Merchants**: Configurable blocklist
229
- - **Transaction Limits**: Max per transaction and daily limits
230
- - **Risk Scoring**: Each request gets a risk score
231
- - **Approval Workflows**: Human-in-the-loop for high-value transactions
196
+ ## Demo Mode
232
197
 
233
- ## Example Session
198
+ Try Sardis without an API key using sandbox tools:
234
199
 
200
+ ```bash
201
+ npx @sardis/mcp-server --demo
235
202
  ```
236
- Agent: I need to pay $20 for OpenAI API credits
237
203
 
238
- [sardis_pay] vendor="OpenAI", amount=20, purpose="API Credits"
204
+ Sandbox tools include simulated payments, wallet creation, and policy validation. Perfect for testing integrations before going live.
239
205
 
240
- Result: {
241
- "success": true,
242
- "status": "APPROVED",
243
- "card": {
244
- "number": "4242 **** **** 9999",
245
- "cvv": "847",
246
- "expiry": "12/26"
247
- }
248
- }
206
+ ---
249
207
 
250
- Agent: Can I buy a $500 Amazon gift card?
208
+ ## What Can You Do?
251
209
 
252
- [sardis_pay] vendor="Amazon", amount=500
210
+ Example prompts to try with your AI agent:
253
211
 
254
- Result: {
255
- "success": false,
256
- "status": "BLOCKED",
257
- "error": "POLICY_VIOLATION",
258
- "message": "Merchant \"Amazon\" is not in the approved vendor list",
259
- "prevention": "Financial Hallucination PREVENTED"
260
- }
212
+ **Wallet Management**
213
+ - "Check my agent's wallet balance"
214
+ - "Create a new wallet for my procurement agent"
215
+ - "What's my USDC balance on Base?"
261
216
 
262
- Agent: What's my spending this month?
217
+ **Payments**
218
+ - "Pay $50 USDC to merchant@example.com on Base"
219
+ - "Send 100 USDC to 0x742d35Cc6634C0532925a3b844Bc9e7595f0bEb"
220
+ - "Show me my last 10 transactions"
263
221
 
264
- [sardis_get_spending_summary] period="month"
222
+ **Policy Enforcement**
223
+ - "Create a spending policy: max $500/day for API services"
224
+ - "Can I spend $1000 on AWS right now?"
225
+ - "What are my current spending limits?"
265
226
 
266
- Result: {
267
- "total_spent": "450.00",
268
- "transaction_count": 12,
269
- "remaining_daily_limit": "50.00",
270
- "remaining_monthly_limit": "550.00",
271
- "top_vendor": "OpenAI"
272
- }
273
- ```
227
+ **Virtual Cards**
228
+ - "Issue a virtual card for my procurement agent"
229
+ - "Create a card with a $200 monthly limit for SaaS subscriptions"
230
+ - "Freeze card ending in 1234"
274
231
 
275
- ## Environment Variables
232
+ **Analytics**
233
+ - "Show spending summary for the last 30 days"
234
+ - "What are my top 5 vendors this month?"
235
+ - "Analyze spending trends for Q1"
276
236
 
277
- | Variable | Required | Default | Description |
278
- |----------|----------|---------|-------------|
279
- | `SARDIS_API_KEY` | No | - | Your Sardis API key. Get one at [sardis.sh](https://sardis.sh) |
280
- | `SARDIS_WALLET_ID` | No | - | Default wallet ID for operations |
281
- | `SARDIS_AGENT_ID` | No | - | Agent ID for this MCP connection |
282
- | `SARDIS_MODE` | No | `simulated` | `live` for real transactions, `simulated` for testing |
283
- | `SARDIS_API_URL` | No | `https://api.sardis.sh` | API endpoint (for enterprise/self-hosted) |
237
+ **Approvals**
238
+ - "Request approval for a $2500 payment to Stripe"
239
+ - "Check status of pending approval requests"
240
+ - "List all transactions waiting for approval"
284
241
 
285
- ### Getting Your API Key
242
+ ---
286
243
 
287
- 1. Sign up at [sardis.sh](https://sardis.sh)
288
- 2. Go to Settings > API Keys
289
- 3. Create a new API key with appropriate permissions
290
- 4. Add it to your MCP configuration
244
+ ## Security
291
245
 
292
- ## Simulated Mode
246
+ ### Non-Custodial Architecture
293
247
 
294
- When running without an API key, the server operates in simulated mode with:
295
- - Mock wallet with $1000 balance
296
- - Simulated transactions that don't execute on-chain
297
- - Full policy validation to test your rules
298
- - Realistic response formats
248
+ Sardis uses Turnkey MPC (Multi-Party Computation) for key management. Private keys are never exposed or stored—they exist only as distributed key shares across secure enclaves.
299
249
 
300
- ## API Reference
250
+ ### Policy Enforcement
301
251
 
302
- ### Tools Schema
252
+ Every transaction is validated against:
253
+ - **Spending limits** (per-transaction, daily, monthly)
254
+ - **Allowed categories** (SaaS, DevTools, Cloud, API, etc.)
255
+ - **Blocked merchants** (configurable blocklist)
256
+ - **Risk scoring** (KYA trust scoring for agents)
303
257
 
304
- Each tool follows the MCP tool specification:
258
+ ### KYA (Know Your Agent) Trust Scoring
305
259
 
306
- ```typescript
307
- interface Tool {
308
- name: string;
309
- description: string;
310
- inputSchema: JSONSchema;
311
- }
312
- ```
260
+ Agents are assigned trust scores based on:
261
+ - Transaction history
262
+ - Policy compliance rate
263
+ - Approval patterns
264
+ - Anomaly detection
313
265
 
314
- ### Common Parameters
266
+ ### Audit Trail
315
267
 
316
- | Parameter | Type | Description |
317
- |-----------|------|-------------|
318
- | `wallet_id` | `string` | The wallet ID to operate on |
319
- | `amount` | `string` | Amount in USD (e.g., "100.00") |
320
- | `vendor` | `string` | Merchant/vendor name |
321
- | `purpose` | `string` | Description of the payment purpose |
268
+ All transactions are logged to an append-only ledger for:
269
+ - Compliance reporting
270
+ - Dispute resolution
271
+ - Forensic analysis
272
+ - Regulatory audits
322
273
 
323
- ### Response Format
274
+ ---
324
275
 
325
- All tools return responses in this format:
276
+ ## Environment Variables
326
277
 
327
- ```typescript
328
- interface ToolResponse {
329
- success: boolean;
330
- status: 'APPROVED' | 'BLOCKED' | 'PENDING' | 'ERROR';
331
- data?: Record<string, unknown>;
332
- error?: string;
333
- message?: string;
334
- }
335
- ```
278
+ | Variable | Required | Default | Description |
279
+ |----------|----------|---------|-------------|
280
+ | `SARDIS_API_KEY` | No | - | Your Sardis API key ([get one](https://sardis.sh)) |
281
+ | `SARDIS_WALLET_ID` | No | - | Default wallet ID for operations |
282
+ | `SARDIS_AGENT_ID` | No | - | Agent ID for this MCP connection |
283
+ | `SARDIS_MODE` | No | `sandbox` | `live` for real transactions, `sandbox` for testing |
284
+ | `SARDIS_API_URL` | No | `https://api.sardis.sh` | API endpoint (for enterprise/self-hosted) |
285
+
286
+ ---
287
+
288
+ ## Links
289
+
290
+ - **Website**: [sardis.sh](https://sardis.sh)
291
+ - **Documentation**: [docs.sardis.sh](https://docs.sardis.sh)
292
+ - **GitHub**: [github.com/EfeDurmaz16/sardis](https://github.com/EfeDurmaz16/sardis)
293
+ - **Discord**: [discord.gg/XMA9JwDJ](https://discord.gg/XMA9JwDJ)
294
+ - **Support**: support@sardis.sh
295
+
296
+ ---
336
297
 
337
298
  ## Requirements
338
299
 
339
300
  - Node.js 18.0.0 or higher
340
- - Claude Desktop, Cursor, or any MCP-compatible client
301
+ - MCP-compatible client (Claude Desktop, Cursor, VS Code, etc.)
302
+
303
+ ---
341
304
 
342
305
  ## Troubleshooting
343
306
 
@@ -347,29 +310,24 @@ interface ToolResponse {
347
310
  2. Clear npx cache: `npx clear-npx-cache`
348
311
  3. Try global install: `npm install -g @sardis/mcp-server`
349
312
 
350
- ### Tools not appearing in Claude
313
+ ### Tools not appearing
351
314
 
352
- 1. Restart Claude Desktop after configuration changes
353
- 2. Check the configuration file path is correct for your OS
354
- 3. Verify JSON syntax is valid
315
+ 1. Restart your MCP client after configuration changes
316
+ 2. Verify JSON syntax in config file
317
+ 3. Check file path is correct for your OS
355
318
 
356
319
  ### API errors
357
320
 
358
- 1. Check your API key is valid
321
+ 1. Verify API key is valid at [sardis.sh/settings/api-keys](https://sardis.sh/settings/api-keys)
359
322
  2. Ensure `SARDIS_MODE` is set to `live` for production
360
- 3. Verify wallet ID exists in your account
361
-
362
- ## Support
323
+ 3. Check wallet ID exists in your account
363
324
 
364
- - [Documentation](https://docs.sardis.sh)
365
- - [GitHub Issues](https://github.com/sardis-network/sardis/issues)
366
- - [Discord Community](https://discord.gg/sardis)
367
- - Email: support@sardis.sh
368
-
369
- ## Contributing
370
-
371
- See [CONTRIBUTING.md](../../CONTRIBUTING.md) for guidelines.
325
+ ---
372
326
 
373
327
  ## License
374
328
 
375
329
  MIT - see [LICENSE](./LICENSE) for details.
330
+
331
+ ---
332
+
333
+ **Built with the Model Context Protocol (MCP)** — enabling AI agents to safely interact with external tools and services.
package/dist/api.d.ts CHANGED
@@ -6,7 +6,7 @@
6
6
  /**
7
7
  * Make an API request to Sardis
8
8
  */
9
- export declare function apiRequest<T>(method: string, path: string, body?: unknown): Promise<T>;
9
+ export declare function apiRequest<T>(method: string, path: string, body?: unknown, extraHeaders?: Record<string, string>): Promise<T>;
10
10
  /**
11
11
  * Generate unique mandate ID
12
12
  *
package/dist/api.d.ts.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"api.d.ts","sourceRoot":"","sources":["../src/api.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAIH;;GAEG;AACH,wBAAsB,UAAU,CAAC,CAAC,EAChC,MAAM,EAAE,MAAM,EACd,IAAI,EAAE,MAAM,EACZ,IAAI,CAAC,EAAE,OAAO,GACb,OAAO,CAAC,CAAC,CAAC,CAsBZ;AAED;;;;;GAKG;AACH,wBAAgB,iBAAiB,IAAI,MAAM,CAS1C;AAED;;;;;;GAMG;AACH,wBAAsB,eAAe,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC,CAmBnE"}
1
+ {"version":3,"file":"api.d.ts","sourceRoot":"","sources":["../src/api.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAKH;;GAEG;AACH,wBAAsB,UAAU,CAAC,CAAC,EAChC,MAAM,EAAE,MAAM,EACd,IAAI,EAAE,MAAM,EACZ,IAAI,CAAC,EAAE,OAAO,EACd,YAAY,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,GACpC,OAAO,CAAC,CAAC,CAAC,CAuBZ;AAED;;;;;GAKG;AACH,wBAAgB,iBAAiB,IAAI,MAAM,CAS1C;AAED;;;;;;GAMG;AACH,wBAAsB,eAAe,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC,CAmBnE"}
package/dist/api.js CHANGED
@@ -4,10 +4,11 @@
4
4
  * Handles all API communication with the Sardis backend.
5
5
  */
6
6
  import { getConfig } from './config.js';
7
+ import { MCP_SERVER_VERSION } from './version.js';
7
8
  /**
8
9
  * Make an API request to Sardis
9
10
  */
10
- export async function apiRequest(method, path, body) {
11
+ export async function apiRequest(method, path, body, extraHeaders) {
11
12
  const config = getConfig();
12
13
  const url = `${config.apiUrl}${path.startsWith('/') ? path : '/' + path}`;
13
14
  const paymentIdentity = process.env.SARDIS_PAYMENT_IDENTITY;
@@ -16,8 +17,9 @@ export async function apiRequest(method, path, body) {
16
17
  headers: {
17
18
  'X-API-Key': config.apiKey,
18
19
  'Content-Type': 'application/json',
19
- 'User-Agent': 'sardis-mcp-server/0.1.0',
20
+ 'User-Agent': `sardis-mcp-server/${MCP_SERVER_VERSION}`,
20
21
  ...(paymentIdentity ? { 'X-Sardis-Payment-Identity': paymentIdentity } : {}),
22
+ ...(extraHeaders || {}),
21
23
  },
22
24
  body: body ? JSON.stringify(body) : undefined,
23
25
  });