@runsnative/mcp-server 0.1.3 → 0.1.5
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 +10 -10
- package/dist/index.js +8 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -2,11 +2,11 @@
|
|
|
2
2
|
|
|
3
3
|
RunsNative MCP server — gives any MCP-capable agent access to RunsNative component docs, foundations, design exercises, and theme inference.
|
|
4
4
|
|
|
5
|
-
Docs content
|
|
5
|
+
Docs content comes from the RunsNative cloud content API by default — no clone or configuration required, and content updates propagate without reinstalling. Developers working in the [runsnative repo](https://github.com/KUKAMANGA-ENTERPRISES/runsnative) can set `RUNSNATIVE_CONTENT_ROOT` to serve from a local checkout instead.
|
|
6
6
|
|
|
7
7
|
## Quick install
|
|
8
8
|
|
|
9
|
-
Add one block to your MCP client config
|
|
9
|
+
Add one block to your MCP client config. No environment configuration is needed.
|
|
10
10
|
|
|
11
11
|
### Claude Desktop
|
|
12
12
|
|
|
@@ -18,10 +18,7 @@ Add one block to your MCP client config, pointing `RUNSNATIVE_CONTENT_ROOT` at t
|
|
|
18
18
|
"mcpServers": {
|
|
19
19
|
"runsnative": {
|
|
20
20
|
"command": "npx",
|
|
21
|
-
"args": ["-y", "@runsnative/mcp-server"]
|
|
22
|
-
"env": {
|
|
23
|
-
"RUNSNATIVE_CONTENT_ROOT": "/path/to/runsnative/content"
|
|
24
|
-
}
|
|
21
|
+
"args": ["-y", "@runsnative/mcp-server"]
|
|
25
22
|
}
|
|
26
23
|
}
|
|
27
24
|
}
|
|
@@ -36,15 +33,18 @@ Add `.mcp.json` to your project root:
|
|
|
36
33
|
"mcpServers": {
|
|
37
34
|
"runsnative": {
|
|
38
35
|
"command": "npx",
|
|
39
|
-
"args": ["-y", "@runsnative/mcp-server"]
|
|
40
|
-
"env": {
|
|
41
|
-
"RUNSNATIVE_CONTENT_ROOT": "/path/to/runsnative/content"
|
|
42
|
-
}
|
|
36
|
+
"args": ["-y", "@runsnative/mcp-server"]
|
|
43
37
|
}
|
|
44
38
|
}
|
|
45
39
|
}
|
|
46
40
|
```
|
|
47
41
|
|
|
42
|
+
To serve from a local checkout instead of the cloud API, add an `env` block:
|
|
43
|
+
|
|
44
|
+
```json
|
|
45
|
+
"env": { "RUNSNATIVE_CONTENT_ROOT": "/path/to/runsnative/content" }
|
|
46
|
+
```
|
|
47
|
+
|
|
48
48
|
## Authoring skill
|
|
49
49
|
|
|
50
50
|
Once the MCP server is connected, load the RunsNative authoring skill to give your agent full component-authoring guidance. The skill is served at:
|
package/dist/index.js
CHANGED
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
import { createRequire } from 'node:module';
|
|
1
3
|
import { Server } from '@modelcontextprotocol/sdk/server/index.js';
|
|
2
4
|
import { StdioServerTransport } from '@modelcontextprotocol/sdk/server/stdio.js';
|
|
3
5
|
import { CallToolRequestSchema, ListToolsRequestSchema, } from '@modelcontextprotocol/sdk/types.js';
|
|
@@ -21,7 +23,12 @@ const provider = await createProvider();
|
|
|
21
23
|
if (provider instanceof RemoteContentProvider) {
|
|
22
24
|
await provider.initialize();
|
|
23
25
|
}
|
|
24
|
-
|
|
26
|
+
// Advertised version reads package.json at runtime — a literal here drifts
|
|
27
|
+
// the moment the next release forgets to update it (0.3.0 survived four
|
|
28
|
+
// releases; 0.1.4 outlived its release within hours).
|
|
29
|
+
const require = createRequire(import.meta.url);
|
|
30
|
+
const { version: pkgVersion } = require('../package.json');
|
|
31
|
+
const server = new Server({ name: 'runsnative-mcp', version: pkgVersion }, { capabilities: { tools: {} } });
|
|
25
32
|
server.setRequestHandler(ListToolsRequestSchema, async () => ({
|
|
26
33
|
tools: [
|
|
27
34
|
GET_COMPONENT_TOOL,
|