askell-mcp 0.4.0 → 0.4.2
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 +3 -3
- package/mcp.json.example +2 -2
- package/package.json +3 -1
- package/src/config.ts +6 -6
- package/src/index.ts +3 -1
- package/src/server.ts +1 -1
package/README.md
CHANGED
|
@@ -28,7 +28,7 @@ Prefer **two server entries** if you have both production and sandbox keys. Tool
|
|
|
28
28
|
"mcpServers": {
|
|
29
29
|
"askell-prod": {
|
|
30
30
|
"command": "bunx",
|
|
31
|
-
"args": ["-y", "askell-mcp"],
|
|
31
|
+
"args": ["-y", "askell-mcp@latest"],
|
|
32
32
|
"env": {
|
|
33
33
|
"ASKELL_ENV": "production",
|
|
34
34
|
"ASKELL_PRIVATE_API_KEY": "your_production_secret_api_key"
|
|
@@ -36,7 +36,7 @@ Prefer **two server entries** if you have both production and sandbox keys. Tool
|
|
|
36
36
|
},
|
|
37
37
|
"askell-sandbox": {
|
|
38
38
|
"command": "bunx",
|
|
39
|
-
"args": ["-y", "askell-mcp"],
|
|
39
|
+
"args": ["-y", "askell-mcp@latest"],
|
|
40
40
|
"env": {
|
|
41
41
|
"ASKELL_ENV": "sandbox",
|
|
42
42
|
"ASKELL_PRIVATE_API_KEY": "your_sandbox_secret_api_key"
|
|
@@ -73,7 +73,7 @@ Restart the client after saving.
|
|
|
73
73
|
| `ASKELL_PRIVATE_API_KEY` | yes\* | — | Secret API key (_or_ `ASKELL_SECRET_API_KEY`) |
|
|
74
74
|
| `ASKELL_PUBLIC_API_KEY` | no | — | Public key for a few checkout/payment endpoints |
|
|
75
75
|
| `ASKELL_ENV` | no | `production` | `production` \| `sandbox` — selects the official API host |
|
|
76
|
-
| `
|
|
76
|
+
| `ASKELL_API_BASE_URL` | no | — | Custom/local API base only. Do not set together with `ASKELL_ENV` unless it matches |
|
|
77
77
|
| `ASKELL_RESPONSE_MAX_BYTES` | no | `64000` | Max response size returned to the model |
|
|
78
78
|
| `ASKELL_MUTATION_GATE` | no | `auto` | `auto` / `elicit` / `off` — see below |
|
|
79
79
|
| `ASKELL_REQUIRE_MUTATION_APPROVAL` | no | — | Deprecated alias: `true`→`elicit`, `false`→`off` |
|
package/mcp.json.example
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"mcpServers": {
|
|
3
3
|
"askell-prod": {
|
|
4
4
|
"command": "bunx",
|
|
5
|
-
"args": ["-y", "askell-mcp"],
|
|
5
|
+
"args": ["-y", "askell-mcp@latest"],
|
|
6
6
|
"env": {
|
|
7
7
|
"ASKELL_ENV": "production",
|
|
8
8
|
"ASKELL_PRIVATE_API_KEY": "your_production_secret_api_key",
|
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
},
|
|
12
12
|
"askell-sandbox": {
|
|
13
13
|
"command": "bunx",
|
|
14
|
-
"args": ["-y", "askell-mcp"],
|
|
14
|
+
"args": ["-y", "askell-mcp@latest"],
|
|
15
15
|
"env": {
|
|
16
16
|
"ASKELL_ENV": "sandbox",
|
|
17
17
|
"ASKELL_PRIVATE_API_KEY": "your_sandbox_secret_api_key",
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "askell-mcp",
|
|
3
|
-
"version": "0.4.
|
|
3
|
+
"version": "0.4.2",
|
|
4
4
|
"description": "MCP server for the Askell payment and subscription API (Bun + stdio)",
|
|
5
5
|
"author": "Neschadin Oleksandr",
|
|
6
6
|
"license": "MIT",
|
|
@@ -43,6 +43,8 @@
|
|
|
43
43
|
},
|
|
44
44
|
"scripts": {
|
|
45
45
|
"dev": "bun run src/index.ts",
|
|
46
|
+
"dev:prod": "bun --no-env-file --env-file=.env run src/index.ts",
|
|
47
|
+
"dev:sandbox": "bun --no-env-file --env-file=.env.sandbox run src/index.ts",
|
|
46
48
|
"start": "bun run bin/askell-mcp",
|
|
47
49
|
"test": "bun test",
|
|
48
50
|
"smoke": "bun run scripts/smoke-test.ts",
|
package/src/config.ts
CHANGED
|
@@ -67,12 +67,12 @@ export function resolveAskellTarget(input: {
|
|
|
67
67
|
if (input.askellEnv !== undefined) {
|
|
68
68
|
if (classified === 'custom') {
|
|
69
69
|
throw new Error(
|
|
70
|
-
`ASKELL_ENV=${input.askellEnv} selects an official Askell host; omit ASKELL_ENV when
|
|
70
|
+
`ASKELL_ENV=${input.askellEnv} selects an official Askell host; omit ASKELL_ENV when ASKELL_API_BASE_URL is custom (${apiBaseUrl})`,
|
|
71
71
|
);
|
|
72
72
|
}
|
|
73
73
|
if (classified !== input.askellEnv) {
|
|
74
74
|
throw new Error(
|
|
75
|
-
`ASKELL_ENV=${input.askellEnv} does not match
|
|
75
|
+
`ASKELL_ENV=${input.askellEnv} does not match ASKELL_API_BASE_URL (${apiBaseUrl}). Omit ASKELL_API_BASE_URL and let ASKELL_ENV pick the host, or omit ASKELL_ENV.`,
|
|
76
76
|
);
|
|
77
77
|
}
|
|
78
78
|
}
|
|
@@ -132,7 +132,7 @@ const CONFIG_HELP = `Askell MCP credentials missing.
|
|
|
132
132
|
|
|
133
133
|
Set ASKELL_PRIVATE_API_KEY (or ASKELL_SECRET_API_KEY), optionally ASKELL_PUBLIC_API_KEY.
|
|
134
134
|
Set ASKELL_ENV=production|sandbox (default production) — the server picks the host.
|
|
135
|
-
Keys are per host.
|
|
135
|
+
Keys are per host. ASKELL_API_BASE_URL is only for a custom/local API.
|
|
136
136
|
|
|
137
137
|
Local dev — create .env in the project root (Bun loads it automatically):
|
|
138
138
|
ASKELL_ENV=sandbox
|
|
@@ -144,7 +144,7 @@ Keys are per host. ASKELL_API_URL is only for a custom/local API.
|
|
|
144
144
|
"mcpServers": {
|
|
145
145
|
"askell-prod": {
|
|
146
146
|
"command": "bunx",
|
|
147
|
-
"args": ["-y", "askell-mcp"],
|
|
147
|
+
"args": ["-y", "askell-mcp@latest"],
|
|
148
148
|
"env": {
|
|
149
149
|
"ASKELL_ENV": "production",
|
|
150
150
|
"ASKELL_PRIVATE_API_KEY": "...",
|
|
@@ -153,7 +153,7 @@ Keys are per host. ASKELL_API_URL is only for a custom/local API.
|
|
|
153
153
|
},
|
|
154
154
|
"askell-sandbox": {
|
|
155
155
|
"command": "bunx",
|
|
156
|
-
"args": ["-y", "askell-mcp"],
|
|
156
|
+
"args": ["-y", "askell-mcp@latest"],
|
|
157
157
|
"env": {
|
|
158
158
|
"ASKELL_ENV": "sandbox",
|
|
159
159
|
"ASKELL_PRIVATE_API_KEY": "...",
|
|
@@ -172,7 +172,7 @@ function loadConfigFromEnv(): unknown {
|
|
|
172
172
|
}
|
|
173
173
|
|
|
174
174
|
const askellEnv = env.ASKELL_ENV?.trim() || undefined;
|
|
175
|
-
const apiBaseUrl = env.
|
|
175
|
+
const apiBaseUrl = env.ASKELL_API_BASE_URL;
|
|
176
176
|
const responseMaxBytes = env.ASKELL_RESPONSE_MAX_BYTES;
|
|
177
177
|
const mutationGateRaw =
|
|
178
178
|
env.ASKELL_MUTATION_GATE ?? env.ASKELL_REQUIRE_MUTATION_APPROVAL;
|
package/src/index.ts
CHANGED
|
@@ -8,7 +8,9 @@ try {
|
|
|
8
8
|
|
|
9
9
|
void serveStdio(() => createServer(config));
|
|
10
10
|
|
|
11
|
-
console.error(
|
|
11
|
+
console.error(
|
|
12
|
+
`askell-mcp running on stdio (${config.askellEnv} ${config.apiBaseUrl})`,
|
|
13
|
+
);
|
|
12
14
|
} catch (error) {
|
|
13
15
|
const message = error instanceof Error ? error.message : String(error);
|
|
14
16
|
console.error(`askell-mcp failed to start: ${message}`);
|
package/src/server.ts
CHANGED
|
@@ -17,7 +17,7 @@ export function buildServerInstructions(config: AppConfig): string {
|
|
|
17
17
|
const apiBase = normalizeBaseUrl(config.apiBaseUrl);
|
|
18
18
|
const envLine =
|
|
19
19
|
config.askellEnv === 'custom'
|
|
20
|
-
? `This instance: custom API base ${apiBase} (
|
|
20
|
+
? `This instance: custom API base ${apiBase} (ASKELL_API_BASE_URL override)`
|
|
21
21
|
: `This instance: ${config.askellEnv} (${apiBase})`;
|
|
22
22
|
|
|
23
23
|
return `Askell MCP server for payment and subscription operations.
|