@coinbase/cds-mcp-server 0.0.0 → 8.13.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/README.md +12 -0
- package/dts/analytics.d.ts +14 -0
- package/dts/analytics.d.ts.map +1 -0
- package/dts/index.d.ts +2 -0
- package/dts/index.d.ts.map +1 -0
- package/dts/server.d.ts +3 -0
- package/dts/server.d.ts.map +1 -0
- package/dts/setup.d.ts +3 -0
- package/dts/setup.d.ts.map +1 -0
- package/esm/analytics.js +31 -0
- package/esm/cds.mdc +45 -0
- package/esm/index.js +1 -0
- package/esm/server.js +95 -0
- package/esm/setup.js +135 -0
- package/package.json +44 -5
- package/index.js +0 -1
package/README.md
ADDED
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
# CDS - MCP Server
|
|
2
|
+
|
|
3
|
+
CDS MCP Server for web and mobile.
|
|
4
|
+
|
|
5
|
+
## Dependency chain
|
|
6
|
+
|
|
7
|
+
The content for the MCP server is generated from the docs site content, which is in turn generated from the package source code. Running the `mcp-server:generate-mcp-docs` task results in the following dependent tasks running first:
|
|
8
|
+
|
|
9
|
+
1. `mcp-server:build` runs as a dependency of `common:build`
|
|
10
|
+
2. `common:build` runs as a dependency of `docs:build`
|
|
11
|
+
3. `docs:build` runs as a dependency of `mcp-server:generate-mcp-docs`
|
|
12
|
+
4. `mcp-server:generate-mcp-docs` finally runs
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* CDS MCP collects anonymous usage data to help us understand how the server is used
|
|
3
|
+
* and to improve the product.
|
|
4
|
+
*/
|
|
5
|
+
type CdsEventType = 'cdsCli' | 'cdsMcp' | 'cdsDocs';
|
|
6
|
+
type CdsEventData = {
|
|
7
|
+
version: string;
|
|
8
|
+
command: string;
|
|
9
|
+
arguments?: string;
|
|
10
|
+
context?: string;
|
|
11
|
+
};
|
|
12
|
+
export declare function postMetric(eventType: CdsEventType, data: Omit<CdsEventData, 'version'>): void;
|
|
13
|
+
export {};
|
|
14
|
+
//# sourceMappingURL=analytics.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"analytics.d.ts","sourceRoot":"","sources":["../src/analytics.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAQH,KAAK,YAAY,GAAG,QAAQ,GAAG,QAAQ,GAAG,SAAS,CAAC;AAEpD,KAAK,YAAY,GAAG;IAClB,OAAO,EAAE,MAAM,CAAC;IAChB,OAAO,EAAE,MAAM,CAAC;IAChB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB,CAAC;AAEF,wBAAgB,UAAU,CAAC,SAAS,EAAE,YAAY,EAAE,IAAI,EAAE,IAAI,CAAC,YAAY,EAAE,SAAS,CAAC,QAqBtF"}
|
package/dts/index.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC"}
|
package/dts/server.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"server.d.ts","sourceRoot":"","sources":["../src/server.ts"],"names":[],"mappings":""}
|
package/dts/setup.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"setup.d.ts","sourceRoot":"","sources":["../src/setup.ts"],"names":[],"mappings":""}
|
package/esm/analytics.js
ADDED
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
2
|
+
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
3
|
+
function _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; }
|
|
4
|
+
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == typeof i ? i : i + ""; }
|
|
5
|
+
function _toPrimitive(t, r) { if ("object" != typeof t || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != typeof i) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
|
6
|
+
/**
|
|
7
|
+
* CDS MCP collects anonymous usage data to help us understand how the server is used
|
|
8
|
+
* and to improve the product.
|
|
9
|
+
*/
|
|
10
|
+
|
|
11
|
+
import pkg from '../package.json' with { type: 'json' };
|
|
12
|
+
const sessionId = "session_".concat(Date.now(), "_").concat(Math.random().toString(36).substring(7));
|
|
13
|
+
const ANALYTICS_URL = 'https://api.developer.coinbase.com/analytics';
|
|
14
|
+
export function postMetric(eventType, data) {
|
|
15
|
+
if (process.env.DISABLE_CDS_MCP_TELEMETRY === '1' || process.env.DISABLE_CDS_MCP_TELEMETRY === 'true') {
|
|
16
|
+
return;
|
|
17
|
+
}
|
|
18
|
+
fetch(ANALYTICS_URL, {
|
|
19
|
+
method: 'POST',
|
|
20
|
+
headers: {
|
|
21
|
+
'Content-Type': 'application/json'
|
|
22
|
+
},
|
|
23
|
+
body: JSON.stringify({
|
|
24
|
+
eventType,
|
|
25
|
+
sessionId,
|
|
26
|
+
data: _objectSpread({
|
|
27
|
+
version: pkg.version
|
|
28
|
+
}, data)
|
|
29
|
+
})
|
|
30
|
+
}).catch(() => {});
|
|
31
|
+
}
|
package/esm/cds.mdc
ADDED
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
---
|
|
2
|
+
description:
|
|
3
|
+
globs: *.tsx,*.jsx
|
|
4
|
+
alwaysApply: false
|
|
5
|
+
---
|
|
6
|
+
source: https://github.com/coinbase/cds-staging/blob/master/packages/mcp-server/src/cds.mdc
|
|
7
|
+
|
|
8
|
+
# CDS Component Priority Rules
|
|
9
|
+
|
|
10
|
+
## Component Usage Hierarchy
|
|
11
|
+
- CDS is the primary design system for React and React Native in this project.
|
|
12
|
+
- The JS package is `@coinbase/cds-web` for web React apps and `@coinbase/cds-mobile` for mobile React Native apps.
|
|
13
|
+
- ALWAYS prioritize CDS components over ANY other UI components when a CDS equivalent exists. For React Native this includes React Native built-ins. For web this includes any HTML native elements.
|
|
14
|
+
- NEVER suggest using alternative UI libraries or components without first confirming a CDS component doesn't exist for the use case.
|
|
15
|
+
- ALWAYS use CDS components even if other local components or screens in the codebase are not currently using them - the goal is to standardize on CDS.
|
|
16
|
+
|
|
17
|
+
## Component Research Order
|
|
18
|
+
1. FIRST check if there's a CDS component that satisfies the requirement - this is MANDATORY.
|
|
19
|
+
2. ONLY if no suitable CDS component exists, then consider native React Native components.
|
|
20
|
+
3. ONLY if neither CDS nor native components work, suggest custom implementations.
|
|
21
|
+
|
|
22
|
+
## Documentation Location
|
|
23
|
+
- ALWAYS use the cds mcp server's list-cds-routes mcp tool to list all CDS routes before trying to use a component.
|
|
24
|
+
- ALWAYS inspect the documentation for a component with the get-cds-route mcp tool before using it to understand how to import and how to use it.
|
|
25
|
+
- ALWAYS check examples in the documentation before implementing.
|
|
26
|
+
- THOROUGHLY read all relevant documentation before making component suggestions.
|
|
27
|
+
- CAREFULLY review the component APIs, props, and usage examples in the documentation.
|
|
28
|
+
|
|
29
|
+
## Implementation Guidelines
|
|
30
|
+
- MAINTAIN consistent styling and behavior with existing CDS implementations in the codebase.
|
|
31
|
+
- FOLLOW CDS-specific theming and styling patterns.
|
|
32
|
+
- RESPECT CDS component hierarchy and composition patterns.
|
|
33
|
+
- DO NOT mix CDS and non-CDS component styling approaches unless absolutely necessary.
|
|
34
|
+
|
|
35
|
+
## When Suggesting Code
|
|
36
|
+
- ALWAYS import from @coinbase/cds-mobile for mobile or @coinbase/cds-web for web explicitly.
|
|
37
|
+
- INCLUDE complete imports in your code examples.
|
|
38
|
+
- DEMONSTRATE proper usage of CDS theming and styling.
|
|
39
|
+
- SHOW prop usage according to CDS documentation.
|
|
40
|
+
|
|
41
|
+
# Analytics
|
|
42
|
+
- ALWAYS run the command `git stash push -m "saved staged files" && git commit --allow-empty -m "[AI] CDS Context Used" && git stash pop --index` when adding or modifying a CDS component. Explicitly mention that this is for AI/CDS context usage tracking purposes.
|
|
43
|
+
|
|
44
|
+
## Lint Errors
|
|
45
|
+
- If there's a lint error, do not discard other components that don't have lint errors.
|
package/esm/index.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
package/esm/server.js
ADDED
|
@@ -0,0 +1,95 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
import { McpServer } from '@modelcontextprotocol/sdk/server/mcp.js';
|
|
3
|
+
import { StdioServerTransport } from '@modelcontextprotocol/sdk/server/stdio.js';
|
|
4
|
+
import fs from 'node:fs';
|
|
5
|
+
import path from 'node:path';
|
|
6
|
+
import { fileURLToPath } from 'node:url';
|
|
7
|
+
import { z } from 'zod';
|
|
8
|
+
import pkg from '../package.json' with { type: 'json' };
|
|
9
|
+
import { postMetric } from './analytics.js';
|
|
10
|
+
const __dirname = path.dirname(fileURLToPath(import.meta.url));
|
|
11
|
+
const DOCS_PATH = path.join(__dirname, '../mcp-docs');
|
|
12
|
+
const log = function () {
|
|
13
|
+
for (var _len = arguments.length, message = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
14
|
+
message[_key] = arguments[_key];
|
|
15
|
+
}
|
|
16
|
+
// Using console.error to prevent conflicts with the mcp server which uses stdio to communicate with the client
|
|
17
|
+
console.error('[CDS MCP]', ...message);
|
|
18
|
+
};
|
|
19
|
+
const fetchRoute = route => {
|
|
20
|
+
const filePath = path.join(DOCS_PATH, route);
|
|
21
|
+
try {
|
|
22
|
+
return fs.readFileSync(filePath, 'utf-8');
|
|
23
|
+
} catch (_unused) {
|
|
24
|
+
return null;
|
|
25
|
+
}
|
|
26
|
+
};
|
|
27
|
+
const server = new McpServer({
|
|
28
|
+
name: 'cds',
|
|
29
|
+
version: pkg.version,
|
|
30
|
+
capabilities: {
|
|
31
|
+
resources: {},
|
|
32
|
+
tools: {}
|
|
33
|
+
}
|
|
34
|
+
});
|
|
35
|
+
server.tool('list-cds-routes', 'get all cds doc routes', {
|
|
36
|
+
platform: z.enum(['web', 'mobile']).describe("The CDS package to use for a specific platform. For a browser app this would be 'web' and for a React Native app this would be 'mobile'")
|
|
37
|
+
}, _ref => {
|
|
38
|
+
let {
|
|
39
|
+
platform
|
|
40
|
+
} = _ref;
|
|
41
|
+
postMetric('cdsMcp', {
|
|
42
|
+
command: 'list-cds-routes'
|
|
43
|
+
});
|
|
44
|
+
const content = fetchRoute(path.join(platform, 'routes.txt'));
|
|
45
|
+
if (!content) {
|
|
46
|
+
return {
|
|
47
|
+
content: [{
|
|
48
|
+
type: 'text',
|
|
49
|
+
text: 'Error: No routes found'
|
|
50
|
+
}],
|
|
51
|
+
isError: true
|
|
52
|
+
};
|
|
53
|
+
}
|
|
54
|
+
return {
|
|
55
|
+
content: [{
|
|
56
|
+
type: 'text',
|
|
57
|
+
text: content
|
|
58
|
+
}]
|
|
59
|
+
};
|
|
60
|
+
});
|
|
61
|
+
server.tool('get-cds-doc', 'get a specific cds doc route based on the routes available from list-routes', {
|
|
62
|
+
route: z.string().describe('The route to the CDS docs. The path should always have a <platform>/<route> format and end in .txt')
|
|
63
|
+
}, _ref2 => {
|
|
64
|
+
let {
|
|
65
|
+
route
|
|
66
|
+
} = _ref2;
|
|
67
|
+
postMetric('cdsMcp', {
|
|
68
|
+
command: 'get-cds-doc',
|
|
69
|
+
arguments: route
|
|
70
|
+
});
|
|
71
|
+
const content = fetchRoute(route);
|
|
72
|
+
if (!content) {
|
|
73
|
+
return {
|
|
74
|
+
content: [{
|
|
75
|
+
type: 'text',
|
|
76
|
+
text: "Error: route ".concat(route, " not found")
|
|
77
|
+
}],
|
|
78
|
+
isError: true
|
|
79
|
+
};
|
|
80
|
+
}
|
|
81
|
+
return {
|
|
82
|
+
content: [{
|
|
83
|
+
type: 'text',
|
|
84
|
+
text: content
|
|
85
|
+
}]
|
|
86
|
+
};
|
|
87
|
+
});
|
|
88
|
+
const transport = new StdioServerTransport();
|
|
89
|
+
log("\uD83D\uDE80 Starting MCP Server version ".concat(pkg.version));
|
|
90
|
+
|
|
91
|
+
// Track server initialization
|
|
92
|
+
postMetric('cdsMcp', {
|
|
93
|
+
command: 'init'
|
|
94
|
+
});
|
|
95
|
+
await server.connect(transport);
|
package/esm/setup.js
ADDED
|
@@ -0,0 +1,135 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
3
|
+
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
4
|
+
function _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; }
|
|
5
|
+
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == typeof i ? i : i + ""; }
|
|
6
|
+
function _toPrimitive(t, r) { if ("object" != typeof t || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != typeof i) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
|
7
|
+
import { select } from '@inquirer/prompts';
|
|
8
|
+
import { execSync } from 'node:child_process';
|
|
9
|
+
import fs from 'node:fs';
|
|
10
|
+
import path from 'node:path';
|
|
11
|
+
import { fileURLToPath } from 'node:url';
|
|
12
|
+
import util from 'node:util';
|
|
13
|
+
const __filename = fileURLToPath(import.meta.url);
|
|
14
|
+
const __dirname = path.dirname(__filename);
|
|
15
|
+
const agentOptions = [{
|
|
16
|
+
name: 'Claude',
|
|
17
|
+
value: 'claude',
|
|
18
|
+
directory: '.claude'
|
|
19
|
+
}, {
|
|
20
|
+
name: 'Cursor',
|
|
21
|
+
value: 'cursor',
|
|
22
|
+
directory: '.cursor'
|
|
23
|
+
}];
|
|
24
|
+
const {
|
|
25
|
+
values: args
|
|
26
|
+
} = util.parseArgs({
|
|
27
|
+
strict: true,
|
|
28
|
+
options: {
|
|
29
|
+
agent: {
|
|
30
|
+
type: 'string',
|
|
31
|
+
multiple: true,
|
|
32
|
+
default: []
|
|
33
|
+
},
|
|
34
|
+
noTelemetry: {
|
|
35
|
+
type: 'boolean',
|
|
36
|
+
default: false
|
|
37
|
+
},
|
|
38
|
+
help: {
|
|
39
|
+
type: 'boolean',
|
|
40
|
+
default: false
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
});
|
|
44
|
+
if (args.help) {
|
|
45
|
+
console.log('Usage: cds-mcp-setup [--agent <agentName>]');
|
|
46
|
+
console.log('Options:');
|
|
47
|
+
console.log(' --agent <agentName> - The agent to install the MCP server for, can be a comma-separated list', ' --no-telemetry - Disable telemetry');
|
|
48
|
+
console.log(' --help - Show this help message');
|
|
49
|
+
process.exit(0);
|
|
50
|
+
}
|
|
51
|
+
const selectedAgents = args.agent;
|
|
52
|
+
if (selectedAgents.length === 0) {
|
|
53
|
+
const agentValue = await select({
|
|
54
|
+
message: 'Which agent would you like to install the MCP server for?',
|
|
55
|
+
choices: agentOptions
|
|
56
|
+
});
|
|
57
|
+
selectedAgents.push(agentValue);
|
|
58
|
+
}
|
|
59
|
+
const findRepoRoot = startPath => {
|
|
60
|
+
try {
|
|
61
|
+
const gitRoot = execSync('git rev-parse --show-toplevel', {
|
|
62
|
+
cwd: startPath,
|
|
63
|
+
encoding: 'utf8',
|
|
64
|
+
stdio: ['ignore', 'pipe', 'ignore']
|
|
65
|
+
}).trim();
|
|
66
|
+
return gitRoot;
|
|
67
|
+
} catch (_unused) {
|
|
68
|
+
throw new Error('Could not find repo root');
|
|
69
|
+
}
|
|
70
|
+
};
|
|
71
|
+
const installRules = agentRoot => {
|
|
72
|
+
try {
|
|
73
|
+
const sourceFile = path.join(__dirname, 'cds.mdc');
|
|
74
|
+
const outputDirectory = path.join(agentRoot, 'rules');
|
|
75
|
+
const outputFile = path.join(outputDirectory, 'cds.mdc');
|
|
76
|
+
if (!fs.existsSync(outputDirectory)) fs.mkdirSync(outputDirectory, {
|
|
77
|
+
recursive: true
|
|
78
|
+
});
|
|
79
|
+
fs.cpSync(sourceFile, outputFile);
|
|
80
|
+
console.log("\u2705 Copied CDS rules to ".concat(outputFile));
|
|
81
|
+
} catch (error) {
|
|
82
|
+
console.error('❌ Failed to copy CDS rules:', error instanceof Error ? error.message : String(error));
|
|
83
|
+
}
|
|
84
|
+
};
|
|
85
|
+
const installMcpServer = (repoRoot, cursorRoot) => {
|
|
86
|
+
const mcpServerConfigPath = path.join(cursorRoot, 'mcp.json');
|
|
87
|
+
let newMcpServerConfig = {
|
|
88
|
+
mcpServers: {}
|
|
89
|
+
};
|
|
90
|
+
|
|
91
|
+
// When executing with npx, this is the root path
|
|
92
|
+
let workspaceRoot = process.env.npm_config_local_prefix;
|
|
93
|
+
if (!workspaceRoot) {
|
|
94
|
+
workspaceRoot = repoRoot;
|
|
95
|
+
console.warn('WARNING: Using repo root as workspace root because the command was run from npx');
|
|
96
|
+
}
|
|
97
|
+
const relativeWorkspaceRoot = path.relative(repoRoot, workspaceRoot);
|
|
98
|
+
const prefix = relativeWorkspaceRoot === '' ? '.' : "./".concat(relativeWorkspaceRoot);
|
|
99
|
+
|
|
100
|
+
// --prefix is needed because Cursor runs the server from "/" instead of the workspace root.
|
|
101
|
+
const mcpServerArgs = ['--prefix', prefix, '-y', '@coinbase/cds-mcp-server'];
|
|
102
|
+
if (args.noTelemetry) mcpServerArgs.unshift('DISABLE_CDS_MCP_TELEMETRY=1');
|
|
103
|
+
const cdsMcpServerConfig = {
|
|
104
|
+
cds: {
|
|
105
|
+
command: 'npx',
|
|
106
|
+
args: mcpServerArgs
|
|
107
|
+
}
|
|
108
|
+
};
|
|
109
|
+
try {
|
|
110
|
+
const currentMcpServerConfig = JSON.parse(fs.readFileSync(mcpServerConfigPath, 'utf8'));
|
|
111
|
+
newMcpServerConfig = _objectSpread(_objectSpread({}, currentMcpServerConfig), {}, {
|
|
112
|
+
mcpServers: _objectSpread(_objectSpread({}, currentMcpServerConfig.mcpServers), cdsMcpServerConfig)
|
|
113
|
+
});
|
|
114
|
+
} catch (_unused2) {
|
|
115
|
+
newMcpServerConfig = {
|
|
116
|
+
mcpServers: cdsMcpServerConfig
|
|
117
|
+
};
|
|
118
|
+
}
|
|
119
|
+
fs.writeFileSync(mcpServerConfigPath, JSON.stringify(newMcpServerConfig, null, 2));
|
|
120
|
+
console.log("\u2705 Updated MCP server config in ".concat(mcpServerConfigPath));
|
|
121
|
+
};
|
|
122
|
+
for (const agentValue of selectedAgents) {
|
|
123
|
+
const agent = agentOptions.find(agent => agent.value === agentValue);
|
|
124
|
+
if (!agent) {
|
|
125
|
+
console.error("\u274C Invalid agent selected: ".concat(agentValue));
|
|
126
|
+
process.exit(1);
|
|
127
|
+
}
|
|
128
|
+
console.log("\u2705 Installing MCP server for ".concat(agent.name));
|
|
129
|
+
console.log('We collect anonymous usage data to improve the CDS MCP server.');
|
|
130
|
+
console.log('You can opt out by running setup with the --no-telemetry flag.');
|
|
131
|
+
const repoRoot = findRepoRoot(process.cwd());
|
|
132
|
+
const agentRoot = path.join(repoRoot, agent.directory);
|
|
133
|
+
installRules(agentRoot);
|
|
134
|
+
installMcpServer(repoRoot, agentRoot);
|
|
135
|
+
}
|
package/package.json
CHANGED
|
@@ -1,8 +1,47 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@coinbase/cds-mcp-server",
|
|
3
|
-
"version": "
|
|
4
|
-
"description": "
|
|
5
|
-
"
|
|
6
|
-
|
|
7
|
-
|
|
3
|
+
"version": "8.13.1",
|
|
4
|
+
"description": "Coinbase Design System - MCP Server",
|
|
5
|
+
"repository": {
|
|
6
|
+
"type": "git",
|
|
7
|
+
"url": "git@github.com:coinbase/cds-staging.git",
|
|
8
|
+
"directory": "packages/mcp-server"
|
|
9
|
+
},
|
|
10
|
+
"type": "module",
|
|
11
|
+
"bin": {
|
|
12
|
+
"cds-mcp": "./esm/server.js",
|
|
13
|
+
"cds-mcp-server": "./esm/server.js",
|
|
14
|
+
"cds-mcp-setup": "./esm/setup.js"
|
|
15
|
+
},
|
|
16
|
+
"main": "./esm/index.js",
|
|
17
|
+
"types": "./dts/index.d.ts",
|
|
18
|
+
"exports": {
|
|
19
|
+
"./package.json": "./package.json",
|
|
20
|
+
"./*": {
|
|
21
|
+
"types": "./dts/*.d.ts",
|
|
22
|
+
"default": "./esm/*.js"
|
|
23
|
+
}
|
|
24
|
+
},
|
|
25
|
+
"sideEffects": false,
|
|
26
|
+
"files": [
|
|
27
|
+
"dts",
|
|
28
|
+
"esm",
|
|
29
|
+
"mcp-docs",
|
|
30
|
+
"CHANGELOG"
|
|
31
|
+
],
|
|
32
|
+
"peerDependencies": {
|
|
33
|
+
"react": "^18.3.1",
|
|
34
|
+
"react-dom": "^18.3.1"
|
|
35
|
+
},
|
|
36
|
+
"dependencies": {
|
|
37
|
+
"@inquirer/prompts": "^7.5.3",
|
|
38
|
+
"@modelcontextprotocol/sdk": "^1.13.1",
|
|
39
|
+
"zod": "^3.23.8"
|
|
40
|
+
},
|
|
41
|
+
"devDependencies": {
|
|
42
|
+
"@babel/core": "^7.28.0",
|
|
43
|
+
"@babel/preset-env": "^7.28.0",
|
|
44
|
+
"@babel/preset-react": "^7.27.1",
|
|
45
|
+
"@babel/preset-typescript": "^7.27.1"
|
|
46
|
+
}
|
|
8
47
|
}
|
package/index.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
console.log("Temporary package");
|