@elsium-ai/mcp 0.1.6 → 0.2.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 +42 -0
- package/dist/index.js +2 -3
- package/package.json +2 -3
package/README.md
ADDED
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
# @elsium-ai/mcp
|
|
2
|
+
|
|
3
|
+
Model Context Protocol (MCP) support for [ElsiumAI](https://github.com/elsium-ai/elsium-ai) — bidirectional client and server bridge.
|
|
4
|
+
|
|
5
|
+
[](https://www.npmjs.com/package/@elsium-ai/mcp)
|
|
6
|
+
[](https://github.com/elsium-ai/elsium-ai/blob/main/LICENSE)
|
|
7
|
+
|
|
8
|
+
## Install
|
|
9
|
+
|
|
10
|
+
```bash
|
|
11
|
+
npm install @elsium-ai/mcp @elsium-ai/core
|
|
12
|
+
```
|
|
13
|
+
|
|
14
|
+
## What's Inside
|
|
15
|
+
|
|
16
|
+
- **MCP Client** — Connect to external MCP servers and use their tools
|
|
17
|
+
- **MCP Server** — Expose ElsiumAI tools and resources via MCP protocol
|
|
18
|
+
- **Bidirectional Bridge** — Full duplex communication between client and server
|
|
19
|
+
|
|
20
|
+
## Usage
|
|
21
|
+
|
|
22
|
+
```typescript
|
|
23
|
+
import { createMCPClient, createMCPServer } from '@elsium-ai/mcp'
|
|
24
|
+
|
|
25
|
+
// Client — connect to an MCP server
|
|
26
|
+
const client = createMCPClient({ url: 'http://localhost:3001/mcp' })
|
|
27
|
+
const tools = await client.listTools()
|
|
28
|
+
|
|
29
|
+
// Server — expose tools via MCP
|
|
30
|
+
const server = createMCPServer({
|
|
31
|
+
tools: myToolkit.tools,
|
|
32
|
+
resources: myResources,
|
|
33
|
+
})
|
|
34
|
+
```
|
|
35
|
+
|
|
36
|
+
## Part of ElsiumAI
|
|
37
|
+
|
|
38
|
+
This package is the MCP layer of the [ElsiumAI](https://github.com/elsium-ai/elsium-ai) framework. See the [full documentation](https://github.com/elsium-ai/elsium-ai) for guides and examples.
|
|
39
|
+
|
|
40
|
+
## License
|
|
41
|
+
|
|
42
|
+
[MIT](https://github.com/elsium-ai/elsium-ai/blob/main/LICENSE)
|
package/dist/index.js
CHANGED
|
@@ -1,6 +1,5 @@
|
|
|
1
|
-
// @bun
|
|
2
1
|
// src/client.ts
|
|
3
|
-
import { spawn } from "child_process";
|
|
2
|
+
import { spawn } from "node:child_process";
|
|
4
3
|
|
|
5
4
|
// ../core/src/errors.ts
|
|
6
5
|
class ElsiumError extends Error {
|
|
@@ -92,7 +91,7 @@ class ElsiumError extends Error {
|
|
|
92
91
|
}
|
|
93
92
|
}
|
|
94
93
|
// ../core/src/utils.ts
|
|
95
|
-
import { randomBytes } from "crypto";
|
|
94
|
+
import { randomBytes } from "node:crypto";
|
|
96
95
|
function cryptoHex(bytes) {
|
|
97
96
|
return randomBytes(bytes).toString("hex");
|
|
98
97
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@elsium-ai/mcp",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.2.0",
|
|
4
4
|
"description": "Model Context Protocol (MCP) support for ElsiumAI — bidirectional bridge",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"author": "Eric Utrera <ebutrera9103@gmail.com>",
|
|
@@ -22,7 +22,7 @@
|
|
|
22
22
|
"dist"
|
|
23
23
|
],
|
|
24
24
|
"scripts": {
|
|
25
|
-
"build": "bun build ./src/index.ts --outdir ./dist --target
|
|
25
|
+
"build": "bun build ./src/index.ts --outdir ./dist --target node && bun x tsc -p tsconfig.build.json --emitDeclarationOnly",
|
|
26
26
|
"dev": "bun --watch src/index.ts"
|
|
27
27
|
},
|
|
28
28
|
"dependencies": {
|
|
@@ -30,7 +30,6 @@
|
|
|
30
30
|
"@elsium-ai/tools": "workspace:*"
|
|
31
31
|
},
|
|
32
32
|
"devDependencies": {
|
|
33
|
-
"bun-types": "^1.3.0",
|
|
34
33
|
"typescript": "^5.7.0"
|
|
35
34
|
}
|
|
36
35
|
}
|