askell-mcp 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.
package/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 askell-mcp contributors
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md ADDED
@@ -0,0 +1,204 @@
1
+ # askell-mcp
2
+
3
+ MCP server for [Askell](https://askell.is) payment and subscription API — monitoring, discovery, and operator-approved mutations.
4
+
5
+ Built with [Bun](https://bun.sh) and [@modelcontextprotocol/server](https://ts.sdk.modelcontextprotocol.io/v2/) (MCP TypeScript SDK v2).
6
+
7
+ **Requires [Bun](https://bun.sh) ≥ 1.1.**
8
+
9
+ Distributed as an npm package for `bunx`, plus optional compiled binaries on GitHub Releases.
10
+
11
+ ## Install (users)
12
+
13
+ ### Option A — bunx (recommended)
14
+
15
+ Requires Bun on the machine. In Cursor / Claude Desktop `mcp.json`:
16
+
17
+ ```json
18
+ {
19
+ "mcpServers": {
20
+ "askell": {
21
+ "command": "bunx",
22
+ "args": ["-y", "askell-mcp"],
23
+ "env": {
24
+ "ASKELL_PRIVATE_API_KEY": "your_secret_api_key",
25
+ "ASKELL_PUBLIC_API_KEY": "your_public_api_key_optional"
26
+ }
27
+ }
28
+ }
29
+ }
30
+ ```
31
+
32
+ Or globally:
33
+
34
+ ```bash
35
+ bun add -g askell-mcp
36
+ askell-mcp
37
+ ```
38
+
39
+ ### Option B — compiled binary (no Bun at runtime)
40
+
41
+ Download the asset for your OS/arch from the [GitHub Release](https://github.com/Neschadin/askell-mcp/releases) for the version you want
42
+ (`askell-mcp-linux-x64`, `askell-mcp-darwin-arm64`, …), `chmod +x`, then:
43
+
44
+ ```json
45
+ {
46
+ "mcpServers": {
47
+ "askell": {
48
+ "command": "/absolute/path/to/askell-mcp-linux-x64",
49
+ "env": {
50
+ "ASKELL_PRIVATE_API_KEY": "your_secret_api_key"
51
+ }
52
+ }
53
+ }
54
+ }
55
+ ```
56
+
57
+ See also [`mcp.json.example`](./mcp.json.example).
58
+
59
+ ## Features
60
+
61
+ - **`askell_call`** — call any v1/v2 endpoint; mutating requests require operator approval via MCP elicitation
62
+ - **`askell_list_operations` / `askell_describe_operation`** — discover endpoints from bundled OpenAPI specs
63
+ - **Analysis helpers** — `askell_paginate_all`, `askell_customer_overview`, `askell_contract_overview`, `askell_billing_run_triage`, `askell_list_webhooks`
64
+ - **Resources** — bundled OpenAPI v1/v2 specs and webhook event reference
65
+
66
+ ## Askell environments
67
+
68
+ Askell does **not** expose a separate sandbox/staging API host. Production and test integrations use the same base URL:
69
+
70
+ ```text
71
+ https://askell.is/api
72
+ ```
73
+
74
+ Testing is done with the **Áskell Test Gateway** payment acquirer in your Askell account dashboard, not via a different API hostname. See [Askell Set Up docs](https://docs.askell.is/en/getting_started/index.html).
75
+
76
+ `apiBaseUrl` remains configurable in case Askell adds environments later.
77
+
78
+ ## Configuration
79
+
80
+ | Variable | Required | Default |
81
+ | --------------------------------------------------- | -------- | ----------------------- |
82
+ | `ASKELL_PRIVATE_API_KEY` or `ASKELL_SECRET_API_KEY` | yes | — |
83
+ | `ASKELL_PUBLIC_API_KEY` | no | — |
84
+ | `ASKELL_API_URL` or `ASKELL_API_BASE_URL` | no | `https://askell.is/api` |
85
+ | `ASKELL_RESPONSE_MAX_BYTES` | no | `64000` |
86
+ | `ASKELL_REQUIRE_MUTATION_APPROVAL` | no | `true` |
87
+
88
+ ## Develop locally
89
+
90
+ ```bash
91
+ cp .env.example .env
92
+ # edit keys
93
+ bun install
94
+ bun run dev
95
+ ```
96
+
97
+ Bun loads `.env` automatically from the project root.
98
+
99
+ From a checkout (without publishing):
100
+
101
+ ```json
102
+ {
103
+ "mcpServers": {
104
+ "askell": {
105
+ "command": "bun",
106
+ "args": ["run", "bin/askell-mcp"],
107
+ "cwd": "/absolute/path/to/askell-mcp",
108
+ "env": {
109
+ "ASKELL_PRIVATE_API_KEY": "..."
110
+ }
111
+ }
112
+ }
113
+ }
114
+ ```
115
+
116
+ Unit tests (no network):
117
+
118
+ ```bash
119
+ bun test
120
+ ```
121
+
122
+ Live smoke / integration (needs `ASKELL_PRIVATE_API_KEY` in `.env`):
123
+
124
+ ```bash
125
+ bun run smoke
126
+ bun run test:integration
127
+ ```
128
+
129
+ Inspector:
130
+
131
+ ```bash
132
+ bun run inspect
133
+ ```
134
+
135
+ ## Sync OpenAPI specs
136
+
137
+ ```bash
138
+ bun run sync-specs
139
+ ```
140
+
141
+ Downloads:
142
+
143
+ - v1: https://askell.is/api/swagger/swagger.json
144
+ - v2: https://askell.is/api/swagger/v2/swagger.json
145
+
146
+ ## Release
147
+
148
+ Push a semver tag (e.g. `v0.1.0`). CI runs: **validate** → **build** (4 cross-compiled binaries on Ubuntu) → **GitHub Release** (with `SHA256SUMS`) → **npm publish** (OIDC).
149
+
150
+ Prerelease tags (`v0.1.0-rc.1`) mark the GitHub release as prerelease and publish npm under the `next` dist-tag.
151
+
152
+ ### npm Trusted Publishing (required)
153
+
154
+ Classic `NPM_TOKEN` + 2FA fails CI with `EOTP`. Use OIDC only:
155
+
156
+ 1. Create the package on [npmjs.com](https://www.npmjs.com/) (empty / first manual publish if the name is new)
157
+ 2. Open **askell-mcp** → **Settings** → **Trusted Publisher** → GitHub Actions:
158
+ - Organization or user: `Neschadin`
159
+ - Repository: `askell-mcp`
160
+ - Workflow filename: `release.yml` (filename only)
161
+ 3. Do **not** set `NPM_TOKEN` / `NODE_AUTH_TOKEN` in the repo — workflow uses `id-token: write`
162
+ 4. After a successful OIDC publish, revoke any legacy automation tokens and prefer “Require 2FA and disallow tokens”
163
+
164
+ Local binary builds:
165
+
166
+ ```bash
167
+ bun run build:linux-x64
168
+ # → dist/askell-mcp-linux-x64
169
+ ```
170
+
171
+ Dry-run pack:
172
+
173
+ ```bash
174
+ npm pack --dry-run
175
+ ```
176
+
177
+ ## Tools
178
+
179
+ | Tool | Description |
180
+ | --------------------------- | ----------------------------------------- |
181
+ | `askell_list_operations` | Search bundled OpenAPI operations |
182
+ | `askell_describe_operation` | Full params/body schema for one operation |
183
+ | `askell_call` | Raw API call with mutation approval |
184
+ | `askell_paginate_all` | Auto-follow paginated list endpoints |
185
+ | `askell_customer_overview` | v1 customer + subscriptions |
186
+ | `askell_contract_overview` | v2 contract + billing runs |
187
+ | `askell_billing_run_triage` | v2 billing run + optional contract |
188
+ | `askell_list_webhooks` | v1 webhook management list |
189
+
190
+ ## Evaluation
191
+
192
+ `evaluation.xml` has 10 read-only Q&A pairs for testing whether an LLM can use these tools effectively. Run with the skill harness if present:
193
+
194
+ ```bash
195
+ python .agents/skills/mcp-tool-design/scripts/evaluation.py \
196
+ -t stdio -c bun -a run bin/askell-mcp \
197
+ -e ASKELL_PRIVATE_API_KEY=... \
198
+ -o evaluation_report.md \
199
+ evaluation.xml
200
+ ```
201
+
202
+ ## License
203
+
204
+ MIT
package/bin/askell-mcp ADDED
@@ -0,0 +1,2 @@
1
+ #!/usr/bin/env bun
2
+ import '../src/index.ts';
@@ -0,0 +1,12 @@
1
+ {
2
+ "mcpServers": {
3
+ "askell": {
4
+ "command": "bunx",
5
+ "args": ["-y", "askell-mcp"],
6
+ "env": {
7
+ "ASKELL_PRIVATE_API_KEY": "your_secret_api_key",
8
+ "ASKELL_PUBLIC_API_KEY": "your_public_api_key_optional"
9
+ }
10
+ }
11
+ }
12
+ }
package/package.json ADDED
@@ -0,0 +1,69 @@
1
+ {
2
+ "name": "askell-mcp",
3
+ "version": "0.1.0",
4
+ "description": "MCP server for the Askell payment and subscription API (Bun + stdio)",
5
+ "author": "Neschadin Oleksandr",
6
+ "license": "MIT",
7
+ "repository": {
8
+ "type": "git",
9
+ "url": "git+https://github.com/Neschadin/askell-mcp.git"
10
+ },
11
+ "bugs": {
12
+ "url": "https://github.com/Neschadin/askell-mcp/issues"
13
+ },
14
+ "homepage": "https://github.com/Neschadin/askell-mcp#readme",
15
+ "keywords": [
16
+ "mcp",
17
+ "askell",
18
+ "model-context-protocol",
19
+ "bun",
20
+ "payments",
21
+ "subscriptions"
22
+ ],
23
+ "type": "module",
24
+ "module": "src/index.ts",
25
+ "bin": {
26
+ "askell-mcp": "bin/askell-mcp"
27
+ },
28
+ "files": [
29
+ "bin",
30
+ "src",
31
+ "!**/*.test.ts",
32
+ "spec",
33
+ "LICENSE",
34
+ "README.md",
35
+ "mcp.json.example"
36
+ ],
37
+ "engines": {
38
+ "bun": ">=1.3.14"
39
+ },
40
+ "publishConfig": {
41
+ "access": "public",
42
+ "provenance": true
43
+ },
44
+ "scripts": {
45
+ "dev": "bun run src/index.ts",
46
+ "start": "bun run bin/askell-mcp",
47
+ "test": "bun test",
48
+ "smoke": "bun run scripts/smoke-test.ts",
49
+ "test:integration": "bun run scripts/integration-test.ts",
50
+ "typecheck": "tsc --noEmit",
51
+ "inspect": "bunx @modelcontextprotocol/inspector bun bin/askell-mcp",
52
+ "sync-specs": "bun run scripts/sync-specs.ts",
53
+ "prepack": "bun test && bun run typecheck",
54
+ "build": "bun build --compile src/index.ts --outfile dist/askell-mcp",
55
+ "build:linux-x64": "bun build --compile --target=bun-linux-x64 src/index.ts --outfile dist/askell-mcp-linux-x64",
56
+ "build:linux-arm64": "bun build --compile --target=bun-linux-arm64 src/index.ts --outfile dist/askell-mcp-linux-arm64",
57
+ "build:darwin-arm64": "bun build --compile --target=bun-darwin-arm64 src/index.ts --outfile dist/askell-mcp-darwin-arm64",
58
+ "build:darwin-x64": "bun build --compile --target=bun-darwin-x64 src/index.ts --outfile dist/askell-mcp-darwin-x64",
59
+ "build:all": "bun run build && bun run build:linux-x64 && bun run build:linux-arm64 && bun run build:darwin-arm64 && bun run build:darwin-x64"
60
+ },
61
+ "devDependencies": {
62
+ "@types/bun": "1.3.14",
63
+ "typescript": "7.0.2"
64
+ },
65
+ "dependencies": {
66
+ "@modelcontextprotocol/server": "2.0.0",
67
+ "zod": "4.4.3"
68
+ }
69
+ }