@pacerelle/mcp-server 0.1.0-alpha.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/LICENSE +21 -0
- package/README.md +82 -0
- package/dist/bridge.d.ts +38 -0
- package/dist/bridge.js +109 -0
- package/dist/bridge.js.map +1 -0
- package/dist/cli.d.ts +2 -0
- package/dist/cli.js +93 -0
- package/dist/cli.js.map +1 -0
- package/dist/server.d.ts +4 -0
- package/dist/server.js +79 -0
- package/dist/server.js.map +1 -0
- package/package.json +31 -0
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 Pacerelle
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
ADDED
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
# Pacerelle MCP Server
|
|
2
|
+
|
|
3
|
+
MCP server for Pacerelle encrypted local agent relays.
|
|
4
|
+
|
|
5
|
+
Run it from any MCP-compatible client that can spawn a local stdio server, such
|
|
6
|
+
as Claude Desktop, Cursor, Zed, or other MCP hosts.
|
|
7
|
+
|
|
8
|
+
## Install
|
|
9
|
+
|
|
10
|
+
```bash
|
|
11
|
+
npx -y @pacerelle/mcp-server
|
|
12
|
+
```
|
|
13
|
+
|
|
14
|
+
## Configuration
|
|
15
|
+
|
|
16
|
+
Create an agent in Pacerelle, copy its id and token, then expose them to the MCP
|
|
17
|
+
process:
|
|
18
|
+
|
|
19
|
+
```env
|
|
20
|
+
PACERELLE_AGENT_ID=agent_...
|
|
21
|
+
PACERELLE_AGENT_TOKEN=...
|
|
22
|
+
```
|
|
23
|
+
|
|
24
|
+
The published package connects to `https://api.pacerelle.com` by default. For
|
|
25
|
+
local development, set:
|
|
26
|
+
|
|
27
|
+
```env
|
|
28
|
+
PACERELLE_BASE_URL=http://localhost:8080
|
|
29
|
+
```
|
|
30
|
+
|
|
31
|
+
Optional:
|
|
32
|
+
|
|
33
|
+
```env
|
|
34
|
+
PACERELLE_WS_URL=ws://localhost:8080
|
|
35
|
+
PACERELLE_STORE_ROOT=.pacerelle/mcp
|
|
36
|
+
```
|
|
37
|
+
|
|
38
|
+
## Claude Desktop Example
|
|
39
|
+
|
|
40
|
+
```json
|
|
41
|
+
{
|
|
42
|
+
"mcpServers": {
|
|
43
|
+
"pacerelle": {
|
|
44
|
+
"command": "npx",
|
|
45
|
+
"args": ["-y", "@pacerelle/mcp-server"],
|
|
46
|
+
"env": {
|
|
47
|
+
"PACERELLE_AGENT_ID": "agent_...",
|
|
48
|
+
"PACERELLE_AGENT_TOKEN": "..."
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
```
|
|
54
|
+
|
|
55
|
+
## Tools
|
|
56
|
+
|
|
57
|
+
- `send_message`: send an encrypted text reply to the current or provided conversation.
|
|
58
|
+
- `send_widget`: send a `widget.standard` v1 payload.
|
|
59
|
+
- `get_history`: return recent plaintext messages observed by this MCP process.
|
|
60
|
+
|
|
61
|
+
## Resources
|
|
62
|
+
|
|
63
|
+
- `conversation://current`: most recent conversation message seen by this process.
|
|
64
|
+
- `widget://pending`: latest widget response observed by this process.
|
|
65
|
+
|
|
66
|
+
## CLI
|
|
67
|
+
|
|
68
|
+
Environment variables are recommended, but explicit flags are supported:
|
|
69
|
+
|
|
70
|
+
```bash
|
|
71
|
+
pacerelle-mcp \
|
|
72
|
+
--agent-id "$PACERELLE_AGENT_ID" \
|
|
73
|
+
--token "$PACERELLE_AGENT_TOKEN"
|
|
74
|
+
```
|
|
75
|
+
|
|
76
|
+
Local development:
|
|
77
|
+
|
|
78
|
+
```bash
|
|
79
|
+
pacerelle-mcp \
|
|
80
|
+
--base-url "http://localhost:8080" \
|
|
81
|
+
--ws-url "ws://localhost:8080"
|
|
82
|
+
```
|
package/dist/bridge.d.ts
ADDED
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import type { AgentGatewayClient, AgentMessage } from "@pacerelle/sdk";
|
|
2
|
+
export interface MessageSender {
|
|
3
|
+
sendMessage(options: {
|
|
4
|
+
conversationId: string;
|
|
5
|
+
to: string;
|
|
6
|
+
text: string;
|
|
7
|
+
replyToMessageId?: string;
|
|
8
|
+
}): Promise<void>;
|
|
9
|
+
}
|
|
10
|
+
export declare class PacerelleMcpBridge {
|
|
11
|
+
private readonly client;
|
|
12
|
+
private readonly historyLimit;
|
|
13
|
+
private readonly messages;
|
|
14
|
+
private current;
|
|
15
|
+
private pendingWidget;
|
|
16
|
+
constructor(client: MessageSender, historyLimit?: number);
|
|
17
|
+
recordMessage(message: AgentMessage): void;
|
|
18
|
+
sendMessage(args: {
|
|
19
|
+
text: string;
|
|
20
|
+
conversationId?: string;
|
|
21
|
+
to?: string;
|
|
22
|
+
replyToMessageId?: string;
|
|
23
|
+
}): Promise<Record<string, unknown>>;
|
|
24
|
+
sendWidget(args: {
|
|
25
|
+
widgetJson: string | Record<string, unknown>;
|
|
26
|
+
conversationId?: string;
|
|
27
|
+
to?: string;
|
|
28
|
+
}): Promise<Record<string, unknown>>;
|
|
29
|
+
getHistory(args: {
|
|
30
|
+
conversationId?: string;
|
|
31
|
+
limit?: number;
|
|
32
|
+
}): Array<Record<string, unknown>>;
|
|
33
|
+
currentConversation(): Record<string, unknown>;
|
|
34
|
+
pendingWidgetResponse(): Record<string, unknown>;
|
|
35
|
+
attach(client: AgentGatewayClient): void;
|
|
36
|
+
private requireCurrent;
|
|
37
|
+
private parseWidget;
|
|
38
|
+
}
|
package/dist/bridge.js
ADDED
|
@@ -0,0 +1,109 @@
|
|
|
1
|
+
export class PacerelleMcpBridge {
|
|
2
|
+
client;
|
|
3
|
+
historyLimit;
|
|
4
|
+
messages = [];
|
|
5
|
+
current = null;
|
|
6
|
+
pendingWidget = null;
|
|
7
|
+
constructor(client, historyLimit = 50) {
|
|
8
|
+
this.client = client;
|
|
9
|
+
this.historyLimit = historyLimit;
|
|
10
|
+
}
|
|
11
|
+
recordMessage(message) {
|
|
12
|
+
const item = {
|
|
13
|
+
id: message.id,
|
|
14
|
+
conversation_id: message.conversationId,
|
|
15
|
+
from: message.from,
|
|
16
|
+
text: message.text,
|
|
17
|
+
encrypted: message.encrypted,
|
|
18
|
+
reply_to_message_id: message.replyToMessageId ?? null,
|
|
19
|
+
attachments: message.attachments ?? [],
|
|
20
|
+
widget_response: message.widgetResponse ?? null,
|
|
21
|
+
widget_update: message.widgetUpdate ?? null,
|
|
22
|
+
};
|
|
23
|
+
this.messages.push(item);
|
|
24
|
+
while (this.messages.length > this.historyLimit)
|
|
25
|
+
this.messages.shift();
|
|
26
|
+
this.current = item;
|
|
27
|
+
if (message.widgetResponse) {
|
|
28
|
+
this.pendingWidget = {
|
|
29
|
+
type: "widget.response",
|
|
30
|
+
id: message.widgetResponse.id,
|
|
31
|
+
ref: message.widgetResponse.ref,
|
|
32
|
+
value: message.widgetResponse.value,
|
|
33
|
+
cancelled: message.widgetResponse.cancelled,
|
|
34
|
+
conversation_id: message.conversationId,
|
|
35
|
+
from: message.from,
|
|
36
|
+
};
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
async sendMessage(args) {
|
|
40
|
+
const current = this.requireCurrent(args.conversationId, args.to);
|
|
41
|
+
const conversationId = args.conversationId ?? String(current.conversation_id);
|
|
42
|
+
const to = args.to ?? String(current.from);
|
|
43
|
+
await this.client.sendMessage({
|
|
44
|
+
conversationId,
|
|
45
|
+
to,
|
|
46
|
+
text: args.text,
|
|
47
|
+
replyToMessageId: args.replyToMessageId,
|
|
48
|
+
});
|
|
49
|
+
return { ok: true, conversation_id: conversationId, to };
|
|
50
|
+
}
|
|
51
|
+
async sendWidget(args) {
|
|
52
|
+
const widget = this.parseWidget(args.widgetJson);
|
|
53
|
+
const current = this.requireCurrent(args.conversationId, args.to);
|
|
54
|
+
const conversationId = args.conversationId ?? String(current.conversation_id);
|
|
55
|
+
const to = args.to ?? String(current.from);
|
|
56
|
+
await this.client.sendMessage({
|
|
57
|
+
conversationId,
|
|
58
|
+
to,
|
|
59
|
+
text: JSON.stringify(widget),
|
|
60
|
+
});
|
|
61
|
+
return {
|
|
62
|
+
ok: true,
|
|
63
|
+
widget_id: widget.id,
|
|
64
|
+
kind: widget.kind,
|
|
65
|
+
conversation_id: conversationId,
|
|
66
|
+
to,
|
|
67
|
+
};
|
|
68
|
+
}
|
|
69
|
+
getHistory(args) {
|
|
70
|
+
const limit = Math.max(1, Math.min(args.limit ?? 50, this.historyLimit));
|
|
71
|
+
const scoped = args.conversationId
|
|
72
|
+
? this.messages.filter((message) => message.conversation_id === args.conversationId)
|
|
73
|
+
: this.messages;
|
|
74
|
+
return scoped.slice(-limit);
|
|
75
|
+
}
|
|
76
|
+
currentConversation() {
|
|
77
|
+
return this.current ?? { status: "empty" };
|
|
78
|
+
}
|
|
79
|
+
pendingWidgetResponse() {
|
|
80
|
+
return this.pendingWidget ?? { status: "empty" };
|
|
81
|
+
}
|
|
82
|
+
attach(client) {
|
|
83
|
+
client.onMessage((message) => this.recordMessage(message));
|
|
84
|
+
}
|
|
85
|
+
requireCurrent(conversationId, to) {
|
|
86
|
+
if (conversationId && to)
|
|
87
|
+
return {};
|
|
88
|
+
if (this.current)
|
|
89
|
+
return this.current;
|
|
90
|
+
throw new Error("No current conversation. Wait for an inbound Pacerelle message or pass conversationId and to.");
|
|
91
|
+
}
|
|
92
|
+
parseWidget(widgetJson) {
|
|
93
|
+
const widget = typeof widgetJson === "string" ? JSON.parse(widgetJson) : widgetJson;
|
|
94
|
+
if (!widget || typeof widget !== "object" || Array.isArray(widget)) {
|
|
95
|
+
throw new Error("widgetJson must be an object");
|
|
96
|
+
}
|
|
97
|
+
if (widget.type !== "widget.standard" || widget.v !== 1) {
|
|
98
|
+
throw new Error("widgetJson must be a widget.standard v1 payload");
|
|
99
|
+
}
|
|
100
|
+
if (typeof widget.id !== "string" || typeof widget.kind !== "string") {
|
|
101
|
+
throw new Error("widgetJson requires string id and kind");
|
|
102
|
+
}
|
|
103
|
+
if (!widget.spec || typeof widget.spec !== "object" || Array.isArray(widget.spec)) {
|
|
104
|
+
throw new Error("widgetJson requires spec object");
|
|
105
|
+
}
|
|
106
|
+
return widget;
|
|
107
|
+
}
|
|
108
|
+
}
|
|
109
|
+
//# sourceMappingURL=bridge.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"bridge.js","sourceRoot":"","sources":["../src-js/bridge.ts"],"names":[],"mappings":"AAWA,MAAM,OAAO,kBAAkB;IAMV;IACA;IANF,QAAQ,GAAmC,EAAE,CAAC;IACvD,OAAO,GAAmC,IAAI,CAAC;IAC/C,aAAa,GAAmC,IAAI,CAAC;IAE7D,YACmB,MAAqB,EACrB,eAAe,EAAE;QADjB,WAAM,G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,OAAO,CAAC,MAAM,CAAC,EAAE,CAAC;YACnE,MAAM,IAAI,KAAK,CAAC,8BAA8B,CAAC,CAAC;QAClD,CAAC;QACD,IAAI,MAAM,CAAC,IAAI,KAAK,iBAAiB,IAAI,MAAM,CAAC,CAAC,KAAK,CAAC,EAAE,CAAC;YACxD,MAAM,IAAI,KAAK,CAAC,iDAAiD,CAAC,CAAC;QACrE,CAAC;QACD,IAAI,OAAO,MAAM,CAAC,EAAE,KAAK,QAAQ,IAAI,OAAO,MAAM,CAAC,IAAI,KAAK,QAAQ,EAAE,CAAC;YACrE,MAAM,IAAI,KAAK,CAAC,wCAAwC,CAAC,CAAC;QAC5D,CAAC;QACD,IAAI,CAAC,MAAM,CAAC,IAAI,IAAI,OAAO,MAAM,CAAC,IAAI,KAAK,QAAQ,IAAI,KAAK,CAAC,OAAO,CAAC,MAAM,CAAC,IAAI,CAAC,EAAE,CAAC;YAClF,MAAM,IAAI,KAAK,CAAC,iCAAiC,CAAC,CAAC;QACrD,CAAC;QACD,OAAO,MAAM,CAAC;IAChB,CAAC;CACF"}
|
package/dist/cli.d.ts
ADDED
package/dist/cli.js
ADDED
|
@@ -0,0 +1,93 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
import { readFile, writeFile, mkdir } from "node:fs/promises";
|
|
3
|
+
import { existsSync, readFileSync } from "node:fs";
|
|
4
|
+
import { dirname, join } from "node:path";
|
|
5
|
+
import { fileURLToPath } from "node:url";
|
|
6
|
+
import { StdioServerTransport } from "@modelcontextprotocol/sdk/server/stdio.js";
|
|
7
|
+
import { AgentGatewayClient } from "@pacerelle/sdk";
|
|
8
|
+
import { PacerelleMcpBridge } from "./bridge.js";
|
|
9
|
+
import { createPacerelleMcpServer } from "./server.js";
|
|
10
|
+
const defaultBaseUrl = "https://api.pacerelle.com";
|
|
11
|
+
async function main() {
|
|
12
|
+
const options = parseArgs(process.argv.slice(2));
|
|
13
|
+
if (!options.token || !options.agentId) {
|
|
14
|
+
throw new Error("PACERELLE_AGENT_ID and PACERELLE_AGENT_TOKEN are required.");
|
|
15
|
+
}
|
|
16
|
+
const snapshotPath = join(options.storeRoot, `${options.agentId}.signal.snapshot`);
|
|
17
|
+
const signalSnapshot = existsSync(snapshotPath) ? await readFile(snapshotPath) : undefined;
|
|
18
|
+
const wasm = readFileSync(resolveSdkWasmPath());
|
|
19
|
+
const client = new AgentGatewayClient({
|
|
20
|
+
token: options.token,
|
|
21
|
+
agentId: options.agentId,
|
|
22
|
+
baseUrl: options.baseUrl,
|
|
23
|
+
wsUrl: options.wsUrl,
|
|
24
|
+
e2ee: options.e2ee,
|
|
25
|
+
wasm,
|
|
26
|
+
signalSnapshot,
|
|
27
|
+
onSignalSnapshot: async (snapshot) => {
|
|
28
|
+
await mkdir(dirname(snapshotPath), { recursive: true });
|
|
29
|
+
await writeFile(snapshotPath, snapshot);
|
|
30
|
+
},
|
|
31
|
+
onOpen: () => {
|
|
32
|
+
console.error("Pacerelle MCP connected.");
|
|
33
|
+
},
|
|
34
|
+
onError: (error) => {
|
|
35
|
+
console.error("Pacerelle MCP agent error:", error);
|
|
36
|
+
},
|
|
37
|
+
});
|
|
38
|
+
const bridge = new PacerelleMcpBridge(client);
|
|
39
|
+
bridge.attach(client);
|
|
40
|
+
await client.connect();
|
|
41
|
+
const server = createPacerelleMcpServer(bridge);
|
|
42
|
+
const transport = new StdioServerTransport();
|
|
43
|
+
await server.connect(transport);
|
|
44
|
+
const shutdown = async () => {
|
|
45
|
+
client.close();
|
|
46
|
+
await server.close();
|
|
47
|
+
process.exit(0);
|
|
48
|
+
};
|
|
49
|
+
process.once("SIGINT", () => void shutdown());
|
|
50
|
+
process.once("SIGTERM", () => void shutdown());
|
|
51
|
+
}
|
|
52
|
+
function parseArgs(args) {
|
|
53
|
+
const values = new Map();
|
|
54
|
+
for (let index = 0; index < args.length; index += 1) {
|
|
55
|
+
const arg = args[index];
|
|
56
|
+
if (!arg.startsWith("--"))
|
|
57
|
+
continue;
|
|
58
|
+
const key = arg.slice(2);
|
|
59
|
+
if (key === "no-e2ee") {
|
|
60
|
+
values.set(key, true);
|
|
61
|
+
continue;
|
|
62
|
+
}
|
|
63
|
+
const next = args[index + 1];
|
|
64
|
+
if (!next || next.startsWith("--")) {
|
|
65
|
+
throw new Error(`Missing value for --${key}`);
|
|
66
|
+
}
|
|
67
|
+
values.set(key, next);
|
|
68
|
+
index += 1;
|
|
69
|
+
}
|
|
70
|
+
return {
|
|
71
|
+
token: stringValue(values, "token") ?? process.env.PACERELLE_AGENT_TOKEN,
|
|
72
|
+
agentId: stringValue(values, "agent-id") ?? process.env.PACERELLE_AGENT_ID,
|
|
73
|
+
baseUrl: stringValue(values, "base-url") ?? process.env.PACERELLE_BASE_URL ?? defaultBaseUrl,
|
|
74
|
+
wsUrl: stringValue(values, "ws-url") ?? process.env.PACERELLE_WS_URL,
|
|
75
|
+
storeRoot: stringValue(values, "store-root") ??
|
|
76
|
+
process.env.PACERELLE_STORE_ROOT ??
|
|
77
|
+
join(process.env.HOME ?? process.env.USERPROFILE ?? ".", ".pacerelle", "mcp"),
|
|
78
|
+
e2ee: !values.has("no-e2ee"),
|
|
79
|
+
};
|
|
80
|
+
}
|
|
81
|
+
function stringValue(values, key) {
|
|
82
|
+
const value = values.get(key);
|
|
83
|
+
return typeof value === "string" && value.length > 0 ? value : undefined;
|
|
84
|
+
}
|
|
85
|
+
function resolveSdkWasmPath() {
|
|
86
|
+
const sdkEntry = fileURLToPath(import.meta.resolve("@pacerelle/sdk"));
|
|
87
|
+
return join(dirname(sdkEntry), "signal-wasm", "signalwrap_bg.wasm");
|
|
88
|
+
}
|
|
89
|
+
main().catch((error) => {
|
|
90
|
+
console.error(error instanceof Error ? error.message : error);
|
|
91
|
+
process.exit(1);
|
|
92
|
+
});
|
|
93
|
+
//# sourceMappingURL=cli.js.map
|
package/dist/cli.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"cli.js","sourceRoot":"","sources":["../src-js/cli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AAW,CAAC,MAAM,EAAE,YAAY,CAAC;YACjC,OAAO,CAAC,GAAG,CAAC,oBAAoB;YAChC,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,IAAI,IAAI,OAAO,CAAC,GAAG,CAAC,WAAW,IAAI,GAAG,EAAE,YAAY,EAAE,KAAK,CAAC;QAC/E,IAAI,EAAE,CAAC,MAAM,CAAC,GAAG,CAAC,SAAS,CAAC;KAC7B,CAAC;AACJ,CAAC;AAED,SAAS,WAAW,CAAC,MAAqC,EAAE,GAAW;IACrE,MAAM,KAAK,GAAG,MAAM,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC;IAC9B,OAAO,OAAO,KAAK,KAAK,QAAQ,IAAI,KAAK,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,SAAS,CAAC;AAC3E,CAAC;AAED,SAAS,kBAAkB;IACzB,MAAM,QAAQ,GAAG,aAAa,CAAC,MAAM,CAAC,IAAI,CAAC,OAAO,CAAC,gBAAgB,CAAC,CAAC,CAAC;IACtE,OAAO,IAAI,CAAC,OAAO,CAAC,QAAQ,CAAC,EAAE,aAAa,EAAE,oBAAoB,CAAC,CAAC;AACtE,CAAC;AAED,IAAI,EAAE,CAAC,KAAK,CAAC,CAAC,KAAc,EAAE,EAAE;IAC9B,OAAO,CAAC,KAAK,CAAC,KAAK,YAAY,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC;IAC9D,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;AAClB,CAAC,CAAC,CAAC"}
|
package/dist/server.d.ts
ADDED
package/dist/server.js
ADDED
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
import { McpServer } from "@modelcontextprotocol/sdk/server/mcp.js";
|
|
2
|
+
import { z } from "zod";
|
|
3
|
+
export const version = "0.1.0-alpha.0";
|
|
4
|
+
export function createPacerelleMcpServer(bridge) {
|
|
5
|
+
const server = new McpServer({
|
|
6
|
+
name: "pacerelle-mcp",
|
|
7
|
+
version,
|
|
8
|
+
});
|
|
9
|
+
server.registerTool("send_message", {
|
|
10
|
+
title: "Send Message",
|
|
11
|
+
description: "Send an encrypted message to the current or provided Pacerelle conversation.",
|
|
12
|
+
inputSchema: {
|
|
13
|
+
text: z.string(),
|
|
14
|
+
conversationId: z.string().optional(),
|
|
15
|
+
to: z.string().optional(),
|
|
16
|
+
replyToMessageId: z.string().optional(),
|
|
17
|
+
},
|
|
18
|
+
}, async ({ text, conversationId, to, replyToMessageId }) => {
|
|
19
|
+
const result = await bridge.sendMessage({ text, conversationId, to, replyToMessageId });
|
|
20
|
+
return {
|
|
21
|
+
content: [{ type: "text", text: JSON.stringify(result) }],
|
|
22
|
+
};
|
|
23
|
+
});
|
|
24
|
+
server.registerTool("send_widget", {
|
|
25
|
+
title: "Send Widget",
|
|
26
|
+
description: "Send a widget.standard v1 JSON payload to the current or provided Pacerelle conversation.",
|
|
27
|
+
inputSchema: {
|
|
28
|
+
widgetJson: z.union([z.string(), z.record(z.string(), z.unknown())]),
|
|
29
|
+
conversationId: z.string().optional(),
|
|
30
|
+
to: z.string().optional(),
|
|
31
|
+
},
|
|
32
|
+
}, async ({ widgetJson, conversationId, to }) => {
|
|
33
|
+
const result = await bridge.sendWidget({ widgetJson, conversationId, to });
|
|
34
|
+
return {
|
|
35
|
+
content: [{ type: "text", text: JSON.stringify(result) }],
|
|
36
|
+
};
|
|
37
|
+
});
|
|
38
|
+
server.registerTool("get_history", {
|
|
39
|
+
title: "Get History",
|
|
40
|
+
description: "Return recent plaintext messages observed by this MCP process in memory.",
|
|
41
|
+
inputSchema: {
|
|
42
|
+
conversationId: z.string().optional(),
|
|
43
|
+
limit: z.number().int().min(1).max(50).optional(),
|
|
44
|
+
},
|
|
45
|
+
}, async ({ conversationId, limit }) => ({
|
|
46
|
+
content: [
|
|
47
|
+
{
|
|
48
|
+
type: "text",
|
|
49
|
+
text: JSON.stringify(bridge.getHistory({ conversationId, limit })),
|
|
50
|
+
},
|
|
51
|
+
],
|
|
52
|
+
}));
|
|
53
|
+
server.registerResource("current-conversation", "conversation://current", {
|
|
54
|
+
title: "Current Pacerelle conversation",
|
|
55
|
+
mimeType: "application/json",
|
|
56
|
+
}, async (uri) => ({
|
|
57
|
+
contents: [
|
|
58
|
+
{
|
|
59
|
+
uri: uri.href,
|
|
60
|
+
mimeType: "application/json",
|
|
61
|
+
text: JSON.stringify(bridge.currentConversation()),
|
|
62
|
+
},
|
|
63
|
+
],
|
|
64
|
+
}));
|
|
65
|
+
server.registerResource("pending-widget-response", "widget://pending", {
|
|
66
|
+
title: "Last widget response observed by Pacerelle",
|
|
67
|
+
mimeType: "application/json",
|
|
68
|
+
}, async (uri) => ({
|
|
69
|
+
contents: [
|
|
70
|
+
{
|
|
71
|
+
uri: uri.href,
|
|
72
|
+
mimeType: "application/json",
|
|
73
|
+
text: JSON.stringify(bridge.pendingWidgetResponse()),
|
|
74
|
+
},
|
|
75
|
+
],
|
|
76
|
+
}));
|
|
77
|
+
return server;
|
|
78
|
+
}
|
|
79
|
+
//# sourceMappingURL=server.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"server.js","sourceRoot":"","sources":["../src-js/server.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,yCAAyC,CAAC;AACpE,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAIxB,MAAM,CAAC,MAAM,OAAO,GAAG,eAAe,CAAC;AAEvC,MAAM,UAAU,wBAAwB,CAAC,MAA0B;IACjE,MAAM,MAAM,GAAG,IAAI,SAAS,CAAC;QAC3B,IAAI,EAAE,eAAe;QACrB,OAAO;KACR,CAAC,CAAC;IAEH,MAAM,CAAC,YAAY,CACjB,cAAc,EACd;QACE,KAAK,EAAE,cAAc;QACrB,WAAW,EAAE,8EAA8E;QAC3F,WAAW,EAAE;YACX,IAAI,EAAE,CAAC,CAAC,MAAM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ACR;gBACE,GAAG,EAAE,GAAG,CAAC,IAAI;gBACb,QAAQ,EAAE,kBAAkB;gBAC5B,IAAI,EAAE,IAAI,CAAC,SAAS,CAAC,MAAM,CAAC,qBAAqB,EAAE,CAAC;aACrD;SACF;KACF,CAAC,CACH,CAAC;IAEF,OAAO,MAAM,CAAC;AAChB,CAAC"}
|
package/package.json
ADDED
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@pacerelle/mcp-server",
|
|
3
|
+
"version": "0.1.0-alpha.0",
|
|
4
|
+
"type": "module",
|
|
5
|
+
"description": "MCP server for Pacerelle encrypted local agent relays.",
|
|
6
|
+
"bin": {
|
|
7
|
+
"pacerelle-mcp": "./dist/cli.js"
|
|
8
|
+
},
|
|
9
|
+
"main": "./dist/cli.js",
|
|
10
|
+
"files": [
|
|
11
|
+
"dist",
|
|
12
|
+
"README.md"
|
|
13
|
+
],
|
|
14
|
+
"scripts": {
|
|
15
|
+
"build": "tsc -p tsconfig.json",
|
|
16
|
+
"build:release": "node scripts/build-release.mjs",
|
|
17
|
+
"lint": "tsc --noEmit",
|
|
18
|
+
"test": "node --test"
|
|
19
|
+
},
|
|
20
|
+
"dependencies": {
|
|
21
|
+
"@modelcontextprotocol/sdk": "^1.29.0",
|
|
22
|
+
"@pacerelle/sdk": "^0.1.0-alpha.0",
|
|
23
|
+
"zod": "^4.2.1"
|
|
24
|
+
},
|
|
25
|
+
"devDependencies": {
|
|
26
|
+
"typescript": "^5.8.3"
|
|
27
|
+
},
|
|
28
|
+
"engines": {
|
|
29
|
+
"node": ">=20"
|
|
30
|
+
}
|
|
31
|
+
}
|