@preply/ds-ai-mcp 11.1.0
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 +50 -0
- package/dist/__tests__/create-server.test.d.ts +2 -0
- package/dist/__tests__/create-server.test.d.ts.map +1 -0
- package/dist/bin.d.ts +2 -0
- package/dist/bin.d.ts.map +1 -0
- package/dist/bin.js +12 -0
- package/dist/create-server-LzOTK9vc.js +38142 -0
- package/dist/create-server.d.ts +3 -0
- package/dist/create-server.d.ts.map +1 -0
- package/dist/index.d.ts +2 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +2 -0
- package/package.json +34 -0
- package/src/__tests__/create-server.test.ts +60 -0
- package/src/bin.ts +23 -0
- package/src/create-server.ts +50 -0
- package/src/index.ts +1 -0
- package/tsconfig.json +11 -0
- package/vite.config.ts +19 -0
package/README.md
ADDED
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
# `@preply/ds-ai-mcp`
|
|
2
|
+
|
|
3
|
+
> MCP server for the Preply Design System.
|
|
4
|
+
|
|
5
|
+
Exposes all AI tools from [`@preply/ds-ai-core`](../ai-core/README.md) over the [Model Context Protocol](https://modelcontextprotocol.io/) (stdio transport), so MCP-compatible clients (Cursor, Claude Desktop, etc.) can query DS icons, tokens, and component docs.
|
|
6
|
+
|
|
7
|
+
## Usage
|
|
8
|
+
|
|
9
|
+
### As a standalone server
|
|
10
|
+
|
|
11
|
+
```bash
|
|
12
|
+
ds-mcp start
|
|
13
|
+
```
|
|
14
|
+
|
|
15
|
+
### Programmatic
|
|
16
|
+
|
|
17
|
+
```typescript
|
|
18
|
+
import { createServer } from '@preply/ds-ai-mcp';
|
|
19
|
+
import { StdioServerTransport } from '@modelcontextprotocol/sdk/server/stdio.js';
|
|
20
|
+
|
|
21
|
+
const server = createServer();
|
|
22
|
+
await server.connect(new StdioServerTransport());
|
|
23
|
+
```
|
|
24
|
+
|
|
25
|
+
### MCP client configuration
|
|
26
|
+
|
|
27
|
+
```json
|
|
28
|
+
{
|
|
29
|
+
"mcpServers": {
|
|
30
|
+
"ds-mcp": {
|
|
31
|
+
"command": "npx",
|
|
32
|
+
"args": ["@preply/ds-ai-mcp", "start"]
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
```
|
|
37
|
+
|
|
38
|
+
## Tool annotations
|
|
39
|
+
|
|
40
|
+
All registered tools are annotated as read-only, idempotent, non-destructive, and closed-world — clients can safely call them in planning/preview modes.
|
|
41
|
+
|
|
42
|
+
## Development
|
|
43
|
+
|
|
44
|
+
```bash
|
|
45
|
+
yarn build # Build the package
|
|
46
|
+
yarn dev # Build in watch mode
|
|
47
|
+
yarn dev:inspector # Launch with MCP Inspector for debugging
|
|
48
|
+
yarn check:types # Type-check
|
|
49
|
+
yarn lint # Lint
|
|
50
|
+
```
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"create-server.test.d.ts","sourceRoot":"","sources":["../../src/__tests__/create-server.test.ts"],"names":[],"mappings":""}
|
package/dist/bin.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"bin.d.ts","sourceRoot":"","sources":["../src/bin.ts"],"names":[],"mappings":""}
|
package/dist/bin.js
ADDED
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { n as package_default, t as createServer } from "./create-server-LzOTK9vc.js";
|
|
2
|
+
import { program } from "commander";
|
|
3
|
+
import { StdioServerTransport } from "@modelcontextprotocol/sdk/server/stdio.js";
|
|
4
|
+
//#region src/bin.ts
|
|
5
|
+
program.name(Object.keys(package_default.bin)[0]).description(package_default.description).version(package_default.version, "-v, --version", "Output the version number").usage("<command>");
|
|
6
|
+
program.command("start").description("Start the MCP server").action(async () => {
|
|
7
|
+
const transport = new StdioServerTransport();
|
|
8
|
+
await createServer().connect(transport);
|
|
9
|
+
});
|
|
10
|
+
program.parse();
|
|
11
|
+
//#endregion
|
|
12
|
+
export {};
|