@getcheddar/cheddar-mcp 0.1.0 → 1.0.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.
- package/README.md +52 -30
- package/package.json +2 -4
package/README.md
CHANGED
|
@@ -13,47 +13,66 @@ A Model Context Protocol (MCP) server for integrating with the Cheddar Payment P
|
|
|
13
13
|
|
|
14
14
|
## Installation
|
|
15
15
|
|
|
16
|
-
### Option 1: Run with npx (
|
|
16
|
+
### Option 1: Run with npx (recommended)
|
|
17
17
|
|
|
18
18
|
```bash
|
|
19
|
-
npx @
|
|
19
|
+
npx -y @getcheddar/cheddar-mcp
|
|
20
20
|
```
|
|
21
21
|
|
|
22
22
|
### Option 2: Install globally
|
|
23
23
|
|
|
24
24
|
```bash
|
|
25
|
-
npm install -g @
|
|
25
|
+
npm install -g @getcheddar/cheddar-mcp
|
|
26
26
|
cheddar-mcp
|
|
27
27
|
```
|
|
28
28
|
|
|
29
29
|
### Option 3: Docker
|
|
30
30
|
|
|
31
|
+
Build the image from this package (there is no guaranteed public image on a registry yet):
|
|
32
|
+
|
|
31
33
|
```bash
|
|
34
|
+
# From the repository root, or set context to this directory
|
|
35
|
+
docker build -t cheddar-mcp ./packages/cheddar-mcp
|
|
36
|
+
|
|
32
37
|
docker run -i --rm \
|
|
33
|
-
-e CHEDDAR_API_URL=https://api.
|
|
38
|
+
-e CHEDDAR_API_URL=https://api.getcheddar.com \
|
|
34
39
|
-e CHEDDAR_ACCESS_TOKEN=your_token \
|
|
35
|
-
|
|
40
|
+
cheddar-mcp
|
|
36
41
|
```
|
|
37
42
|
|
|
38
43
|
## Configuration
|
|
39
44
|
|
|
40
45
|
Set the following environment variables:
|
|
41
46
|
|
|
42
|
-
| Variable
|
|
43
|
-
|
|
|
44
|
-
| `CHEDDAR_API_URL`
|
|
45
|
-
| `CHEDDAR_ACCESS_TOKEN`
|
|
46
|
-
| `CHEDDAR_CLIENT_ID`
|
|
47
|
-
| `CHEDDAR_CLIENT_SECRET`
|
|
47
|
+
| Variable | Required for API calls | Description |
|
|
48
|
+
| ------------------------- | ---------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
49
|
+
| `CHEDDAR_API_URL` | No | REST API base URL. **Production:** `https://api.getcheddar.com`. If unset, the server defaults to `https://api.chdr.dev`. For local Cheddar docker development, use the API host from your stack (often `http://api.chdrdev.com` or `http://api.chdrdev.com:8888` with hosts file entries). |
|
|
50
|
+
| `CHEDDAR_ACCESS_TOKEN` | **Yes** | OAuth2 access token, sent as `Authorization: Bearer …` on every request. |
|
|
51
|
+
| `CHEDDAR_CLIENT_ID` | No† | OAuth2 client ID (reserved for future automatic token acquisition in this package). |
|
|
52
|
+
| `CHEDDAR_CLIENT_SECRET` | No† | OAuth2 client secret (same as above). |
|
|
53
|
+
|
|
54
|
+
†The process may start if both `CHEDDAR_CLIENT_ID` and `CHEDDAR_CLIENT_SECRET` are set without a token, but **API calls will fail** until `CHEDDAR_ACCESS_TOKEN` is set. Client-credentials exchange is not implemented in the client yet—use a bearer token.
|
|
48
55
|
|
|
49
|
-
|
|
56
|
+
### Getting credentials and an access token
|
|
50
57
|
|
|
51
|
-
|
|
58
|
+
1. Sign in to your Cheddar merchant admin (production login: [https://login.getcheddar.com](https://login.getcheddar.com)).
|
|
59
|
+
2. In the dashboard, open the section where **API / OAuth2** clients (or API keys) are managed, and create or copy a client that supports the **client credentials** grant.
|
|
60
|
+
3. Request an access token from the OAuth token endpoint:
|
|
52
61
|
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
62
|
+
- **Production:** `POST` [https://login.getcheddar.com/oauth/token](https://login.getcheddar.com/oauth/token)
|
|
63
|
+
- **Headers:** `Content-Type: application/json`
|
|
64
|
+
- **Body (example):**
|
|
65
|
+
|
|
66
|
+
```json
|
|
67
|
+
{
|
|
68
|
+
"grant_type": "client_credentials",
|
|
69
|
+
"client_id": "your-client-id",
|
|
70
|
+
"client_secret": "your-client-secret"
|
|
71
|
+
}
|
|
72
|
+
```
|
|
73
|
+
|
|
74
|
+
4. Set `CHEDDAR_ACCESS_TOKEN` to the `access_token` value from the response.
|
|
75
|
+
5. Set `CHEDDAR_API_URL` to the API base for that environment (production: `https://api.getcheddar.com`).
|
|
57
76
|
|
|
58
77
|
## Usage with Claude Desktop
|
|
59
78
|
|
|
@@ -64,9 +83,9 @@ Add to your Claude Desktop configuration (`~/Library/Application Support/Claude/
|
|
|
64
83
|
"mcpServers": {
|
|
65
84
|
"cheddar": {
|
|
66
85
|
"command": "npx",
|
|
67
|
-
"args": ["-y", "@
|
|
86
|
+
"args": ["-y", "@getcheddar/cheddar-mcp"],
|
|
68
87
|
"env": {
|
|
69
|
-
"CHEDDAR_API_URL": "https://api.
|
|
88
|
+
"CHEDDAR_API_URL": "https://api.getcheddar.com",
|
|
70
89
|
"CHEDDAR_ACCESS_TOKEN": "your-access-token"
|
|
71
90
|
}
|
|
72
91
|
}
|
|
@@ -76,22 +95,25 @@ Add to your Claude Desktop configuration (`~/Library/Application Support/Claude/
|
|
|
76
95
|
|
|
77
96
|
## Usage with Cursor
|
|
78
97
|
|
|
79
|
-
1. Open Cursor Settings
|
|
80
|
-
2. Navigate to Features
|
|
81
|
-
3. Add a new MCP server
|
|
82
|
-
- Name
|
|
83
|
-
- Command
|
|
84
|
-
-
|
|
98
|
+
1. Open Cursor Settings.
|
|
99
|
+
2. Navigate to **Features → MCP**.
|
|
100
|
+
3. Add a new MCP server:
|
|
101
|
+
- **Name:** `cheddar`
|
|
102
|
+
- **Command:** `npx`
|
|
103
|
+
- **Arguments:** `-y`, `@getcheddar/cheddar-mcp`
|
|
104
|
+
- **Environment:** same variables as above (`CHEDDAR_API_URL`, `CHEDDAR_ACCESS_TOKEN`), or rely on a wrapper script that exports them.
|
|
105
|
+
|
|
106
|
+
Prefer defining `env` in the MCP server configuration so the token is not tied to a single terminal session.
|
|
85
107
|
|
|
86
108
|
## Available Tools
|
|
87
109
|
|
|
88
110
|
### Customer Management
|
|
89
111
|
|
|
90
|
-
| Tool | Description
|
|
91
|
-
| ------------------------- |
|
|
112
|
+
| Tool | Description |
|
|
113
|
+
| ------------------------- | ----------------------------------- |
|
|
92
114
|
| `cheddar_customer_get` | Retrieve a customer by ID or code |
|
|
93
|
-
| `cheddar_customer_create` | Create a new customer
|
|
94
|
-
| `cheddar_customer_update` | Update customer information
|
|
115
|
+
| `cheddar_customer_create` | Create a new customer |
|
|
116
|
+
| `cheddar_customer_update` | Update customer information |
|
|
95
117
|
|
|
96
118
|
### Payment Methods
|
|
97
119
|
|
|
@@ -112,7 +134,7 @@ Add to your Claude Desktop configuration (`~/Library/Application Support/Claude/
|
|
|
112
134
|
| `cheddar_subscription_get_plan` | Get plan from subscription |
|
|
113
135
|
| `cheddar_subscription_get_payment_method` | Get payment method from subscription |
|
|
114
136
|
| `cheddar_subscription_delete_promotion` | Remove promotion from subscription |
|
|
115
|
-
| `cheddar_plan_get` | Retrieve plan by ID or code
|
|
137
|
+
| `cheddar_plan_get` | Retrieve plan by ID or code |
|
|
116
138
|
| `cheddar_gateway_account_get` | Get gateway account details |
|
|
117
139
|
|
|
118
140
|
### Checkout Integration
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@getcheddar/cheddar-mcp",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "1.0.3",
|
|
4
4
|
"description": "Model Context Protocol server for Cheddar Payment Platform integration",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"access": "public"
|
|
@@ -18,13 +18,11 @@
|
|
|
18
18
|
],
|
|
19
19
|
"scripts": {
|
|
20
20
|
"build": "tsc",
|
|
21
|
-
"clean": "rm -rf dist",
|
|
22
21
|
"dev": "tsc --watch",
|
|
23
22
|
"start": "node dist/index.js",
|
|
24
23
|
"test": "vitest",
|
|
25
24
|
"lint": "eslint src/**/*.ts",
|
|
26
|
-
"format": "prettier --write src/**/*.ts"
|
|
27
|
-
"prepublishOnly": "npm run clean && npm run build"
|
|
25
|
+
"format": "prettier --write src/**/*.ts"
|
|
28
26
|
},
|
|
29
27
|
"keywords": [
|
|
30
28
|
"mcp",
|