@getmcp/generators 0.1.1
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 +21 -0
- package/README.md +105 -0
- package/dist/base.d.ts +26 -0
- package/dist/base.d.ts.map +1 -0
- package/dist/base.js +81 -0
- package/dist/base.js.map +1 -0
- package/dist/claude-code.d.ts +20 -0
- package/dist/claude-code.d.ts.map +1 -0
- package/dist/claude-code.js +52 -0
- package/dist/claude-code.js.map +1 -0
- package/dist/claude-desktop.d.ts +16 -0
- package/dist/claude-desktop.d.ts.map +1 -0
- package/dist/claude-desktop.js +43 -0
- package/dist/claude-desktop.js.map +1 -0
- package/dist/cline.d.ts +17 -0
- package/dist/cline.d.ts.map +1 -0
- package/dist/cline.js +55 -0
- package/dist/cline.js.map +1 -0
- package/dist/cursor.d.ts +16 -0
- package/dist/cursor.d.ts.map +1 -0
- package/dist/cursor.js +43 -0
- package/dist/cursor.js.map +1 -0
- package/dist/goose.d.ts +34 -0
- package/dist/goose.d.ts.map +1 -0
- package/dist/goose.js +138 -0
- package/dist/goose.js.map +1 -0
- package/dist/index.d.ts +42 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +79 -0
- package/dist/index.js.map +1 -0
- package/dist/opencode.d.ts +34 -0
- package/dist/opencode.d.ts.map +1 -0
- package/dist/opencode.js +93 -0
- package/dist/opencode.js.map +1 -0
- package/dist/roo-code.d.ts +20 -0
- package/dist/roo-code.d.ts.map +1 -0
- package/dist/roo-code.js +60 -0
- package/dist/roo-code.js.map +1 -0
- package/dist/vscode.d.ts +19 -0
- package/dist/vscode.d.ts.map +1 -0
- package/dist/vscode.js +56 -0
- package/dist/vscode.js.map +1 -0
- package/dist/windsurf.d.ts +19 -0
- package/dist/windsurf.d.ts.map +1 -0
- package/dist/windsurf.js +52 -0
- package/dist/windsurf.js.map +1 -0
- package/dist/zed.d.ts +28 -0
- package/dist/zed.d.ts.map +1 -0
- package/dist/zed.js +60 -0
- package/dist/zed.js.map +1 -0
- package/package.json +55 -0
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 getmcp 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,105 @@
|
|
|
1
|
+
# @getmcp/generators
|
|
2
|
+
|
|
3
|
+
Config generators that transform canonical MCP server definitions into app-specific configuration formats for 10 AI applications.
|
|
4
|
+
|
|
5
|
+
## Install
|
|
6
|
+
|
|
7
|
+
```bash
|
|
8
|
+
npm install @getmcp/generators
|
|
9
|
+
```
|
|
10
|
+
|
|
11
|
+
## Usage
|
|
12
|
+
|
|
13
|
+
### Generate config for a specific app
|
|
14
|
+
|
|
15
|
+
```ts
|
|
16
|
+
import { generateConfig, getGenerator } from "@getmcp/generators";
|
|
17
|
+
|
|
18
|
+
// Quick generation
|
|
19
|
+
const config = generateConfig("claude-desktop", "github", {
|
|
20
|
+
command: "npx",
|
|
21
|
+
args: ["-y", "@modelcontextprotocol/server-github"],
|
|
22
|
+
env: { GITHUB_TOKEN: "ghp_xxx" },
|
|
23
|
+
});
|
|
24
|
+
// => { mcpServers: { github: { command: "npx", args: [...], env: {...} } } }
|
|
25
|
+
|
|
26
|
+
// Using generator instance directly
|
|
27
|
+
const generator = getGenerator("cursor");
|
|
28
|
+
const obj = generator.generate("github", { command: "npx", args: ["server"] });
|
|
29
|
+
const text = generator.serialize(obj);
|
|
30
|
+
```
|
|
31
|
+
|
|
32
|
+
### Generate config for ALL apps at once
|
|
33
|
+
|
|
34
|
+
```ts
|
|
35
|
+
import { generateAllConfigs } from "@getmcp/generators";
|
|
36
|
+
|
|
37
|
+
const configs = generateAllConfigs("github", {
|
|
38
|
+
command: "npx",
|
|
39
|
+
args: ["-y", "@modelcontextprotocol/server-github"],
|
|
40
|
+
env: { GITHUB_TOKEN: "ghp_xxx" },
|
|
41
|
+
});
|
|
42
|
+
|
|
43
|
+
// configs["claude-desktop"] => JSON string
|
|
44
|
+
// configs["goose"] => YAML string
|
|
45
|
+
// configs["vscode"] => JSON string (different root key + type field)
|
|
46
|
+
// ... all 10 apps
|
|
47
|
+
```
|
|
48
|
+
|
|
49
|
+
### Individual generator classes
|
|
50
|
+
|
|
51
|
+
```ts
|
|
52
|
+
import {
|
|
53
|
+
ClaudeDesktopGenerator,
|
|
54
|
+
ClaudeCodeGenerator,
|
|
55
|
+
VSCodeGenerator,
|
|
56
|
+
CursorGenerator,
|
|
57
|
+
ClineGenerator,
|
|
58
|
+
RooCodeGenerator,
|
|
59
|
+
GooseGenerator,
|
|
60
|
+
WindsurfGenerator,
|
|
61
|
+
OpenCodeGenerator,
|
|
62
|
+
ZedGenerator,
|
|
63
|
+
} from "@getmcp/generators";
|
|
64
|
+
|
|
65
|
+
const goose = new GooseGenerator();
|
|
66
|
+
const config = goose.generate("github", {
|
|
67
|
+
command: "npx",
|
|
68
|
+
args: ["-y", "@modelcontextprotocol/server-github"],
|
|
69
|
+
env: { GITHUB_TOKEN: "ghp_xxx" },
|
|
70
|
+
});
|
|
71
|
+
// => { extensions: { github: { cmd: "npx", args: [...], envs: {...} } } }
|
|
72
|
+
|
|
73
|
+
goose.serialize(config);
|
|
74
|
+
// => YAML string
|
|
75
|
+
```
|
|
76
|
+
|
|
77
|
+
## Supported Apps
|
|
78
|
+
|
|
79
|
+
| App | Root Key | Format | Key Differences |
|
|
80
|
+
|-----|----------|--------|-----------------|
|
|
81
|
+
| Claude Desktop | `mcpServers` | JSON | Canonical passthrough |
|
|
82
|
+
| Claude Code | `mcpServers` | JSON | `type` field for remote |
|
|
83
|
+
| VS Code / Copilot | `servers` | JSON | Requires `type` field |
|
|
84
|
+
| Cursor | `mcpServers` | JSON | Passthrough |
|
|
85
|
+
| Cline | `mcpServers` | JSON | `alwaysAllow`, `disabled` |
|
|
86
|
+
| Roo Code | `mcpServers` | JSON | `alwaysAllow`, `disabled` |
|
|
87
|
+
| Goose | `extensions` | YAML | `cmd`/`envs` keys |
|
|
88
|
+
| Windsurf | `mcpServers` | JSON | `serverUrl` for remote |
|
|
89
|
+
| OpenCode | `mcp` | JSONC | `command` is array |
|
|
90
|
+
| Zed | `context_servers` | JSON | Standard fields |
|
|
91
|
+
|
|
92
|
+
## API
|
|
93
|
+
|
|
94
|
+
| Export | Description |
|
|
95
|
+
|--------|-------------|
|
|
96
|
+
| `generators` | Map of `AppId` to generator instances |
|
|
97
|
+
| `getGenerator(appId)` | Get a generator by app ID |
|
|
98
|
+
| `getAppIds()` | List all available app IDs |
|
|
99
|
+
| `generateConfig(appId, name, config)` | Generate config object for one app |
|
|
100
|
+
| `generateAllConfigs(name, config)` | Generate serialized config strings for all apps |
|
|
101
|
+
| `BaseGenerator` | Abstract base class for building custom generators |
|
|
102
|
+
|
|
103
|
+
## License
|
|
104
|
+
|
|
105
|
+
MIT
|
package/dist/base.d.ts
ADDED
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Base class for config generators.
|
|
3
|
+
* Provides common functionality for all app-specific generators.
|
|
4
|
+
*/
|
|
5
|
+
import type { ConfigGenerator, AppMetadata, LooseServerConfigType } from "@getmcp/core";
|
|
6
|
+
export declare abstract class BaseGenerator implements ConfigGenerator {
|
|
7
|
+
abstract app: AppMetadata;
|
|
8
|
+
abstract generate(serverName: string, config: LooseServerConfigType): Record<string, unknown>;
|
|
9
|
+
generateAll(servers: Record<string, LooseServerConfigType>): Record<string, unknown>;
|
|
10
|
+
serialize(config: Record<string, unknown>): string;
|
|
11
|
+
}
|
|
12
|
+
/**
|
|
13
|
+
* Deep merge two objects. Arrays are replaced, not merged.
|
|
14
|
+
*/
|
|
15
|
+
export declare function deepMerge(target: Record<string, unknown>, source: Record<string, unknown>): Record<string, unknown>;
|
|
16
|
+
/**
|
|
17
|
+
* Extract a clean stdio config from a LooseServerConfig.
|
|
18
|
+
* Strips transport field and undefined values.
|
|
19
|
+
*/
|
|
20
|
+
export declare function toStdioFields(config: LooseServerConfigType): Record<string, unknown>;
|
|
21
|
+
/**
|
|
22
|
+
* Extract a clean remote config from a LooseServerConfig.
|
|
23
|
+
* Strips undefined values.
|
|
24
|
+
*/
|
|
25
|
+
export declare function toRemoteFields(config: LooseServerConfigType): Record<string, unknown>;
|
|
26
|
+
//# sourceMappingURL=base.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"base.d.ts","sourceRoot":"","sources":["../src/base.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,KAAK,EACV,eAAe,EACf,WAAW,EACX,qBAAqB,EACtB,MAAM,cAAc,CAAC;AAEtB,8BAAsB,aAAc,YAAW,eAAe;IAC5D,QAAQ,CAAC,GAAG,EAAE,WAAW,CAAC;IAE1B,QAAQ,CAAC,QAAQ,CACf,UAAU,EAAE,MAAM,EAClB,MAAM,EAAE,qBAAqB,GAC5B,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC;IAE1B,WAAW,CACT,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,qBAAqB,CAAC,GAC7C,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC;IAW1B,SAAS,CAAC,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,MAAM;CAGnD;AAED;;GAEG;AACH,wBAAgB,SAAS,CACvB,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAC/B,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAC9B,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAkBzB;AAMD;;;GAGG;AACH,wBAAgB,aAAa,CAAC,MAAM,EAAE,qBAAqB,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAYpF;AAED;;;GAGG;AACH,wBAAgB,cAAc,CAAC,MAAM,EAAE,qBAAqB,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAWrF"}
|
package/dist/base.js
ADDED
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Base class for config generators.
|
|
3
|
+
* Provides common functionality for all app-specific generators.
|
|
4
|
+
*/
|
|
5
|
+
export class BaseGenerator {
|
|
6
|
+
generateAll(servers) {
|
|
7
|
+
// Default: merge all individual generates under the same root key.
|
|
8
|
+
// Subclasses can override if their format differs.
|
|
9
|
+
let merged = {};
|
|
10
|
+
for (const [name, config] of Object.entries(servers)) {
|
|
11
|
+
const single = this.generate(name, config);
|
|
12
|
+
merged = deepMerge(merged, single);
|
|
13
|
+
}
|
|
14
|
+
return merged;
|
|
15
|
+
}
|
|
16
|
+
serialize(config) {
|
|
17
|
+
return JSON.stringify(config, null, 2);
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
/**
|
|
21
|
+
* Deep merge two objects. Arrays are replaced, not merged.
|
|
22
|
+
*/
|
|
23
|
+
export function deepMerge(target, source) {
|
|
24
|
+
const result = { ...target };
|
|
25
|
+
for (const key of Object.keys(source)) {
|
|
26
|
+
const targetVal = target[key];
|
|
27
|
+
const sourceVal = source[key];
|
|
28
|
+
if (isPlainObject(targetVal) &&
|
|
29
|
+
isPlainObject(sourceVal)) {
|
|
30
|
+
result[key] = deepMerge(targetVal, sourceVal);
|
|
31
|
+
}
|
|
32
|
+
else {
|
|
33
|
+
result[key] = sourceVal;
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
return result;
|
|
37
|
+
}
|
|
38
|
+
function isPlainObject(val) {
|
|
39
|
+
return typeof val === "object" && val !== null && !Array.isArray(val);
|
|
40
|
+
}
|
|
41
|
+
/**
|
|
42
|
+
* Extract a clean stdio config from a LooseServerConfig.
|
|
43
|
+
* Strips transport field and undefined values.
|
|
44
|
+
*/
|
|
45
|
+
export function toStdioFields(config) {
|
|
46
|
+
if (!("command" in config)) {
|
|
47
|
+
throw new Error("Expected stdio config but got remote config");
|
|
48
|
+
}
|
|
49
|
+
const result = {
|
|
50
|
+
command: config.command,
|
|
51
|
+
};
|
|
52
|
+
if (config.args && config.args.length > 0)
|
|
53
|
+
result.args = config.args;
|
|
54
|
+
if (config.env && Object.keys(config.env).length > 0)
|
|
55
|
+
result.env = config.env;
|
|
56
|
+
if (config.cwd)
|
|
57
|
+
result.cwd = config.cwd;
|
|
58
|
+
if (config.timeout)
|
|
59
|
+
result.timeout = config.timeout;
|
|
60
|
+
return result;
|
|
61
|
+
}
|
|
62
|
+
/**
|
|
63
|
+
* Extract a clean remote config from a LooseServerConfig.
|
|
64
|
+
* Strips undefined values.
|
|
65
|
+
*/
|
|
66
|
+
export function toRemoteFields(config) {
|
|
67
|
+
if (!("url" in config)) {
|
|
68
|
+
throw new Error("Expected remote config but got stdio config");
|
|
69
|
+
}
|
|
70
|
+
const result = {
|
|
71
|
+
url: config.url,
|
|
72
|
+
};
|
|
73
|
+
if (config.transport)
|
|
74
|
+
result.transport = config.transport;
|
|
75
|
+
if (config.headers && Object.keys(config.headers).length > 0)
|
|
76
|
+
result.headers = config.headers;
|
|
77
|
+
if (config.timeout)
|
|
78
|
+
result.timeout = config.timeout;
|
|
79
|
+
return result;
|
|
80
|
+
}
|
|
81
|
+
//# sourceMappingURL=base.js.map
|
package/dist/base.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"base.js","sourceRoot":"","sources":["../src/base.ts"],"names":[],"mappings":"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"}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Claude Code (CLI) config generator.
|
|
3
|
+
*
|
|
4
|
+
* Config file: .mcp.json (project scope) or ~/.claude.json (user scope)
|
|
5
|
+
* Format: { "mcpServers": { "name": { "command", "args", "env" } } }
|
|
6
|
+
* CLI: claude mcp add <name> -- <command> [args]
|
|
7
|
+
*
|
|
8
|
+
* Supports stdio, http, sse transports.
|
|
9
|
+
* Supports ${VAR} and ${VAR:-default} env variable syntax.
|
|
10
|
+
*
|
|
11
|
+
* Very similar to Claude Desktop — essentially a passthrough with
|
|
12
|
+
* optional transport type for remote servers.
|
|
13
|
+
*/
|
|
14
|
+
import type { AppMetadata, LooseServerConfigType } from "@getmcp/core";
|
|
15
|
+
import { BaseGenerator } from "./base.js";
|
|
16
|
+
export declare class ClaudeCodeGenerator extends BaseGenerator {
|
|
17
|
+
app: AppMetadata;
|
|
18
|
+
generate(serverName: string, config: LooseServerConfigType): Record<string, unknown>;
|
|
19
|
+
}
|
|
20
|
+
//# sourceMappingURL=claude-code.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"claude-code.d.ts","sourceRoot":"","sources":["../src/claude-code.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AAEH,OAAO,KAAK,EAAE,WAAW,EAAE,qBAAqB,EAAE,MAAM,cAAc,CAAC;AAEvE,OAAO,EAAE,aAAa,EAAiC,MAAM,WAAW,CAAC;AAEzE,qBAAa,mBAAoB,SAAQ,aAAa;IACpD,GAAG,EAAE,WAAW,CAWd;IAEF,QAAQ,CACN,UAAU,EAAE,MAAM,EAClB,MAAM,EAAE,qBAAqB,GAC5B,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC;CAsB3B"}
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Claude Code (CLI) config generator.
|
|
3
|
+
*
|
|
4
|
+
* Config file: .mcp.json (project scope) or ~/.claude.json (user scope)
|
|
5
|
+
* Format: { "mcpServers": { "name": { "command", "args", "env" } } }
|
|
6
|
+
* CLI: claude mcp add <name> -- <command> [args]
|
|
7
|
+
*
|
|
8
|
+
* Supports stdio, http, sse transports.
|
|
9
|
+
* Supports ${VAR} and ${VAR:-default} env variable syntax.
|
|
10
|
+
*
|
|
11
|
+
* Very similar to Claude Desktop — essentially a passthrough with
|
|
12
|
+
* optional transport type for remote servers.
|
|
13
|
+
*/
|
|
14
|
+
import { isStdioConfig, isRemoteConfig } from "@getmcp/core";
|
|
15
|
+
import { BaseGenerator, toStdioFields, toRemoteFields } from "./base.js";
|
|
16
|
+
export class ClaudeCodeGenerator extends BaseGenerator {
|
|
17
|
+
app = {
|
|
18
|
+
id: "claude-code",
|
|
19
|
+
name: "Claude Code",
|
|
20
|
+
description: "Anthropic's CLI-based coding agent",
|
|
21
|
+
configPaths: {
|
|
22
|
+
darwin: ".mcp.json",
|
|
23
|
+
win32: ".mcp.json",
|
|
24
|
+
linux: ".mcp.json",
|
|
25
|
+
},
|
|
26
|
+
configFormat: "json",
|
|
27
|
+
docsUrl: "https://docs.anthropic.com/en/docs/claude-code/mcp",
|
|
28
|
+
};
|
|
29
|
+
generate(serverName, config) {
|
|
30
|
+
let serverConfig;
|
|
31
|
+
if (isStdioConfig(config)) {
|
|
32
|
+
serverConfig = toStdioFields(config);
|
|
33
|
+
}
|
|
34
|
+
else if (isRemoteConfig(config)) {
|
|
35
|
+
serverConfig = toRemoteFields(config);
|
|
36
|
+
// Claude Code uses "type" to specify transport for remote
|
|
37
|
+
if (config.transport) {
|
|
38
|
+
serverConfig.type = config.transport;
|
|
39
|
+
delete serverConfig.transport;
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
else {
|
|
43
|
+
throw new Error("Invalid config: must have either 'command' or 'url'");
|
|
44
|
+
}
|
|
45
|
+
return {
|
|
46
|
+
mcpServers: {
|
|
47
|
+
[serverName]: serverConfig,
|
|
48
|
+
},
|
|
49
|
+
};
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
//# sourceMappingURL=claude-code.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"claude-code.js","sourceRoot":"","sources":["../src/claude-code.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AAGH,OAAO,EAAE,aAAa,EAAE,cAAc,EAAE,MAAM,cAAc,CAAC;AAC7D,OAAO,EAAE,aAAa,EAAE,aAAa,EAAE,cAAc,EAAE,MAAM,WAAW,CAAC;AAEzE,MAAM,OAAO,mBAAoB,SAAQ,aAAa;IACpD,GAAG,GAAgB;QACjB,EAAE,EAAE,aAAa;QACjB,IAAI,EAAE,aAAa;QACnB,WAAW,EAAE,oCAAoC;QACjD,WAAW,EAAE;YACX,MAAM,EAAE,WAAW;YACnB,KAAK,EAAE,WAAW;YAClB,KAAK,EAAE,WAAW;SACnB;QACD,YAAY,EAAE,MAAM;QACpB,OAAO,EAAE,oDAAoD;KAC9D,CAAC;IAEF,QAAQ,CACN,UAAkB,EAClB,MAA6B;QAE7B,IAAI,YAAqC,CAAC;QAE1C,IAAI,aAAa,CAAC,MAAM,CAAC,EAAE,CAAC;YAC1B,YAAY,GAAG,aAAa,CAAC,MAAM,CAAC,CAAC;QACvC,CAAC;aAAM,IAAI,cAAc,CAAC,MAAM,CAAC,EAAE,CAAC;YAClC,YAAY,GAAG,cAAc,CAAC,MAAM,CAAC,CAAC;YACtC,0DAA0D;YAC1D,IAAI,MAAM,CAAC,SAAS,EAAE,CAAC;gBACrB,YAAY,CAAC,IAAI,GAAG,MAAM,CAAC,SAAS,CAAC;gBACrC,OAAO,YAAY,CAAC,SAAS,CAAC;YAChC,CAAC;QACH,CAAC;aAAM,CAAC;YACN,MAAM,IAAI,KAAK,CAAC,qDAAqD,CAAC,CAAC;QACzE,CAAC;QAED,OAAO;YACL,UAAU,EAAE;gBACV,CAAC,UAAU,CAAC,EAAE,YAAY;aAC3B;SACF,CAAC;IACJ,CAAC;CACF"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Claude Desktop config generator.
|
|
3
|
+
*
|
|
4
|
+
* Config file: ~/Library/Application Support/Claude/claude_desktop_config.json (macOS)
|
|
5
|
+
* %AppData%\Claude\claude_desktop_config.json (Windows)
|
|
6
|
+
* Format: { "mcpServers": { "name": { "command", "args", "env" } } }
|
|
7
|
+
*
|
|
8
|
+
* This is essentially a passthrough — the canonical format IS the Claude Desktop format.
|
|
9
|
+
*/
|
|
10
|
+
import type { AppMetadata, LooseServerConfigType } from "@getmcp/core";
|
|
11
|
+
import { BaseGenerator } from "./base.js";
|
|
12
|
+
export declare class ClaudeDesktopGenerator extends BaseGenerator {
|
|
13
|
+
app: AppMetadata;
|
|
14
|
+
generate(serverName: string, config: LooseServerConfigType): Record<string, unknown>;
|
|
15
|
+
}
|
|
16
|
+
//# sourceMappingURL=claude-desktop.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"claude-desktop.d.ts","sourceRoot":"","sources":["../src/claude-desktop.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,OAAO,KAAK,EAAE,WAAW,EAAE,qBAAqB,EAAE,MAAM,cAAc,CAAC;AAEvE,OAAO,EAAE,aAAa,EAAiC,MAAM,WAAW,CAAC;AAEzE,qBAAa,sBAAuB,SAAQ,aAAa;IACvD,GAAG,EAAE,WAAW,CAWd;IAEF,QAAQ,CACN,UAAU,EAAE,MAAM,EAClB,MAAM,EAAE,qBAAqB,GAC5B,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC;CAiB3B"}
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Claude Desktop config generator.
|
|
3
|
+
*
|
|
4
|
+
* Config file: ~/Library/Application Support/Claude/claude_desktop_config.json (macOS)
|
|
5
|
+
* %AppData%\Claude\claude_desktop_config.json (Windows)
|
|
6
|
+
* Format: { "mcpServers": { "name": { "command", "args", "env" } } }
|
|
7
|
+
*
|
|
8
|
+
* This is essentially a passthrough — the canonical format IS the Claude Desktop format.
|
|
9
|
+
*/
|
|
10
|
+
import { isStdioConfig, isRemoteConfig } from "@getmcp/core";
|
|
11
|
+
import { BaseGenerator, toStdioFields, toRemoteFields } from "./base.js";
|
|
12
|
+
export class ClaudeDesktopGenerator extends BaseGenerator {
|
|
13
|
+
app = {
|
|
14
|
+
id: "claude-desktop",
|
|
15
|
+
name: "Claude Desktop",
|
|
16
|
+
description: "Anthropic's Claude desktop application",
|
|
17
|
+
configPaths: {
|
|
18
|
+
darwin: "~/Library/Application Support/Claude/claude_desktop_config.json",
|
|
19
|
+
win32: "%AppData%\\Claude\\claude_desktop_config.json",
|
|
20
|
+
linux: "~/.config/Claude/claude_desktop_config.json",
|
|
21
|
+
},
|
|
22
|
+
configFormat: "json",
|
|
23
|
+
docsUrl: "https://modelcontextprotocol.io/quickstart/user",
|
|
24
|
+
};
|
|
25
|
+
generate(serverName, config) {
|
|
26
|
+
let serverConfig;
|
|
27
|
+
if (isStdioConfig(config)) {
|
|
28
|
+
serverConfig = toStdioFields(config);
|
|
29
|
+
}
|
|
30
|
+
else if (isRemoteConfig(config)) {
|
|
31
|
+
serverConfig = toRemoteFields(config);
|
|
32
|
+
}
|
|
33
|
+
else {
|
|
34
|
+
throw new Error("Invalid config: must have either 'command' or 'url'");
|
|
35
|
+
}
|
|
36
|
+
return {
|
|
37
|
+
mcpServers: {
|
|
38
|
+
[serverName]: serverConfig,
|
|
39
|
+
},
|
|
40
|
+
};
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
//# sourceMappingURL=claude-desktop.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"claude-desktop.js","sourceRoot":"","sources":["../src/claude-desktop.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAGH,OAAO,EAAE,aAAa,EAAE,cAAc,EAAE,MAAM,cAAc,CAAC;AAC7D,OAAO,EAAE,aAAa,EAAE,aAAa,EAAE,cAAc,EAAE,MAAM,WAAW,CAAC;AAEzE,MAAM,OAAO,sBAAuB,SAAQ,aAAa;IACvD,GAAG,GAAgB;QACjB,EAAE,EAAE,gBAAgB;QACpB,IAAI,EAAE,gBAAgB;QACtB,WAAW,EAAE,wCAAwC;QACrD,WAAW,EAAE;YACX,MAAM,EAAE,iEAAiE;YACzE,KAAK,EAAE,+CAA+C;YACtD,KAAK,EAAE,6CAA6C;SACrD;QACD,YAAY,EAAE,MAAM;QACpB,OAAO,EAAE,iDAAiD;KAC3D,CAAC;IAEF,QAAQ,CACN,UAAkB,EAClB,MAA6B;QAE7B,IAAI,YAAqC,CAAC;QAE1C,IAAI,aAAa,CAAC,MAAM,CAAC,EAAE,CAAC;YAC1B,YAAY,GAAG,aAAa,CAAC,MAAM,CAAC,CAAC;QACvC,CAAC;aAAM,IAAI,cAAc,CAAC,MAAM,CAAC,EAAE,CAAC;YAClC,YAAY,GAAG,cAAc,CAAC,MAAM,CAAC,CAAC;QACxC,CAAC;aAAM,CAAC;YACN,MAAM,IAAI,KAAK,CAAC,qDAAqD,CAAC,CAAC;QACzE,CAAC;QAED,OAAO;YACL,UAAU,EAAE;gBACV,CAAC,UAAU,CAAC,EAAE,YAAY;aAC3B;SACF,CAAC;IACJ,CAAC;CACF"}
|
package/dist/cline.d.ts
ADDED
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Cline config generator.
|
|
3
|
+
*
|
|
4
|
+
* Config file: cline_mcp_settings.json
|
|
5
|
+
* Format: { "mcpServers": { "name": { "command", "args", "env", "alwaysAllow", "disabled" } } }
|
|
6
|
+
*
|
|
7
|
+
* Key differences from canonical:
|
|
8
|
+
* - Extra fields: "alwaysAllow" (string array), "disabled" (boolean)
|
|
9
|
+
* - SSE servers use "url" + "headers" instead of "command"/"args"
|
|
10
|
+
*/
|
|
11
|
+
import type { AppMetadata, LooseServerConfigType } from "@getmcp/core";
|
|
12
|
+
import { BaseGenerator } from "./base.js";
|
|
13
|
+
export declare class ClineGenerator extends BaseGenerator {
|
|
14
|
+
app: AppMetadata;
|
|
15
|
+
generate(serverName: string, config: LooseServerConfigType): Record<string, unknown>;
|
|
16
|
+
}
|
|
17
|
+
//# sourceMappingURL=cline.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"cline.d.ts","sourceRoot":"","sources":["../src/cline.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAEH,OAAO,KAAK,EAAE,WAAW,EAAE,qBAAqB,EAAE,MAAM,cAAc,CAAC;AAEvE,OAAO,EAAE,aAAa,EAAiB,MAAM,WAAW,CAAC;AAEzD,qBAAa,cAAe,SAAQ,aAAa;IAC/C,GAAG,EAAE,WAAW,CAWd;IAEF,QAAQ,CACN,UAAU,EAAE,MAAM,EAClB,MAAM,EAAE,qBAAqB,GAC5B,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC;CA4B3B"}
|
package/dist/cline.js
ADDED
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Cline config generator.
|
|
3
|
+
*
|
|
4
|
+
* Config file: cline_mcp_settings.json
|
|
5
|
+
* Format: { "mcpServers": { "name": { "command", "args", "env", "alwaysAllow", "disabled" } } }
|
|
6
|
+
*
|
|
7
|
+
* Key differences from canonical:
|
|
8
|
+
* - Extra fields: "alwaysAllow" (string array), "disabled" (boolean)
|
|
9
|
+
* - SSE servers use "url" + "headers" instead of "command"/"args"
|
|
10
|
+
*/
|
|
11
|
+
import { isStdioConfig, isRemoteConfig } from "@getmcp/core";
|
|
12
|
+
import { BaseGenerator, toStdioFields } from "./base.js";
|
|
13
|
+
export class ClineGenerator extends BaseGenerator {
|
|
14
|
+
app = {
|
|
15
|
+
id: "cline",
|
|
16
|
+
name: "Cline",
|
|
17
|
+
description: "AI coding assistant VS Code extension",
|
|
18
|
+
configPaths: {
|
|
19
|
+
darwin: "~/Library/Application Support/Code/User/globalStorage/saoudrizwan.claude-dev/settings/cline_mcp_settings.json",
|
|
20
|
+
win32: "%AppData%\\Code\\User\\globalStorage\\saoudrizwan.claude-dev\\settings\\cline_mcp_settings.json",
|
|
21
|
+
linux: "~/.config/Code/User/globalStorage/saoudrizwan.claude-dev/settings/cline_mcp_settings.json",
|
|
22
|
+
},
|
|
23
|
+
configFormat: "json",
|
|
24
|
+
docsUrl: "https://docs.cline.bot/mcp-servers/configuring-mcp-servers",
|
|
25
|
+
};
|
|
26
|
+
generate(serverName, config) {
|
|
27
|
+
let serverConfig;
|
|
28
|
+
if (isStdioConfig(config)) {
|
|
29
|
+
serverConfig = {
|
|
30
|
+
...toStdioFields(config),
|
|
31
|
+
alwaysAllow: [],
|
|
32
|
+
disabled: false,
|
|
33
|
+
};
|
|
34
|
+
}
|
|
35
|
+
else if (isRemoteConfig(config)) {
|
|
36
|
+
serverConfig = {
|
|
37
|
+
url: config.url,
|
|
38
|
+
...(config.headers && Object.keys(config.headers).length > 0
|
|
39
|
+
? { headers: config.headers }
|
|
40
|
+
: {}),
|
|
41
|
+
alwaysAllow: [],
|
|
42
|
+
disabled: false,
|
|
43
|
+
};
|
|
44
|
+
}
|
|
45
|
+
else {
|
|
46
|
+
throw new Error("Invalid config: must have either 'command' or 'url'");
|
|
47
|
+
}
|
|
48
|
+
return {
|
|
49
|
+
mcpServers: {
|
|
50
|
+
[serverName]: serverConfig,
|
|
51
|
+
},
|
|
52
|
+
};
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
//# sourceMappingURL=cline.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"cline.js","sourceRoot":"","sources":["../src/cline.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAGH,OAAO,EAAE,aAAa,EAAE,cAAc,EAAE,MAAM,cAAc,CAAC;AAC7D,OAAO,EAAE,aAAa,EAAE,aAAa,EAAE,MAAM,WAAW,CAAC;AAEzD,MAAM,OAAO,cAAe,SAAQ,aAAa;IAC/C,GAAG,GAAgB;QACjB,EAAE,EAAE,OAAO;QACX,IAAI,EAAE,OAAO;QACb,WAAW,EAAE,uCAAuC;QACpD,WAAW,EAAE;YACX,MAAM,EAAE,+GAA+G;YACvH,KAAK,EAAE,iGAAiG;YACxG,KAAK,EAAE,2FAA2F;SACnG;QACD,YAAY,EAAE,MAAM;QACpB,OAAO,EAAE,4DAA4D;KACtE,CAAC;IAEF,QAAQ,CACN,UAAkB,EAClB,MAA6B;QAE7B,IAAI,YAAqC,CAAC;QAE1C,IAAI,aAAa,CAAC,MAAM,CAAC,EAAE,CAAC;YAC1B,YAAY,GAAG;gBACb,GAAG,aAAa,CAAC,MAAM,CAAC;gBACxB,WAAW,EAAE,EAAE;gBACf,QAAQ,EAAE,KAAK;aAChB,CAAC;QACJ,CAAC;aAAM,IAAI,cAAc,CAAC,MAAM,CAAC,EAAE,CAAC;YAClC,YAAY,GAAG;gBACb,GAAG,EAAE,MAAM,CAAC,GAAG;gBACf,GAAG,CAAC,MAAM,CAAC,OAAO,IAAI,MAAM,CAAC,IAAI,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC,MAAM,GAAG,CAAC;oBAC1D,CAAC,CAAC,EAAE,OAAO,EAAE,MAAM,CAAC,OAAO,EAAE;oBAC7B,CAAC,CAAC,EAAE,CAAC;gBACP,WAAW,EAAE,EAAE;gBACf,QAAQ,EAAE,KAAK;aAChB,CAAC;QACJ,CAAC;aAAM,CAAC;YACN,MAAM,IAAI,KAAK,CAAC,qDAAqD,CAAC,CAAC;QACzE,CAAC;QAED,OAAO;YACL,UAAU,EAAE;gBACV,CAAC,UAAU,CAAC,EAAE,YAAY;aAC3B;SACF,CAAC;IACJ,CAAC;CACF"}
|
package/dist/cursor.d.ts
ADDED
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Cursor config generator.
|
|
3
|
+
*
|
|
4
|
+
* Config file: .cursor/mcp.json (project) or global settings
|
|
5
|
+
* Format: { "mcpServers": { "name": { "command", "args", "env" } } }
|
|
6
|
+
*
|
|
7
|
+
* Very similar to Claude Desktop — essentially a passthrough.
|
|
8
|
+
* Supports stdio and SSE transports.
|
|
9
|
+
*/
|
|
10
|
+
import type { AppMetadata, LooseServerConfigType } from "@getmcp/core";
|
|
11
|
+
import { BaseGenerator } from "./base.js";
|
|
12
|
+
export declare class CursorGenerator extends BaseGenerator {
|
|
13
|
+
app: AppMetadata;
|
|
14
|
+
generate(serverName: string, config: LooseServerConfigType): Record<string, unknown>;
|
|
15
|
+
}
|
|
16
|
+
//# sourceMappingURL=cursor.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"cursor.d.ts","sourceRoot":"","sources":["../src/cursor.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,OAAO,KAAK,EAAE,WAAW,EAAE,qBAAqB,EAAE,MAAM,cAAc,CAAC;AAEvE,OAAO,EAAE,aAAa,EAAiC,MAAM,WAAW,CAAC;AAEzE,qBAAa,eAAgB,SAAQ,aAAa;IAChD,GAAG,EAAE,WAAW,CAWd;IAEF,QAAQ,CACN,UAAU,EAAE,MAAM,EAClB,MAAM,EAAE,qBAAqB,GAC5B,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC;CAiB3B"}
|
package/dist/cursor.js
ADDED
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Cursor config generator.
|
|
3
|
+
*
|
|
4
|
+
* Config file: .cursor/mcp.json (project) or global settings
|
|
5
|
+
* Format: { "mcpServers": { "name": { "command", "args", "env" } } }
|
|
6
|
+
*
|
|
7
|
+
* Very similar to Claude Desktop — essentially a passthrough.
|
|
8
|
+
* Supports stdio and SSE transports.
|
|
9
|
+
*/
|
|
10
|
+
import { isStdioConfig, isRemoteConfig } from "@getmcp/core";
|
|
11
|
+
import { BaseGenerator, toStdioFields, toRemoteFields } from "./base.js";
|
|
12
|
+
export class CursorGenerator extends BaseGenerator {
|
|
13
|
+
app = {
|
|
14
|
+
id: "cursor",
|
|
15
|
+
name: "Cursor",
|
|
16
|
+
description: "Cursor AI-powered code editor",
|
|
17
|
+
configPaths: {
|
|
18
|
+
darwin: ".cursor/mcp.json",
|
|
19
|
+
win32: ".cursor/mcp.json",
|
|
20
|
+
linux: ".cursor/mcp.json",
|
|
21
|
+
},
|
|
22
|
+
configFormat: "json",
|
|
23
|
+
docsUrl: "https://docs.cursor.com/context/model-context-protocol",
|
|
24
|
+
};
|
|
25
|
+
generate(serverName, config) {
|
|
26
|
+
let serverConfig;
|
|
27
|
+
if (isStdioConfig(config)) {
|
|
28
|
+
serverConfig = toStdioFields(config);
|
|
29
|
+
}
|
|
30
|
+
else if (isRemoteConfig(config)) {
|
|
31
|
+
serverConfig = toRemoteFields(config);
|
|
32
|
+
}
|
|
33
|
+
else {
|
|
34
|
+
throw new Error("Invalid config: must have either 'command' or 'url'");
|
|
35
|
+
}
|
|
36
|
+
return {
|
|
37
|
+
mcpServers: {
|
|
38
|
+
[serverName]: serverConfig,
|
|
39
|
+
},
|
|
40
|
+
};
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
//# sourceMappingURL=cursor.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"cursor.js","sourceRoot":"","sources":["../src/cursor.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAGH,OAAO,EAAE,aAAa,EAAE,cAAc,EAAE,MAAM,cAAc,CAAC;AAC7D,OAAO,EAAE,aAAa,EAAE,aAAa,EAAE,cAAc,EAAE,MAAM,WAAW,CAAC;AAEzE,MAAM,OAAO,eAAgB,SAAQ,aAAa;IAChD,GAAG,GAAgB;QACjB,EAAE,EAAE,QAAQ;QACZ,IAAI,EAAE,QAAQ;QACd,WAAW,EAAE,+BAA+B;QAC5C,WAAW,EAAE;YACX,MAAM,EAAE,kBAAkB;YAC1B,KAAK,EAAE,kBAAkB;YACzB,KAAK,EAAE,kBAAkB;SAC1B;QACD,YAAY,EAAE,MAAM;QACpB,OAAO,EAAE,wDAAwD;KAClE,CAAC;IAEF,QAAQ,CACN,UAAkB,EAClB,MAA6B;QAE7B,IAAI,YAAqC,CAAC;QAE1C,IAAI,aAAa,CAAC,MAAM,CAAC,EAAE,CAAC;YAC1B,YAAY,GAAG,aAAa,CAAC,MAAM,CAAC,CAAC;QACvC,CAAC;aAAM,IAAI,cAAc,CAAC,MAAM,CAAC,EAAE,CAAC;YAClC,YAAY,GAAG,cAAc,CAAC,MAAM,CAAC,CAAC;QACxC,CAAC;aAAM,CAAC;YACN,MAAM,IAAI,KAAK,CAAC,qDAAqD,CAAC,CAAC;QACzE,CAAC;QAED,OAAO;YACL,UAAU,EAAE;gBACV,CAAC,UAAU,CAAC,EAAE,YAAY;aAC3B;SACF,CAAC;IACJ,CAAC;CACF"}
|
package/dist/goose.d.ts
ADDED
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Goose config generator.
|
|
3
|
+
*
|
|
4
|
+
* Config file: ~/.config/goose/config.yaml (YAML!)
|
|
5
|
+
* Format:
|
|
6
|
+
* extensions:
|
|
7
|
+
* name:
|
|
8
|
+
* name: Display Name
|
|
9
|
+
* cmd: npx
|
|
10
|
+
* args: [-y, @package/name]
|
|
11
|
+
* enabled: true
|
|
12
|
+
* envs: { "KEY": "value" }
|
|
13
|
+
* type: stdio
|
|
14
|
+
* timeout: 300
|
|
15
|
+
*
|
|
16
|
+
* Key differences from canonical:
|
|
17
|
+
* - YAML format (not JSON)
|
|
18
|
+
* - Root key: "extensions" (not "mcpServers")
|
|
19
|
+
* - "cmd" (not "command")
|
|
20
|
+
* - "envs" (not "env")
|
|
21
|
+
* - Extra fields: "enabled", "timeout" (in seconds), "name" (display name)
|
|
22
|
+
*/
|
|
23
|
+
import type { AppMetadata, LooseServerConfigType } from "@getmcp/core";
|
|
24
|
+
import { BaseGenerator } from "./base.js";
|
|
25
|
+
export declare class GooseGenerator extends BaseGenerator {
|
|
26
|
+
app: AppMetadata;
|
|
27
|
+
generate(serverName: string, config: LooseServerConfigType): Record<string, unknown>;
|
|
28
|
+
/**
|
|
29
|
+
* Serialize to YAML format.
|
|
30
|
+
* Uses a minimal YAML serializer to avoid heavy dependencies.
|
|
31
|
+
*/
|
|
32
|
+
serialize(config: Record<string, unknown>): string;
|
|
33
|
+
}
|
|
34
|
+
//# sourceMappingURL=goose.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"goose.d.ts","sourceRoot":"","sources":["../src/goose.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;GAqBG;AAEH,OAAO,KAAK,EAAE,WAAW,EAAE,qBAAqB,EAAE,MAAM,cAAc,CAAC;AAEvE,OAAO,EAAE,aAAa,EAAE,MAAM,WAAW,CAAC;AAE1C,qBAAa,cAAe,SAAQ,aAAa;IAC/C,GAAG,EAAE,WAAW,CAWd;IAEF,QAAQ,CACN,UAAU,EAAE,MAAM,EAClB,MAAM,EAAE,qBAAqB,GAC5B,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC;IAsC1B;;;OAGG;IACM,SAAS,CAAC,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,MAAM;CAG5D"}
|