askell-mcp 0.4.14 → 0.4.16
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 +64 -16
- package/mcp.json.example +4 -12
- package/package.json +3 -2
- package/src/config.ts +9 -23
package/README.md
CHANGED
|
@@ -19,34 +19,79 @@ In the Askell dashboard, copy your **private (secret)** API key. Optionally also
|
|
|
19
19
|
|
|
20
20
|
### 2. Add to your MCP client
|
|
21
21
|
|
|
22
|
-
Prefer **two server entries** if you have both production and sandbox keys. Tool names are the same on both; the client distinguishes them by the
|
|
22
|
+
Prefer **two server entries** if you have both production and sandbox keys. Tool names are the same on both; the client distinguishes them by the server key (`askell-prod` vs `askell-sandbox`). Each instance's instructions include the environment it is talking to.
|
|
23
23
|
|
|
24
|
-
|
|
24
|
+
Put keys in gitignored dotenv files, not in JSON. Copy [`.env.example`](./.env.example):
|
|
25
|
+
|
|
26
|
+
- `.env` — production (`ASKELL_ENV=production` and that dashboard's keys)
|
|
27
|
+
- `.env.sandbox` — sandbox (`ASKELL_ENV=sandbox` and that dashboard's keys)
|
|
28
|
+
|
|
29
|
+
Bun does not auto-load `.env.sandbox`. `--no-env-file` stops the sandbox process from also reading a production `.env` that happens to sit in the cwd.
|
|
30
|
+
|
|
31
|
+
#### Cursor
|
|
32
|
+
|
|
33
|
+
Project file: `.cursor/mcp.json`. [`mcp.json.example`](./mcp.json.example) is this shape. `${workspaceFolder}` is the directory that contains that `mcp.json` (the repo root when the file is `.cursor/mcp.json`). In `~/.cursor/mcp.json`, use an absolute `envFile` path.
|
|
34
|
+
|
|
35
|
+
**With Bun:**
|
|
25
36
|
|
|
26
37
|
```json
|
|
27
38
|
{
|
|
28
39
|
"mcpServers": {
|
|
29
40
|
"askell-prod": {
|
|
30
41
|
"command": "bunx",
|
|
31
|
-
"args": ["-
|
|
32
|
-
"
|
|
33
|
-
"ASKELL_ENV": "production",
|
|
34
|
-
"ASKELL_PRIVATE_API_KEY": "your_production_secret_api_key"
|
|
35
|
-
}
|
|
42
|
+
"args": ["--no-env-file", "x", "askell-mcp"],
|
|
43
|
+
"envFile": "${workspaceFolder}/.env"
|
|
36
44
|
},
|
|
37
45
|
"askell-sandbox": {
|
|
38
46
|
"command": "bunx",
|
|
39
|
-
"args": ["-
|
|
40
|
-
"
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
47
|
+
"args": ["--no-env-file", "x", "askell-mcp"],
|
|
48
|
+
"envFile": "${workspaceFolder}/.env.sandbox"
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
```
|
|
53
|
+
|
|
54
|
+
**With a binary** (download `askell-mcp-<os>-<arch>` from [Releases](https://github.com/Neschadin/askell-mcp/releases), then `chmod +x`). Same `envFile`; the binary reads the environment Cursor injects:
|
|
55
|
+
|
|
56
|
+
```json
|
|
57
|
+
{
|
|
58
|
+
"mcpServers": {
|
|
59
|
+
"askell-prod": {
|
|
60
|
+
"command": "/absolute/path/to/askell-mcp-linux-x64",
|
|
61
|
+
"envFile": "${workspaceFolder}/.env"
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
```
|
|
66
|
+
|
|
67
|
+
Reload the window after saving.
|
|
68
|
+
|
|
69
|
+
#### Claude Desktop
|
|
70
|
+
|
|
71
|
+
Config file:
|
|
72
|
+
|
|
73
|
+
- Linux: `~/.config/Claude/claude_desktop_config.json`
|
|
74
|
+
- macOS: `~/Library/Application Support/Claude/claude_desktop_config.json`
|
|
75
|
+
- Windows: `%APPDATA%\Claude\claude_desktop_config.json`
|
|
76
|
+
|
|
77
|
+
No `envFile` field. The desktop process cwd is not your repo, so a relative `.env` path does not resolve. With Bun, pass an absolute `--env-file`:
|
|
78
|
+
|
|
79
|
+
```json
|
|
80
|
+
{
|
|
81
|
+
"mcpServers": {
|
|
82
|
+
"askell-prod": {
|
|
83
|
+
"command": "bunx",
|
|
84
|
+
"args": ["--no-env-file", "--env-file=/absolute/path/.env", "x", "askell-mcp"]
|
|
85
|
+
},
|
|
86
|
+
"askell-sandbox": {
|
|
87
|
+
"command": "bunx",
|
|
88
|
+
"args": ["--no-env-file", "--env-file=/absolute/path/.env.sandbox", "x", "askell-mcp"]
|
|
44
89
|
}
|
|
45
90
|
}
|
|
46
91
|
}
|
|
47
92
|
```
|
|
48
93
|
|
|
49
|
-
|
|
94
|
+
A binary has no `--env-file`. Put the keys in `env` (plaintext in that JSON file):
|
|
50
95
|
|
|
51
96
|
```json
|
|
52
97
|
{
|
|
@@ -55,16 +100,19 @@ Prefer **two server entries** if you have both production and sandbox keys. Tool
|
|
|
55
100
|
"command": "/absolute/path/to/askell-mcp-linux-x64",
|
|
56
101
|
"env": {
|
|
57
102
|
"ASKELL_ENV": "production",
|
|
58
|
-
"ASKELL_PRIVATE_API_KEY": "your_production_secret_api_key"
|
|
103
|
+
"ASKELL_PRIVATE_API_KEY": "your_production_secret_api_key",
|
|
104
|
+
"ASKELL_PUBLIC_API_KEY": "your_production_public_api_key_optional"
|
|
59
105
|
}
|
|
60
106
|
}
|
|
61
107
|
}
|
|
62
108
|
}
|
|
63
109
|
```
|
|
64
110
|
|
|
65
|
-
|
|
111
|
+
Quit Claude Desktop completely and reopen it. Saving the file is not enough.
|
|
112
|
+
|
|
113
|
+
#### Claude Code
|
|
66
114
|
|
|
67
|
-
|
|
115
|
+
Project `.mcp.json` expands `${VAR}` from the environment of the process that launched `claude`. It does not load a dotenv file. The Bun `--env-file` args from the Desktop section work here as well; a relative path is fine when you start `claude` from the repo. `${ASKELL_PRIVATE_API_KEY}` inside `env` only works when that variable is already exported in that environment. A `.env` file alone is not read.
|
|
68
116
|
|
|
69
117
|
## Configuration
|
|
70
118
|
|
package/mcp.json.example
CHANGED
|
@@ -2,21 +2,13 @@
|
|
|
2
2
|
"mcpServers": {
|
|
3
3
|
"askell-prod": {
|
|
4
4
|
"command": "bunx",
|
|
5
|
-
"args": ["-
|
|
6
|
-
"
|
|
7
|
-
"ASKELL_ENV": "production",
|
|
8
|
-
"ASKELL_PRIVATE_API_KEY": "your_production_secret_api_key",
|
|
9
|
-
"ASKELL_PUBLIC_API_KEY": "your_production_public_api_key_optional"
|
|
10
|
-
}
|
|
5
|
+
"args": ["--no-env-file", "x", "askell-mcp"],
|
|
6
|
+
"envFile": "${workspaceFolder}/.env"
|
|
11
7
|
},
|
|
12
8
|
"askell-sandbox": {
|
|
13
9
|
"command": "bunx",
|
|
14
|
-
"args": ["-
|
|
15
|
-
"
|
|
16
|
-
"ASKELL_ENV": "sandbox",
|
|
17
|
-
"ASKELL_PRIVATE_API_KEY": "your_sandbox_secret_api_key",
|
|
18
|
-
"ASKELL_PUBLIC_API_KEY": "your_sandbox_public_api_key_optional"
|
|
19
|
-
}
|
|
10
|
+
"args": ["--no-env-file", "x", "askell-mcp"],
|
|
11
|
+
"envFile": "${workspaceFolder}/.env.sandbox"
|
|
20
12
|
}
|
|
21
13
|
}
|
|
22
14
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "askell-mcp",
|
|
3
|
-
"version": "0.4.
|
|
3
|
+
"version": "0.4.16",
|
|
4
|
+
"mcpName": "io.github.Neschadin/askell-mcp",
|
|
4
5
|
"description": "MCP server for the Askell payment and subscription API (Bun + stdio)",
|
|
5
6
|
"author": "Neschadin Oleksandr",
|
|
6
7
|
"license": "MIT",
|
|
@@ -66,7 +67,7 @@
|
|
|
66
67
|
"typescript": "7.0.2"
|
|
67
68
|
},
|
|
68
69
|
"dependencies": {
|
|
69
|
-
"@modelcontextprotocol/server": "2.
|
|
70
|
+
"@modelcontextprotocol/server": "2.1.0",
|
|
70
71
|
"zod": "4.6.5"
|
|
71
72
|
}
|
|
72
73
|
}
|
package/src/config.ts
CHANGED
|
@@ -139,29 +139,15 @@ Keys are per host. ASKELL_API_BASE_URL is only for a custom/local API.
|
|
|
139
139
|
ASKELL_PRIVATE_API_KEY=...
|
|
140
140
|
ASKELL_PUBLIC_API_KEY=...
|
|
141
141
|
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
"ASKELL_PUBLIC_API_KEY": "..."
|
|
152
|
-
}
|
|
153
|
-
},
|
|
154
|
-
"askell-sandbox": {
|
|
155
|
-
"command": "bunx",
|
|
156
|
-
"args": ["-y", "askell-mcp@latest"],
|
|
157
|
-
"env": {
|
|
158
|
-
"ASKELL_ENV": "sandbox",
|
|
159
|
-
"ASKELL_PRIVATE_API_KEY": "...",
|
|
160
|
-
"ASKELL_PUBLIC_API_KEY": "..."
|
|
161
|
-
}
|
|
162
|
-
}
|
|
163
|
-
}
|
|
164
|
-
}`;
|
|
142
|
+
Cursor (.cursor/mcp.json) — keys in .env / .env.sandbox, not in JSON:
|
|
143
|
+
"command": "bunx",
|
|
144
|
+
"args": ["--no-env-file", "x", "askell-mcp"],
|
|
145
|
+
"envFile": "\${workspaceFolder}/.env" (sandbox: .env.sandbox)
|
|
146
|
+
|
|
147
|
+
Claude Desktop (no envFile; cwd is not the repo — absolute path):
|
|
148
|
+
"command": "bunx",
|
|
149
|
+
"args": ["--no-env-file", "--env-file=/absolute/path/.env", "x", "askell-mcp"]
|
|
150
|
+
Binary on Claude Desktop: put ASKELL_ENV and ASKELL_PRIVATE_API_KEY in "env".`;
|
|
165
151
|
|
|
166
152
|
function loadConfigFromEnv(): unknown {
|
|
167
153
|
const env = Bun.env;
|