@apicity/mcp-server 0.2.8 → 0.2.10
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 +32 -15
- package/dist/src/bin.js +2 -65
- package/dist/src/bin.js.map +1 -1
- package/dist/src/cli.d.ts +13 -0
- package/dist/src/cli.d.ts.map +1 -0
- package/dist/src/cli.js +98 -0
- package/dist/src/cli.js.map +1 -0
- package/dist/src/index.d.ts +2 -0
- package/dist/src/index.d.ts.map +1 -1
- package/dist/src/index.js +2 -0
- package/dist/src/index.js.map +1 -1
- package/dist/src/one-password.d.ts +13 -0
- package/dist/src/one-password.d.ts.map +1 -0
- package/dist/src/one-password.js +97 -0
- package/dist/src/one-password.js.map +1 -0
- package/package.json +17 -78
package/README.md
CHANGED
|
@@ -14,8 +14,6 @@ in lockstep with the providers.
|
|
|
14
14
|
npm install @apicity/mcp-server
|
|
15
15
|
# or
|
|
16
16
|
pnpm add @apicity/mcp-server
|
|
17
|
-
# plus whichever providers you want exposed:
|
|
18
|
-
pnpm add @apicity/openai @apicity/anthropic @apicity/xai @apicity/fal
|
|
19
17
|
```
|
|
20
18
|
|
|
21
19
|
## Run
|
|
@@ -23,14 +21,31 @@ pnpm add @apicity/openai @apicity/anthropic @apicity/xai @apicity/fal
|
|
|
23
21
|
```bash
|
|
24
22
|
# Stdio server. Logs to stderr; stdout is reserved for MCP framing.
|
|
25
23
|
OPENAI_API_KEY=sk-... ANTHROPIC_API_KEY=sk-... \
|
|
26
|
-
npx apicity-mcp
|
|
24
|
+
npx apicity-mcp
|
|
25
|
+
```
|
|
26
|
+
|
|
27
|
+
With 1Password, put each provider secret in an item named after the env var
|
|
28
|
+
(`OPENAI_API_KEY`, `ANTHROPIC_API_KEY`, etc.) with the value in the `password`
|
|
29
|
+
field, then pass the vault name:
|
|
30
|
+
|
|
31
|
+
```bash
|
|
32
|
+
npx -y @apicity/mcp-server --op-vault Apicity
|
|
33
|
+
```
|
|
34
|
+
|
|
35
|
+
Claude Code setup:
|
|
36
|
+
|
|
37
|
+
```bash
|
|
38
|
+
claude mcp add --scope user apicity -- \
|
|
39
|
+
npx -y @apicity/mcp-server \
|
|
40
|
+
--op-vault Apicity
|
|
27
41
|
```
|
|
28
42
|
|
|
29
43
|
### Flags
|
|
30
44
|
|
|
31
45
|
| Flag | Description |
|
|
32
46
|
| ------------------------------ | -------------------------------------------------------------------------------------------------------------- |
|
|
33
|
-
| `--
|
|
47
|
+
| `--op-vault <vault>` | Resolve missing provider credentials from `op://<vault>/<ENV_VAR>/password` (or use `APICITY_OP_VAULT`). |
|
|
48
|
+
| `--output-dir <path>` | Override where binary results and downloaded media URLs land. Defaults to `CLAUDE_PROJECT_DIR`, then cwd. |
|
|
34
49
|
| `--providers <csv>` | Allow-list of providers (default: every one with its env var set). |
|
|
35
50
|
| `--paygate-secret-file <path>` | File holding the shared HMAC secret used to verify paid-endpoint OTPs (see [Paid endpoints](#paid-endpoints)). |
|
|
36
51
|
| `--help` | Print usage. |
|
|
@@ -48,11 +63,17 @@ OPENAI_API_KEY=sk-... ANTHROPIC_API_KEY=sk-... \
|
|
|
48
63
|
| `kimicoding` | `KIMI_CODING_API_KEY` |
|
|
49
64
|
| `alibaba` | `DASHSCOPE_API_KEY` |
|
|
50
65
|
| `elevenlabs` | `ELEVENLABS_API_KEY` |
|
|
66
|
+
| `google` | `GOOGLE_API_KEY` |
|
|
51
67
|
| `x` | `X_ACCESS_TOKEN` |
|
|
52
68
|
| `ig` | `IG_ACCESS_TOKEN` |
|
|
69
|
+
| `youtube` | `YOUTUBE_ACCESS_TOKEN` |
|
|
70
|
+
| `telegram` | `TELEGRAM_BOT_KEY` |
|
|
53
71
|
| `free` | _(none — public APIs)_ |
|
|
54
72
|
|
|
55
|
-
Providers without their env var set are silently skipped.
|
|
73
|
+
Providers without their env var set are silently skipped. With `--op-vault`,
|
|
74
|
+
missing env vars are read from 1Password before the MCP server starts. If
|
|
75
|
+
`--providers` is set, a missing requested provider secret is a startup error;
|
|
76
|
+
without `--providers`, missing vault items are skipped.
|
|
56
77
|
|
|
57
78
|
## Tool naming
|
|
58
79
|
|
|
@@ -68,7 +89,9 @@ The tool description always includes the upstream URL and docs URL.
|
|
|
68
89
|
|
|
69
90
|
## Output handling
|
|
70
91
|
|
|
71
|
-
|
|
92
|
+
The CLI saves binary responses and downloaded media URLs to
|
|
93
|
+
`CLAUDE_PROJECT_DIR` when Claude Code provides it, otherwise to the current
|
|
94
|
+
directory. Pass `--output-dir` to override that location.
|
|
72
95
|
|
|
73
96
|
- **Binary responses** (`ArrayBuffer` / `Uint8Array`, e.g. `openai_v1_audio_speech`)
|
|
74
97
|
are written to the directory; the tool result is `{ savedTo, bytes }`.
|
|
@@ -79,9 +102,6 @@ When `--output-dir` is set:
|
|
|
79
102
|
`*_savedTo: "error: ..."` and don't break the response.
|
|
80
103
|
- Streaming endpoints (anthropic streams, etc.) are buffered into an array.
|
|
81
104
|
|
|
82
|
-
Without `--output-dir`, binary results are summarized as a byte count and URLs
|
|
83
|
-
pass through untouched.
|
|
84
|
-
|
|
85
105
|
## Paid endpoints
|
|
86
106
|
|
|
87
107
|
A few endpoints incur direct marginal cost (e.g. `kie_post_api_v1_jobs_create_task`
|
|
@@ -124,13 +144,10 @@ embed the registry into your own MCP server.
|
|
|
124
144
|
"args": [
|
|
125
145
|
"-y",
|
|
126
146
|
"@apicity/mcp-server",
|
|
127
|
-
"--
|
|
128
|
-
"
|
|
147
|
+
"--op-vault",
|
|
148
|
+
"Apicity"
|
|
129
149
|
],
|
|
130
|
-
"env": {
|
|
131
|
-
"OPENAI_API_KEY": "sk-...",
|
|
132
|
-
"ANTHROPIC_API_KEY": "sk-..."
|
|
133
|
-
}
|
|
150
|
+
"env": {}
|
|
134
151
|
}
|
|
135
152
|
}
|
|
136
153
|
}
|
package/dist/src/bin.js
CHANGED
|
@@ -1,69 +1,6 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import {
|
|
3
|
-
|
|
4
|
-
function parseArgs(argv) {
|
|
5
|
-
const out = { help: false };
|
|
6
|
-
for (let i = 0; i < argv.length; i++) {
|
|
7
|
-
const a = argv[i];
|
|
8
|
-
if (a === "--help" || a === "-h")
|
|
9
|
-
out.help = true;
|
|
10
|
-
else if (a === "--output-dir")
|
|
11
|
-
out.outputDir = argv[++i];
|
|
12
|
-
else if (a.startsWith("--output-dir="))
|
|
13
|
-
out.outputDir = a.slice(13);
|
|
14
|
-
else if (a === "--providers") {
|
|
15
|
-
out.enabledProviders = (argv[++i] ?? "").split(",").filter(Boolean);
|
|
16
|
-
}
|
|
17
|
-
else if (a.startsWith("--providers=")) {
|
|
18
|
-
out.enabledProviders = a.slice(12).split(",").filter(Boolean);
|
|
19
|
-
}
|
|
20
|
-
else if (a === "--paygate-secret-file") {
|
|
21
|
-
out.paygateSecretFile = argv[++i];
|
|
22
|
-
}
|
|
23
|
-
else if (a.startsWith("--paygate-secret-file=")) {
|
|
24
|
-
out.paygateSecretFile = a.slice(22);
|
|
25
|
-
}
|
|
26
|
-
else {
|
|
27
|
-
console.error(`[apicity-mcp] unknown arg: ${a}`);
|
|
28
|
-
}
|
|
29
|
-
}
|
|
30
|
-
return out;
|
|
31
|
-
}
|
|
32
|
-
function printHelp() {
|
|
33
|
-
console.error([
|
|
34
|
-
"apicity-mcp — MCP server exposing every @apicity provider endpoint as a tool.",
|
|
35
|
-
"",
|
|
36
|
-
"Usage:",
|
|
37
|
-
" apicity-mcp [--output-dir <path>] [--providers <csv>]",
|
|
38
|
-
"",
|
|
39
|
-
"Options:",
|
|
40
|
-
" --output-dir <path> Directory to write binary results and downloaded media URLs.",
|
|
41
|
-
" If omitted, binaries are summarized and URLs are returned as-is.",
|
|
42
|
-
" --providers <csv> Comma-separated provider allow-list (e.g. openai,xai,anthropic).",
|
|
43
|
-
" Defaults to every provider with its env var set.",
|
|
44
|
-
" --paygate-secret-file <path> File holding the shared HMAC secret used to verify",
|
|
45
|
-
" OTPs for paid endpoints (e.g. kie createTask). The server only",
|
|
46
|
-
" verifies OTPs; operators mint them out-of-band with apicity-paygate.",
|
|
47
|
-
"",
|
|
48
|
-
"Credentials are read from env vars: OPENAI_API_KEY, XAI_API_KEY, ANTHROPIC_API_KEY,",
|
|
49
|
-
"FIREWORKS_API_KEY, FAL_API_KEY, KIE_API_KEY, KIMI_CODING_API_KEY, DASHSCOPE_API_KEY,",
|
|
50
|
-
"ELEVENLABS_API_KEY, X_ACCESS_TOKEN, IG_ACCESS_TOKEN, TELEGRAM_BOT_KEY.",
|
|
51
|
-
"The 'free-media-upload' provider needs none.",
|
|
52
|
-
].join("\n"));
|
|
53
|
-
}
|
|
54
|
-
const args = parseArgs(process.argv.slice(2));
|
|
55
|
-
if (args.help) {
|
|
56
|
-
printHelp();
|
|
57
|
-
process.exit(0);
|
|
58
|
-
}
|
|
59
|
-
const paygateSecret = args.paygateSecretFile
|
|
60
|
-
? readFileSync(args.paygateSecretFile, "utf8").trim()
|
|
61
|
-
: undefined;
|
|
62
|
-
startServer({
|
|
63
|
-
outputDir: args.outputDir,
|
|
64
|
-
enabledProviders: args.enabledProviders,
|
|
65
|
-
paygateSecret,
|
|
66
|
-
}).catch((err) => {
|
|
2
|
+
import { runCli } from "./cli.js";
|
|
3
|
+
runCli().catch((err) => {
|
|
67
4
|
console.error("[apicity-mcp] fatal:", err);
|
|
68
5
|
process.exit(1);
|
|
69
6
|
});
|
package/dist/src/bin.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"bin.js","sourceRoot":"","sources":["../../src/bin.ts"],"names":[],"mappings":";AACA,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"bin.js","sourceRoot":"","sources":["../../src/bin.ts"],"names":[],"mappings":";AACA,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AAElC,MAAM,EAAE,CAAC,KAAK,CAAC,CAAC,GAAG,EAAE,EAAE;IACrB,OAAO,CAAC,KAAK,CAAC,sBAAsB,EAAE,GAAG,CAAC,CAAC;IAC3C,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;AAClB,CAAC,CAAC,CAAC"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
export interface ParsedArgs {
|
|
2
|
+
outputDir?: string;
|
|
3
|
+
enabledProviders?: string[];
|
|
4
|
+
paygateSecretFile?: string;
|
|
5
|
+
opVault?: string;
|
|
6
|
+
help: boolean;
|
|
7
|
+
}
|
|
8
|
+
export declare function parseArgs(argv: string[]): ParsedArgs;
|
|
9
|
+
export declare function resolveOutputDir(explicitOutputDir?: string, env?: NodeJS.ProcessEnv, cwd?: string): string;
|
|
10
|
+
export declare function resolveOpVault(explicitOpVault?: string, env?: NodeJS.ProcessEnv): string | undefined;
|
|
11
|
+
export declare function printHelp(): void;
|
|
12
|
+
export declare function runCli(argv?: string[]): Promise<void>;
|
|
13
|
+
//# sourceMappingURL=cli.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"cli.d.ts","sourceRoot":"","sources":["../../src/cli.ts"],"names":[],"mappings":"AAIA,MAAM,WAAW,UAAU;IACzB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,gBAAgB,CAAC,EAAE,MAAM,EAAE,CAAC;IAC5B,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAC3B,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,IAAI,EAAE,OAAO,CAAC;CACf;AAED,wBAAgB,SAAS,CAAC,IAAI,EAAE,MAAM,EAAE,GAAG,UAAU,CAwBpD;AAED,wBAAgB,gBAAgB,CAC9B,iBAAiB,CAAC,EAAE,MAAM,EAC1B,GAAG,GAAE,MAAM,CAAC,UAAwB,EACpC,GAAG,SAAgB,GAClB,MAAM,CAER;AAED,wBAAgB,cAAc,CAC5B,eAAe,CAAC,EAAE,MAAM,EACxB,GAAG,GAAE,MAAM,CAAC,UAAwB,GACnC,MAAM,GAAG,SAAS,CAEpB;AAED,wBAAgB,SAAS,IAAI,IAAI,CA2BhC;AAED,wBAAsB,MAAM,CAAC,IAAI,WAAwB,GAAG,OAAO,CAAC,IAAI,CAAC,CAwBxE"}
|
package/dist/src/cli.js
ADDED
|
@@ -0,0 +1,98 @@
|
|
|
1
|
+
import { readFileSync } from "node:fs";
|
|
2
|
+
import { startServer } from "./server.js";
|
|
3
|
+
import { fillOnePasswordEnv } from "./one-password.js";
|
|
4
|
+
export function parseArgs(argv) {
|
|
5
|
+
const out = { help: false };
|
|
6
|
+
for (let i = 0; i < argv.length; i++) {
|
|
7
|
+
const a = argv[i];
|
|
8
|
+
if (a === "--help" || a === "-h")
|
|
9
|
+
out.help = true;
|
|
10
|
+
else if (a === "--output-dir")
|
|
11
|
+
out.outputDir = argv[++i];
|
|
12
|
+
else if (a.startsWith("--output-dir="))
|
|
13
|
+
out.outputDir = a.slice(13);
|
|
14
|
+
else if (a === "--providers") {
|
|
15
|
+
out.enabledProviders = parseProviderCsv(argv[++i]);
|
|
16
|
+
}
|
|
17
|
+
else if (a.startsWith("--providers=")) {
|
|
18
|
+
out.enabledProviders = parseProviderCsv(a.slice(12));
|
|
19
|
+
}
|
|
20
|
+
else if (a === "--paygate-secret-file") {
|
|
21
|
+
out.paygateSecretFile = argv[++i];
|
|
22
|
+
}
|
|
23
|
+
else if (a.startsWith("--paygate-secret-file=")) {
|
|
24
|
+
out.paygateSecretFile = a.slice(22);
|
|
25
|
+
}
|
|
26
|
+
else if (a === "--op-vault") {
|
|
27
|
+
out.opVault = argv[++i];
|
|
28
|
+
}
|
|
29
|
+
else if (a.startsWith("--op-vault=")) {
|
|
30
|
+
out.opVault = a.slice(11);
|
|
31
|
+
}
|
|
32
|
+
else {
|
|
33
|
+
console.error(`[apicity-mcp] unknown arg: ${a}`);
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
return out;
|
|
37
|
+
}
|
|
38
|
+
export function resolveOutputDir(explicitOutputDir, env = process.env, cwd = process.cwd()) {
|
|
39
|
+
return explicitOutputDir ?? env.CLAUDE_PROJECT_DIR ?? cwd;
|
|
40
|
+
}
|
|
41
|
+
export function resolveOpVault(explicitOpVault, env = process.env) {
|
|
42
|
+
return explicitOpVault ?? env.APICITY_OP_VAULT;
|
|
43
|
+
}
|
|
44
|
+
export function printHelp() {
|
|
45
|
+
console.error([
|
|
46
|
+
"apicity-mcp — MCP server exposing every @apicity provider endpoint as a tool.",
|
|
47
|
+
"",
|
|
48
|
+
"Usage:",
|
|
49
|
+
" apicity-mcp [--op-vault <vault>] [--output-dir <path>] [--providers <csv>]",
|
|
50
|
+
"",
|
|
51
|
+
"Options:",
|
|
52
|
+
" --op-vault <vault> Resolve missing provider credentials from 1Password.",
|
|
53
|
+
" Looks for op://<vault>/<ENV_VAR>/password.",
|
|
54
|
+
" Can also be set with APICITY_OP_VAULT.",
|
|
55
|
+
" --output-dir <path> Directory to write binary results and downloaded media URLs.",
|
|
56
|
+
" Defaults to CLAUDE_PROJECT_DIR, then the current directory.",
|
|
57
|
+
" --providers <csv> Comma-separated provider allow-list (e.g. openai,xai,anthropic).",
|
|
58
|
+
" Defaults to every provider with its env var set.",
|
|
59
|
+
" --paygate-secret-file <path> File holding the shared HMAC secret used to verify",
|
|
60
|
+
" OTPs for paid endpoints (e.g. kie createTask). The server only",
|
|
61
|
+
" verifies OTPs; operators mint them out-of-band with apicity-paygate.",
|
|
62
|
+
"",
|
|
63
|
+
"Credentials are read from env vars: OPENAI_API_KEY, XAI_API_KEY, ANTHROPIC_API_KEY,",
|
|
64
|
+
"FIREWORKS_API_KEY, FAL_API_KEY, GOOGLE_API_KEY, KIE_API_KEY,",
|
|
65
|
+
"KIMI_CODING_API_KEY, DASHSCOPE_API_KEY, ELEVENLABS_API_KEY,",
|
|
66
|
+
"X_ACCESS_TOKEN, IG_ACCESS_TOKEN, YOUTUBE_ACCESS_TOKEN, TELEGRAM_BOT_KEY.",
|
|
67
|
+
"The 'free-media-upload' provider needs none.",
|
|
68
|
+
].join("\n"));
|
|
69
|
+
}
|
|
70
|
+
export async function runCli(argv = process.argv.slice(2)) {
|
|
71
|
+
const args = parseArgs(argv);
|
|
72
|
+
if (args.help) {
|
|
73
|
+
printHelp();
|
|
74
|
+
return;
|
|
75
|
+
}
|
|
76
|
+
const opVault = resolveOpVault(args.opVault);
|
|
77
|
+
if (opVault) {
|
|
78
|
+
await fillOnePasswordEnv({
|
|
79
|
+
vault: opVault,
|
|
80
|
+
enabledProviders: args.enabledProviders,
|
|
81
|
+
});
|
|
82
|
+
}
|
|
83
|
+
const paygateSecret = args.paygateSecretFile
|
|
84
|
+
? readFileSync(args.paygateSecretFile, "utf8").trim()
|
|
85
|
+
: undefined;
|
|
86
|
+
await startServer({
|
|
87
|
+
outputDir: resolveOutputDir(args.outputDir),
|
|
88
|
+
enabledProviders: args.enabledProviders,
|
|
89
|
+
paygateSecret,
|
|
90
|
+
});
|
|
91
|
+
}
|
|
92
|
+
function parseProviderCsv(value) {
|
|
93
|
+
return (value ?? "")
|
|
94
|
+
.split(",")
|
|
95
|
+
.map((provider) => provider.trim())
|
|
96
|
+
.filter(Boolean);
|
|
97
|
+
}
|
|
98
|
+
//# sourceMappingURL=cli.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"cli.js","sourceRoot":"","sources":["../../src/cli.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AACvC,OAAO,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAC1C,OAAO,EAAE,kBAAkB,EAAE,MAAM,mBAAmB,CAAC;AAUvD,MAAM,UAAU,SAAS,CAAC,IAAc;IACtC,MAAM,GAAG,GAAe,EAAE,IAAI,EAAE,KAAK,EAAE,CAAC;IACxC,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,IAAI,CAAC,MAAM,EAAE,CAAC,EAAE,EAAE,CAAC;QACrC,MAAM,CAAC,GAAG,IAAI,CAAC,CAAC,CAAC,CAAC;QAClB,IAAI,CAAC,KAAK,QAA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CAAC;IACL,CAAC;IAED,MAAM,aAAa,GAAG,IAAI,CAAC,iBAAiB;QAC1C,CAAC,CAAC,YAAY,CAAC,IAAI,CAAC,iBAAiB,EAAE,MAAM,CAAC,CAAC,IAAI,EAAE;QACrD,CAAC,CAAC,SAAS,CAAC;IAEd,MAAM,WAAW,CAAC;QAChB,SAAS,EAAE,gBAAgB,CAAC,IAAI,CAAC,SAAS,CAAC;QAC3C,gBAAgB,EAAE,IAAI,CAAC,gBAAgB;QACvC,aAAa;KACd,CAAC,CAAC;AACL,CAAC;AAED,SAAS,gBAAgB,CAAC,KAAyB;IACjD,OAAO,CAAC,KAAK,IAAI,EAAE,CAAC;SACjB,KAAK,CAAC,GAAG,CAAC;SACV,GAAG,CAAC,CAAC,QAAQ,EAAE,EAAE,CAAC,QAAQ,CAAC,IAAI,EAAE,CAAC;SAClC,MAAM,CAAC,OAAO,CAAC,CAAC;AACrB,CAAC"}
|
package/dist/src/index.d.ts
CHANGED
|
@@ -1,4 +1,6 @@
|
|
|
1
1
|
export { startServer, type StartServerOptions } from "./server.js";
|
|
2
|
+
export { parseArgs, resolveOpVault, resolveOutputDir, type ParsedArgs, } from "./cli.js";
|
|
3
|
+
export { fillOnePasswordEnv, getProviderEnvVars, onePasswordRef, readOnePasswordSecret, type OnePasswordEnvOptions, type OpRead, } from "./one-password.js";
|
|
2
4
|
export { buildRegistry, loadTsv, makeToolName, toSnakeCase, type Endpoint, type EndpointTsvRow, type BuildRegistryOptions, } from "./registry.js";
|
|
3
5
|
export { PROVIDERS, type ProviderSpec } from "./providers.js";
|
|
4
6
|
export { zodToJsonSchema, type JsonSchema } from "./schema.js";
|
package/dist/src/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,KAAK,kBAAkB,EAAE,MAAM,aAAa,CAAC;AACnE,OAAO,EACL,aAAa,EACb,OAAO,EACP,YAAY,EACZ,WAAW,EACX,KAAK,QAAQ,EACb,KAAK,cAAc,EACnB,KAAK,oBAAoB,GAC1B,MAAM,eAAe,CAAC;AACvB,OAAO,EAAE,SAAS,EAAE,KAAK,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAC9D,OAAO,EAAE,eAAe,EAAE,KAAK,UAAU,EAAE,MAAM,aAAa,CAAC;AAC/D,OAAO,EACL,WAAW,EACX,oBAAoB,EACpB,cAAc,EACd,QAAQ,GACT,MAAM,aAAa,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,KAAK,kBAAkB,EAAE,MAAM,aAAa,CAAC;AACnE,OAAO,EACL,SAAS,EACT,cAAc,EACd,gBAAgB,EAChB,KAAK,UAAU,GAChB,MAAM,UAAU,CAAC;AAClB,OAAO,EACL,kBAAkB,EAClB,kBAAkB,EAClB,cAAc,EACd,qBAAqB,EACrB,KAAK,qBAAqB,EAC1B,KAAK,MAAM,GACZ,MAAM,mBAAmB,CAAC;AAC3B,OAAO,EACL,aAAa,EACb,OAAO,EACP,YAAY,EACZ,WAAW,EACX,KAAK,QAAQ,EACb,KAAK,cAAc,EACnB,KAAK,oBAAoB,GAC1B,MAAM,eAAe,CAAC;AACvB,OAAO,EAAE,SAAS,EAAE,KAAK,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAC9D,OAAO,EAAE,eAAe,EAAE,KAAK,UAAU,EAAE,MAAM,aAAa,CAAC;AAC/D,OAAO,EACL,WAAW,EACX,oBAAoB,EACpB,cAAc,EACd,QAAQ,GACT,MAAM,aAAa,CAAC"}
|
package/dist/src/index.js
CHANGED
|
@@ -1,4 +1,6 @@
|
|
|
1
1
|
export { startServer } from "./server.js";
|
|
2
|
+
export { parseArgs, resolveOpVault, resolveOutputDir, } from "./cli.js";
|
|
3
|
+
export { fillOnePasswordEnv, getProviderEnvVars, onePasswordRef, readOnePasswordSecret, } from "./one-password.js";
|
|
2
4
|
export { buildRegistry, loadTsv, makeToolName, toSnakeCase, } from "./registry.js";
|
|
3
5
|
export { PROVIDERS } from "./providers.js";
|
|
4
6
|
export { zodToJsonSchema } from "./schema.js";
|
package/dist/src/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAA2B,MAAM,aAAa,CAAC;AACnE,OAAO,EACL,aAAa,EACb,OAAO,EACP,YAAY,EACZ,WAAW,GAIZ,MAAM,eAAe,CAAC;AACvB,OAAO,EAAE,SAAS,EAAqB,MAAM,gBAAgB,CAAC;AAC9D,OAAO,EAAE,eAAe,EAAmB,MAAM,aAAa,CAAC;AAC/D,OAAO,EACL,WAAW,EACX,oBAAoB,EACpB,cAAc,EACd,QAAQ,GACT,MAAM,aAAa,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAA2B,MAAM,aAAa,CAAC;AACnE,OAAO,EACL,SAAS,EACT,cAAc,EACd,gBAAgB,GAEjB,MAAM,UAAU,CAAC;AAClB,OAAO,EACL,kBAAkB,EAClB,kBAAkB,EAClB,cAAc,EACd,qBAAqB,GAGtB,MAAM,mBAAmB,CAAC;AAC3B,OAAO,EACL,aAAa,EACb,OAAO,EACP,YAAY,EACZ,WAAW,GAIZ,MAAM,eAAe,CAAC;AACvB,OAAO,EAAE,SAAS,EAAqB,MAAM,gBAAgB,CAAC;AAC9D,OAAO,EAAE,eAAe,EAAmB,MAAM,aAAa,CAAC;AAC/D,OAAO,EACL,WAAW,EACX,oBAAoB,EACpB,cAAc,EACd,QAAQ,GACT,MAAM,aAAa,CAAC"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
export type OpRead = (ref: string) => Promise<string>;
|
|
2
|
+
export interface OnePasswordEnvOptions {
|
|
3
|
+
vault: string;
|
|
4
|
+
enabledProviders?: string[];
|
|
5
|
+
env?: NodeJS.ProcessEnv;
|
|
6
|
+
readSecret?: OpRead;
|
|
7
|
+
concurrency?: number;
|
|
8
|
+
}
|
|
9
|
+
export declare function fillOnePasswordEnv(opts: OnePasswordEnvOptions): Promise<void>;
|
|
10
|
+
export declare function getProviderEnvVars(enabledProviders?: string[]): string[];
|
|
11
|
+
export declare function onePasswordRef(vault: string, envVar: string): string;
|
|
12
|
+
export declare function readOnePasswordSecret(ref: string): Promise<string>;
|
|
13
|
+
//# sourceMappingURL=one-password.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"one-password.d.ts","sourceRoot":"","sources":["../../src/one-password.ts"],"names":[],"mappings":"AAMA,MAAM,MAAM,MAAM,GAAG,CAAC,GAAG,EAAE,MAAM,KAAK,OAAO,CAAC,MAAM,CAAC,CAAC;AAEtD,MAAM,WAAW,qBAAqB;IACpC,KAAK,EAAE,MAAM,CAAC;IACd,gBAAgB,CAAC,EAAE,MAAM,EAAE,CAAC;IAC5B,GAAG,CAAC,EAAE,MAAM,CAAC,UAAU,CAAC;IACxB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,WAAW,CAAC,EAAE,MAAM,CAAC;CACtB;AAID,wBAAsB,kBAAkB,CACtC,IAAI,EAAE,qBAAqB,GAC1B,OAAO,CAAC,IAAI,CAAC,CAkCf;AAED,wBAAgB,kBAAkB,CAAC,gBAAgB,CAAC,EAAE,MAAM,EAAE,GAAG,MAAM,EAAE,CAexE;AAED,wBAAgB,cAAc,CAAC,KAAK,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,GAAG,MAAM,CAEpE;AAED,wBAAsB,qBAAqB,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC,CAUxE"}
|
|
@@ -0,0 +1,97 @@
|
|
|
1
|
+
import { execFile } from "node:child_process";
|
|
2
|
+
import { promisify } from "node:util";
|
|
3
|
+
import { PROVIDERS } from "./providers.js";
|
|
4
|
+
const execFileAsync = promisify(execFile);
|
|
5
|
+
const DEFAULT_OP_READ_CONCURRENCY = 6;
|
|
6
|
+
export async function fillOnePasswordEnv(opts) {
|
|
7
|
+
const env = opts.env ?? process.env;
|
|
8
|
+
const readSecret = opts.readSecret ?? readOnePasswordSecret;
|
|
9
|
+
const providerEnvVars = getProviderEnvVars(opts.enabledProviders);
|
|
10
|
+
const required = opts.enabledProviders !== undefined;
|
|
11
|
+
const missingEnvVars = providerEnvVars.filter((envVar) => !hasResolvedEnvValue(env[envVar]));
|
|
12
|
+
const concurrency = normalizeConcurrency(opts.concurrency ?? DEFAULT_OP_READ_CONCURRENCY, missingEnvVars.length);
|
|
13
|
+
let next = 0;
|
|
14
|
+
let firstError;
|
|
15
|
+
async function worker() {
|
|
16
|
+
while (next < missingEnvVars.length) {
|
|
17
|
+
const envVar = missingEnvVars[next++];
|
|
18
|
+
try {
|
|
19
|
+
env[envVar] = await readSecret(onePasswordRef(opts.vault, envVar));
|
|
20
|
+
}
|
|
21
|
+
catch (err) {
|
|
22
|
+
const wrapped = wrapReadError(err, opts.vault, envVar, required);
|
|
23
|
+
if (wrapped && !firstError)
|
|
24
|
+
firstError = wrapped;
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
await Promise.all(Array.from({ length: concurrency }, async () => {
|
|
29
|
+
await worker();
|
|
30
|
+
}));
|
|
31
|
+
if (firstError)
|
|
32
|
+
throw firstError;
|
|
33
|
+
}
|
|
34
|
+
export function getProviderEnvVars(enabledProviders) {
|
|
35
|
+
const envVars = [];
|
|
36
|
+
const providers = enabledProviders ?? Object.keys(PROVIDERS);
|
|
37
|
+
for (const provider of providers) {
|
|
38
|
+
const spec = PROVIDERS[provider];
|
|
39
|
+
if (!spec) {
|
|
40
|
+
throw new Error(`Unknown provider in --providers: ${provider}`);
|
|
41
|
+
}
|
|
42
|
+
if (spec.envVar && !envVars.includes(spec.envVar)) {
|
|
43
|
+
envVars.push(spec.envVar);
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
return envVars;
|
|
47
|
+
}
|
|
48
|
+
export function onePasswordRef(vault, envVar) {
|
|
49
|
+
return `op://${vault}/${envVar}/password`;
|
|
50
|
+
}
|
|
51
|
+
export async function readOnePasswordSecret(ref) {
|
|
52
|
+
try {
|
|
53
|
+
const { stdout } = await execFileAsync("op", ["read", "--no-newline", ref]);
|
|
54
|
+
return stdout.trim();
|
|
55
|
+
}
|
|
56
|
+
catch (err) {
|
|
57
|
+
if (err.code === "ENOENT") {
|
|
58
|
+
throw new Error("1Password CLI `op` was not found in PATH.");
|
|
59
|
+
}
|
|
60
|
+
throw err;
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
function normalizeConcurrency(concurrency, jobCount) {
|
|
64
|
+
if (jobCount === 0)
|
|
65
|
+
return 0;
|
|
66
|
+
if (!Number.isFinite(concurrency) || concurrency < 1)
|
|
67
|
+
return 1;
|
|
68
|
+
return Math.min(Math.floor(concurrency), jobCount);
|
|
69
|
+
}
|
|
70
|
+
function wrapReadError(err, vault, envVar, required) {
|
|
71
|
+
if (!required && isMissingOnePasswordItem(err))
|
|
72
|
+
return undefined;
|
|
73
|
+
const ref = onePasswordRef(vault, envVar);
|
|
74
|
+
return new Error(`Missing 1Password secret for ${envVar}. Expected ${ref}. ` +
|
|
75
|
+
`${errorMessage(err)}`);
|
|
76
|
+
}
|
|
77
|
+
function hasResolvedEnvValue(value) {
|
|
78
|
+
return value !== undefined && value !== "" && !value.startsWith("op://");
|
|
79
|
+
}
|
|
80
|
+
function isMissingOnePasswordItem(err) {
|
|
81
|
+
const msg = errorMessage(err).toLowerCase();
|
|
82
|
+
return (msg.includes("isn't an item") ||
|
|
83
|
+
msg.includes("is not an item") ||
|
|
84
|
+
msg.includes("could not be found") ||
|
|
85
|
+
msg.includes("not found") ||
|
|
86
|
+
msg.includes("does not exist"));
|
|
87
|
+
}
|
|
88
|
+
function errorMessage(err) {
|
|
89
|
+
if (err instanceof Error) {
|
|
90
|
+
const stderr = err.stderr;
|
|
91
|
+
if (typeof stderr === "string" && stderr.trim())
|
|
92
|
+
return stderr.trim();
|
|
93
|
+
return err.message;
|
|
94
|
+
}
|
|
95
|
+
return String(err);
|
|
96
|
+
}
|
|
97
|
+
//# sourceMappingURL=one-password.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"one-password.js","sourceRoot":"","sources":["../../src/one-password.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,oBAAoB,CAAC;AAC9C,OAAO,EAAE,SAAS,EAAE,MAAM,WAAW,CAAC;AACtC,OAAO,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAC;AAE3C,MAAM,aAAa,GAAG,SAAS,CAAC,QAAQ,CAAC,CAAC;AAY1C,MAAM,2BAA2B,GAAG,CAAC,CAAC;AAEtC,MAAM,CAAC,KAAK,UAAU,kBAAkB,CACtC,IAA2B;IAE3B,MAAM,GAAG,GAAG,IAAI,CAAC,GAAG,IAAI,OAAO,CAAC,GAAG,CAAC;IACpC,MAAM,UAAU,GAAG,IAAI,CAAC,UAAU,IAAI,qBAAqB,CAAC;IAC5D,MAAM,eAAe,GAAG,kBAAkB,CAAC,IAAI,CAAC,gBAAgB,CAAC,CAAC;IAClE,MAAM,QAAQ,GAAG,IAAI,CAAC,gBAAgB,KAAK,SAAS,CAAC;IACrD,MAAM,cAAc,GAAG,eAAe,CAAC,MAAM,CAC3C,CAAC,MAAM,EAAE,EAAE,CAAC,CAAC,mBAAmB,CAAC,GAAG,CAAC,MAAM,CAAC,CAAC,CAC9C,CAAC;IACF,MAAM,WAAW,GAAG,oBAAoB,CACtC,IAAI,CAAC,WAAW,IAAI,2BAA2B,EAC/C,cAAc,CAAC,MAAM,CACtB,CAAC;IACF,IAAI,IAAI,GAAG,CAAC,CAAC;IACb,IAAI,UAA6B,CAAC;IA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c,GAAG,IAAI;QACzD,GAAG,YAAY,CAAC,GAAG,CAAC,EAAE,CACzB,CAAC;AACJ,CAAC;AAED,SAAS,mBAAmB,CAAC,KAAyB;IACpD,OAAO,KAAK,KAAK,SAAS,IAAI,KAAK,KAAK,EAAE,IAAI,CAAC,KAAK,CAAC,UAAU,CAAC,OAAO,CAAC,CAAC;AAC3E,CAAC;AAED,SAAS,wBAAwB,CAAC,GAAY;IAC5C,MAAM,GAAG,GAAG,YAAY,CAAC,GAAG,CAAC,CAAC,WAAW,EAAE,CAAC;IAC5C,OAAO,CACL,GAAG,CAAC,QAAQ,CAAC,eAAe,CAAC;QAC7B,GAAG,CAAC,QAAQ,CAAC,gBAAgB,CAAC;QAC9B,GAAG,CAAC,QAAQ,CAAC,oBAAoB,CAAC;QAClC,GAAG,CAAC,QAAQ,CAAC,WAAW,CAAC;QACzB,GAAG,CAAC,QAAQ,CAAC,gBAAgB,CAAC,CAC/B,CAAC;AACJ,CAAC;AAED,SAAS,YAAY,CAAC,GAAY;IAChC,IAAI,GAAG,YAAY,KAAK,EAAE,CAAC;QACzB,MAAM,MAAM,GAAI,GAAoC,CAAC,MAAM,CAAC;QAC5D,IAAI,OAAO,MAAM,KAAK,QAAQ,IAAI,MAAM,CAAC,IAAI,EAAE;YAAE,OAAO,MAAM,CAAC,IAAI,EAAE,CAAC;QACtE,OAAO,GAAG,CAAC,OAAO,CAAC;IACrB,CAAC;IACD,OAAO,MAAM,CAAC,GAAG,CAAC,CAAC;AACrB,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@apicity/mcp-server",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.10",
|
|
4
4
|
"description": "Optional MCP (Model Context Protocol) server that exposes every @apicity provider endpoint as a tool.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"repository": {
|
|
@@ -47,83 +47,22 @@
|
|
|
47
47
|
},
|
|
48
48
|
"dependencies": {
|
|
49
49
|
"@modelcontextprotocol/sdk": "^1.29.0",
|
|
50
|
-
"@apicity/
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
"@apicity/
|
|
54
|
-
"@apicity/
|
|
55
|
-
"@apicity/elevenlabs": "0.2.
|
|
56
|
-
"@apicity/
|
|
57
|
-
"@apicity/
|
|
58
|
-
"@apicity/
|
|
59
|
-
"@apicity/
|
|
60
|
-
"@apicity/openai": "0.2.
|
|
61
|
-
"@apicity/
|
|
62
|
-
"@apicity/
|
|
63
|
-
"@apicity/
|
|
64
|
-
"@apicity/xai": "0.2.
|
|
65
|
-
"@apicity/
|
|
66
|
-
"@apicity/telegram": "0.2.8"
|
|
67
|
-
},
|
|
68
|
-
"peerDependenciesMeta": {
|
|
69
|
-
"@apicity/alibaba": {
|
|
70
|
-
"optional": true
|
|
71
|
-
},
|
|
72
|
-
"@apicity/anthropic": {
|
|
73
|
-
"optional": true
|
|
74
|
-
},
|
|
75
|
-
"@apicity/elevenlabs": {
|
|
76
|
-
"optional": true
|
|
77
|
-
},
|
|
78
|
-
"@apicity/fal": {
|
|
79
|
-
"optional": true
|
|
80
|
-
},
|
|
81
|
-
"@apicity/fireworks": {
|
|
82
|
-
"optional": true
|
|
83
|
-
},
|
|
84
|
-
"@apicity/free-media-upload": {
|
|
85
|
-
"optional": true
|
|
86
|
-
},
|
|
87
|
-
"@apicity/google": {
|
|
88
|
-
"optional": true
|
|
89
|
-
},
|
|
90
|
-
"@apicity/meta": {
|
|
91
|
-
"optional": true
|
|
92
|
-
},
|
|
93
|
-
"@apicity/kie": {
|
|
94
|
-
"optional": true
|
|
95
|
-
},
|
|
96
|
-
"@apicity/kimicoding": {
|
|
97
|
-
"optional": true
|
|
98
|
-
},
|
|
99
|
-
"@apicity/openai": {
|
|
100
|
-
"optional": true
|
|
101
|
-
},
|
|
102
|
-
"@apicity/telegram": {
|
|
103
|
-
"optional": true
|
|
104
|
-
},
|
|
105
|
-
"@apicity/x": {
|
|
106
|
-
"optional": true
|
|
107
|
-
},
|
|
108
|
-
"@apicity/xai": {
|
|
109
|
-
"optional": true
|
|
110
|
-
}
|
|
111
|
-
},
|
|
112
|
-
"devDependencies": {
|
|
113
|
-
"@apicity/alibaba": "0.2.8",
|
|
114
|
-
"@apicity/elevenlabs": "0.2.8",
|
|
115
|
-
"@apicity/fireworks": "0.2.8",
|
|
116
|
-
"@apicity/fal": "0.2.8",
|
|
117
|
-
"@apicity/anthropic": "0.2.8",
|
|
118
|
-
"@apicity/google": "0.2.8",
|
|
119
|
-
"@apicity/meta": "0.2.8",
|
|
120
|
-
"@apicity/openai": "0.2.8",
|
|
121
|
-
"@apicity/kimicoding": "0.2.8",
|
|
122
|
-
"@apicity/free-media-upload": "0.2.8",
|
|
123
|
-
"@apicity/kie": "0.2.8",
|
|
124
|
-
"@apicity/telegram": "0.2.8",
|
|
125
|
-
"@apicity/x": "0.2.8",
|
|
126
|
-
"@apicity/xai": "0.2.8"
|
|
50
|
+
"@apicity/alibaba": "0.2.10",
|
|
51
|
+
"@apicity/anthropic": "0.2.10",
|
|
52
|
+
"@apicity/fal": "0.2.10",
|
|
53
|
+
"@apicity/fireworks": "0.2.10",
|
|
54
|
+
"@apicity/free-media-upload": "0.2.10",
|
|
55
|
+
"@apicity/elevenlabs": "0.2.10",
|
|
56
|
+
"@apicity/google": "0.2.10",
|
|
57
|
+
"@apicity/cost": "0.2.10",
|
|
58
|
+
"@apicity/kimicoding": "0.2.10",
|
|
59
|
+
"@apicity/meta": "0.2.10",
|
|
60
|
+
"@apicity/openai": "0.2.10",
|
|
61
|
+
"@apicity/youtube": "0.2.10",
|
|
62
|
+
"@apicity/x": "0.2.10",
|
|
63
|
+
"@apicity/kie": "0.2.10",
|
|
64
|
+
"@apicity/xai": "0.2.10",
|
|
65
|
+
"@apicity/telegram": "0.2.10"
|
|
127
66
|
},
|
|
128
67
|
"homepage": "https://github.com/justintanner/apicity#readme",
|
|
129
68
|
"bugs": {
|