@simulacra-ai/mcp 0.0.1 → 0.0.3

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 (2) hide show
  1. package/README.md +10 -8
  2. package/package.json +14 -2
package/README.md CHANGED
@@ -1,6 +1,6 @@
1
1
  # Simulacra MCP Bridge
2
2
 
3
- MCP (Model Context Protocol) client bridge for the Simulacra conversation engine. Connects to MCP servers and exposes their tools as Simulacra tool classes.
3
+ The MCP (Model Context Protocol) bridge connects Simulacra to MCP tool servers and exposes their tools as Simulacra tool classes, so the model can use them without writing custom tool implementations.
4
4
 
5
5
  ## Installation
6
6
 
@@ -12,10 +12,9 @@ npm install @simulacra-ai/core @simulacra-ai/mcp @modelcontextprotocol/sdk
12
12
 
13
13
  ```typescript
14
14
  import { Conversation, WorkflowManager } from "@simulacra-ai/core";
15
- import { AnthropicProvider } from "@simulacra-ai/anthropic";
16
- import Anthropic from "@anthropic-ai/sdk";
17
15
  import { McpToolProvider } from "@simulacra-ai/mcp";
18
16
 
17
+ // connect to an MCP server
19
18
  const mcp = new McpToolProvider({
20
19
  servers: [
21
20
  {
@@ -25,21 +24,23 @@ const mcp = new McpToolProvider({
25
24
  },
26
25
  ],
27
26
  });
28
-
29
27
  await mcp.connect();
30
28
 
31
- const provider = new AnthropicProvider(new Anthropic(), { model: MODEL_NAME });
32
- const conversation = new Conversation(provider);
29
+ // add MCP tools to the conversation's toolkit
30
+ using conversation = new Conversation(provider);
33
31
  conversation.toolkit = [...conversation.toolkit, ...mcp.getToolClasses()];
34
- const manager = new WorkflowManager(conversation);
32
+ using manager = new WorkflowManager(conversation);
35
33
 
36
34
  await conversation.prompt("List the files in /tmp");
37
35
 
36
+ // disconnect when done
38
37
  await mcp.disconnect();
39
38
  ```
40
39
 
41
40
  ### Multiple Servers
42
41
 
42
+ Multiple MCP servers can be configured at once. Tools from all servers are merged into a single toolkit.
43
+
43
44
  ```typescript
44
45
  const mcp = new McpToolProvider({
45
46
  servers: [
@@ -60,9 +61,10 @@ const mcp = new McpToolProvider({
60
61
 
61
62
  ### Tool Overrides
62
63
 
63
- By default, all MCP tools are `parallelizable: true`. Override specific tools with side effects or ordering requirements:
64
+ By default, all MCP tools are `parallelizable: true`. Specific tools with side effects or ordering requirements can be overridden.
64
65
 
65
66
  ```typescript
67
+ // inside the servers array
66
68
  {
67
69
  name: "database",
68
70
  command: "node",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@simulacra-ai/mcp",
3
- "version": "0.0.1",
3
+ "version": "0.0.3",
4
4
  "description": "MCP (Model Context Protocol) client bridge for the Simulacra conversation engine",
5
5
  "type": "module",
6
6
  "exports": {
@@ -17,8 +17,20 @@
17
17
  "clean": "rm -rf dist *.tsbuildinfo"
18
18
  },
19
19
  "peerDependencies": {
20
- "@simulacra-ai/core": "0.0.1",
20
+ "@simulacra-ai/core": "0.0.3",
21
21
  "@modelcontextprotocol/sdk": ">=1.0.0"
22
22
  },
23
+ "repository": {
24
+ "type": "git",
25
+ "url": "https://github.com/simulacra-ai/simulacra.git",
26
+ "directory": "packages/mcp"
27
+ },
28
+ "homepage": "https://github.com/simulacra-ai/simulacra",
29
+ "keywords": [
30
+ "ai",
31
+ "llm",
32
+ "mcp",
33
+ "model-context-protocol"
34
+ ],
23
35
  "license": "MIT"
24
36
  }