@baseline-ui/mcp 1.2.0 → 2.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/CHANGELOG.md +8 -0
- package/README.md +21 -4
- package/dist/chunk-GTOFKGAS.js +36107 -0
- package/dist/index.js +1 -34392
- package/dist/{index.cjs → server.cjs} +2076 -362
- package/dist/server.d.cts +5 -0
- package/dist/server.d.ts +5 -0
- package/dist/server.js +1 -0
- package/package.json +15 -2
- package/sbom.json +65 -65
- package/dist/index.d.cts +0 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,13 @@
|
|
|
1
1
|
# @baseline-ui/mcp
|
|
2
2
|
|
|
3
|
+
## 2.1.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- 2c12e10: **MCP**: Adds a `./server` export exposing `createServer()` so hosts can run the server in-process instead of spawning the stdio bin — importing it starts no transport and touches no stdio. The new `exports` map means deep paths like `@baseline-ui/mcp/dist/index.js` no longer resolve; `bin` is unaffected.
|
|
8
|
+
|
|
9
|
+
## 2.0.0
|
|
10
|
+
|
|
3
11
|
## 1.2.0
|
|
4
12
|
|
|
5
13
|
## 1.1.0
|
package/README.md
CHANGED
|
@@ -10,7 +10,26 @@ This package provides a Model Context Protocol (MCP) server that exposes Baselin
|
|
|
10
10
|
|
|
11
11
|
## Architecture
|
|
12
12
|
|
|
13
|
-
The server uses a build-time process to extract metadata from components, icons, and design tokens. The server implementation
|
|
13
|
+
The server uses a build-time process to extract metadata from components, icons, and design tokens; all of it is inlined into the bundle at build, so nothing is read from disk at runtime. The server implementation (`src/server.ts`) is transport-agnostic; the published `bin` (`src/index.ts`) wires it to stdio.
|
|
14
|
+
|
|
15
|
+
## Running In-Process
|
|
16
|
+
|
|
17
|
+
Hosts can run the server inside their own Node process instead of spawning the stdio bin, via the `./server` export:
|
|
18
|
+
|
|
19
|
+
```ts
|
|
20
|
+
import { createServer } from "@baseline-ui/mcp/server";
|
|
21
|
+
import { Client } from "@modelcontextprotocol/sdk/client/index.js";
|
|
22
|
+
import { InMemoryTransport } from "@modelcontextprotocol/sdk/inMemory.js";
|
|
23
|
+
|
|
24
|
+
const server = createServer();
|
|
25
|
+
const [clientTransport, serverTransport] = InMemoryTransport.createLinkedPair();
|
|
26
|
+
await server.connect(serverTransport);
|
|
27
|
+
|
|
28
|
+
const client = new Client({ name: "my-host", version: "1.0.0" });
|
|
29
|
+
await client.connect(clientTransport);
|
|
30
|
+
```
|
|
31
|
+
|
|
32
|
+
All documentation data is inlined into the bundle at build time — the package reads no files at runtime, so it is safe to bundle or trace in any deployment (unlike MCP packages that resolve data from their package directory).
|
|
14
33
|
|
|
15
34
|
## Development
|
|
16
35
|
|
|
@@ -48,10 +67,8 @@ The package is published to npm as `@baseline-ui/mcp`. See `package.json` for pu
|
|
|
48
67
|
|
|
49
68
|
## Performance Considerations
|
|
50
69
|
|
|
51
|
-
- **Pre-built Data** - All metadata generated at build time
|
|
52
|
-
- **Lazy Loading** - Documentation read on-demand
|
|
70
|
+
- **Pre-built Data** - All metadata generated at build time and inlined into the bundle
|
|
53
71
|
- **Efficient Search** - Simple string matching for icons
|
|
54
|
-
- **Caching** - React Aria Components data cached after first load
|
|
55
72
|
|
|
56
73
|
## Troubleshooting
|
|
57
74
|
|