@rlx-ui/mcp 0.0.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.
Files changed (3) hide show
  1. package/README.md +46 -0
  2. package/dist/cli.js +86 -0
  3. package/package.json +20 -0
package/README.md ADDED
@@ -0,0 +1,46 @@
1
+ # @rlx-ui/mcp
2
+
3
+ MCP (Model Context Protocol) Server for RLX UI components.
4
+
5
+ ## Installation
6
+
7
+ ```bash
8
+ npm install -g @rlx-ui/mcp
9
+ ```
10
+
11
+ ## Usage
12
+
13
+ ### Via npx (recommended)
14
+
15
+ ```bash
16
+ npx @rlx-ui/mcp
17
+ ```
18
+
19
+ ### After global installation
20
+
21
+ ```bash
22
+ rlx-mcp
23
+ ```
24
+
25
+ ## Building
26
+
27
+ Run `nx build @rlx-ui/mcp` to build the library.
28
+
29
+ ## Running unit tests
30
+
31
+ Run `nx test @rlx-ui/mcp` to execute the unit tests via [Jest](https://jestjs.io).
32
+
33
+ ## Features
34
+
35
+ This MCP server provides:
36
+
37
+ - **Tools**:
38
+ - `greet` - A simple greeting tool
39
+ - `get_info` - Get information about the RLX UI MCP server
40
+
41
+ - **Resources**:
42
+ - `rlx-ui://info` - General information about RLX UI
43
+
44
+ ## Development
45
+
46
+ This library was generated with [Nx](https://nx.dev).
package/dist/cli.js ADDED
@@ -0,0 +1,86 @@
1
+ import { McpServer as n } from "@modelcontextprotocol/sdk/server/mcp.js";
2
+ import { StdioServerTransport as o } from "@modelcontextprotocol/sdk/server/stdio.js";
3
+ import { z as i } from "zod";
4
+ async function s() {
5
+ const e = new n(
6
+ {
7
+ name: "@rlx-ui/mcp",
8
+ version: "0.0.1"
9
+ },
10
+ {
11
+ capabilities: {
12
+ tools: {},
13
+ resources: {}
14
+ }
15
+ }
16
+ );
17
+ e.registerTool(
18
+ "greet",
19
+ {
20
+ description: "A simple greeting tool that returns a welcome message",
21
+ inputSchema: {
22
+ name: i.string().describe("The name to greet")
23
+ }
24
+ },
25
+ async (t) => ({
26
+ content: [
27
+ {
28
+ type: "text",
29
+ text: `Hello, ${t.name}! Welcome to RLX UI MCP Server.`
30
+ }
31
+ ]
32
+ })
33
+ ), e.registerTool(
34
+ "get_info",
35
+ {
36
+ description: "Get information about the RLX UI MCP server"
37
+ },
38
+ async () => ({
39
+ content: [
40
+ {
41
+ type: "text",
42
+ text: JSON.stringify(
43
+ {
44
+ name: "@rlx-ui/mcp",
45
+ version: "0.0.1",
46
+ description: "MCP Server for RLX UI components and utilities",
47
+ capabilities: ["tools", "resources"]
48
+ },
49
+ null,
50
+ 2
51
+ )
52
+ }
53
+ ]
54
+ })
55
+ ), e.registerResource(
56
+ "RLX UI Information",
57
+ "rlx-ui://info",
58
+ {
59
+ description: "General information about RLX UI",
60
+ mimeType: "application/json"
61
+ },
62
+ async () => ({
63
+ contents: [
64
+ {
65
+ uri: "rlx-ui://info",
66
+ mimeType: "application/json",
67
+ text: JSON.stringify(
68
+ {
69
+ name: "RLX UI",
70
+ description: "A UI component library",
71
+ version: "0.0.1",
72
+ mcpServer: "@rlx-ui/mcp"
73
+ },
74
+ null,
75
+ 2
76
+ )
77
+ }
78
+ ]
79
+ })
80
+ );
81
+ const r = new o();
82
+ await e.connect(r), console.error("RLX UI MCP Server running on stdio");
83
+ }
84
+ s().catch((e) => {
85
+ console.error("Fatal error in main():", e), process.exit(1);
86
+ });
package/package.json ADDED
@@ -0,0 +1,20 @@
1
+ {
2
+ "name": "@rlx-ui/mcp",
3
+ "version": "0.0.1",
4
+ "description": "MCP (Model Context Protocol) Server for RLX UI components",
5
+ "publishConfig": {
6
+ "access": "public"
7
+ },
8
+ "type": "module",
9
+ "bin": {
10
+ "rlx-mcp": "./dist/cli.js"
11
+ },
12
+ "files": [
13
+ "dist",
14
+ "!**/*.tsbuildinfo"
15
+ ],
16
+ "dependencies": {
17
+ "@modelcontextprotocol/sdk": "^1.0.0",
18
+ "zod": "^3.23.8"
19
+ }
20
+ }