@retainer/mcp 0.0.0-stage → 0.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/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 Retainer contributors
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 CHANGED
@@ -1,3 +1,34 @@
1
- # Temporary Holding Version
1
+ <p><img src="https://raw.githubusercontent.com/Tamloot-cc/Retainer/main/packages/web/public/favicon.svg" alt="Retainer logo" width="80" height="80" /></p>
2
2
 
3
- This version is a temporary placeholder for this package. An operational version to replace this has been submitted for review and is awaiting a staged release.
3
+ # @retainer/mcp
4
+
5
+ stdio bridge to a [Retainer](https://github.com/Tamloot-cc/Retainer) server's
6
+ MCP endpoint, for MCP clients that start servers as local processes. It
7
+ relays messages unchanged between stdin/stdout and the server's `/mcp`
8
+ endpoint; the tools are defined on the server.
9
+
10
+ ```json
11
+ {
12
+ "mcpServers": {
13
+ "retainer": {
14
+ "command": "npx",
15
+ "args": ["-y", "@retainer/mcp"],
16
+ "env": {
17
+ "RETAINER_URL": "https://retainer.example",
18
+ "RETAINER_API_KEY": "rtn_…"
19
+ }
20
+ }
21
+ }
22
+ }
23
+ ```
24
+
25
+ | Variable | Value |
26
+ | ------------------ | ---------------------------------------------------------------- |
27
+ | `RETAINER_URL` | The server's base URL. `/mcp` is added if missing. |
28
+ | `RETAINER_API_KEY` | An API key for one workspace; it decides who writes are made as. |
29
+
30
+ Clients that support Streamable HTTP can skip the bridge and connect to
31
+ `https://<host>/mcp` directly. See
32
+ [Connecting agents](https://github.com/Tamloot-cc/Retainer/blob/main/docs/agents.md).
33
+
34
+ MIT licensed.
@@ -0,0 +1,20 @@
1
+ import type { Readable, Writable } from 'node:stream';
2
+ /**
3
+ * Relays MCP messages between stdio and a Retainer server's Streamable HTTP
4
+ * endpoint. It does not parse or define tools: every message passes through
5
+ * unchanged, so the tools stay defined once, on the server.
6
+ */
7
+ export type BridgeConfig = {
8
+ url: URL;
9
+ apiKey: string;
10
+ };
11
+ export declare class ConfigError extends Error {
12
+ }
13
+ /** Reads `RETAINER_URL` and `RETAINER_API_KEY`. A base URL gets `/mcp` appended. */
14
+ export declare function readConfig(env: Record<string, string | undefined>): BridgeConfig;
15
+ export type Bridge = {
16
+ /** Settles when stdin has ended, every forwarded request is answered, and the connection is closed. */
17
+ closed: Promise<void>;
18
+ close: () => Promise<void>;
19
+ };
20
+ export declare function startBridge(config: BridgeConfig, stdin: Readable, stdout: Writable): Promise<Bridge>;
package/dist/bridge.js ADDED
@@ -0,0 +1,128 @@
1
+ import { isJSONRPCRequest, isJSONRPCResponse, isJSONRPCResultResponse, ReadBuffer, SdkHttpError, StreamableHTTPClientTransport, serializeMessage, } from '@modelcontextprotocol/client';
2
+ export class ConfigError extends Error {
3
+ }
4
+ /** Reads `RETAINER_URL` and `RETAINER_API_KEY`. A base URL gets `/mcp` appended. */
5
+ export function readConfig(env) {
6
+ const rawUrl = env.RETAINER_URL?.trim();
7
+ const apiKey = env.RETAINER_API_KEY?.trim();
8
+ if (!rawUrl)
9
+ throw new ConfigError('RETAINER_URL is not set (e.g. https://retainer.example.com)');
10
+ if (!apiKey)
11
+ throw new ConfigError('RETAINER_API_KEY is not set');
12
+ let url;
13
+ try {
14
+ url = new URL(rawUrl);
15
+ }
16
+ catch {
17
+ throw new ConfigError(`RETAINER_URL is not a valid URL: ${rawUrl}`);
18
+ }
19
+ if (url.protocol !== 'http:' && url.protocol !== 'https:') {
20
+ throw new ConfigError(`RETAINER_URL must use http or https: ${rawUrl}`);
21
+ }
22
+ const path = url.pathname.replace(/\/+$/, '');
23
+ url.pathname = path.endsWith('/mcp') ? path : `${path}/mcp`;
24
+ return { url, apiKey };
25
+ }
26
+ /** JSON-RPC "internal error": the bridge could not get an answer from the server. */
27
+ const BRIDGE_ERROR = -32603;
28
+ /** Diagnostics go to stderr; stdout carries only protocol messages. */
29
+ const log = (message) => process.stderr.write(`retainer-mcp: ${message}\n`);
30
+ export async function startBridge(config, stdin, stdout) {
31
+ const http = new StreamableHTTPClientTransport(config.url, {
32
+ requestInit: { headers: { authorization: `Bearer ${config.apiKey}` } },
33
+ });
34
+ /** The method of each client request not answered yet, by request ID. */
35
+ const pending = new Map();
36
+ let closing;
37
+ let resolveClosed;
38
+ const closed = new Promise((resolve) => {
39
+ resolveClosed = resolve;
40
+ });
41
+ const close = () => {
42
+ closing ??= (async () => {
43
+ stdin.off('data', onData);
44
+ try {
45
+ await http.close();
46
+ }
47
+ catch (error) {
48
+ log(`closing the connection failed: ${describe(error)}`);
49
+ }
50
+ resolveClosed();
51
+ })();
52
+ return closing;
53
+ };
54
+ const closeIfDone = () => {
55
+ if (stdin.readableEnded && pending.size === 0)
56
+ void close();
57
+ };
58
+ const write = (message) => {
59
+ if (isJSONRPCResponse(message))
60
+ pending.delete(message.id);
61
+ if (stdout.writable)
62
+ stdout.write(serializeMessage(message));
63
+ closeIfDone();
64
+ };
65
+ http.onmessage = (message) => {
66
+ if (isJSONRPCResultResponse(message) && pending.get(message.id) === 'initialize') {
67
+ // What a Client would do after initialize: later requests carry the negotiated version.
68
+ const version = message.result.protocolVersion;
69
+ if (typeof version === 'string')
70
+ http.setProtocolVersion(version);
71
+ }
72
+ write(message);
73
+ };
74
+ http.onerror = (error) => log(describe(error));
75
+ const forward = (message) => {
76
+ if (isJSONRPCRequest(message))
77
+ pending.set(message.id, message.method);
78
+ http.send(message).catch((error) => {
79
+ const reason = explain(error, config.url);
80
+ log(reason);
81
+ if (isJSONRPCRequest(message)) {
82
+ write({ jsonrpc: '2.0', id: message.id, error: { code: BRIDGE_ERROR, message: reason } });
83
+ }
84
+ });
85
+ };
86
+ const buffer = new ReadBuffer();
87
+ const onData = (chunk) => {
88
+ buffer.append(chunk);
89
+ for (;;) {
90
+ let message;
91
+ try {
92
+ message = buffer.readMessage();
93
+ }
94
+ catch (error) {
95
+ log(`ignored a line that is not a JSON-RPC message: ${describe(error)}`);
96
+ continue;
97
+ }
98
+ if (!message)
99
+ break;
100
+ forward(message);
101
+ }
102
+ };
103
+ await http.start();
104
+ stdin.on('data', onData);
105
+ stdin.once('end', closeIfDone);
106
+ stdout.on('error', () => void close());
107
+ return { closed, close };
108
+ }
109
+ function describe(error) {
110
+ return error instanceof Error ? error.message : String(error);
111
+ }
112
+ /** One line a person can act on, for stderr and for the error the client shows. */
113
+ function explain(error, url) {
114
+ if (error instanceof SdkHttpError) {
115
+ if (error.status === 401) {
116
+ return `Retainer at ${url.origin} rejected the API key (401). Check RETAINER_API_KEY.`;
117
+ }
118
+ const body = typeof error.data.text === 'string' ? error.data.text : error.message;
119
+ return `Retainer at ${url.origin} answered HTTP ${error.status}: ${body}`;
120
+ }
121
+ const cause = error instanceof Error && error.cause instanceof Error ? error.cause : undefined;
122
+ if (cause && 'code' in cause && typeof cause.code === 'string') {
123
+ return `cannot reach Retainer at ${url.origin} (${cause.code}). Check RETAINER_URL.`;
124
+ }
125
+ const detail = cause?.message ? ` (${cause.message})` : '';
126
+ return `request to Retainer at ${url.origin} failed: ${describe(error)}${detail}`;
127
+ }
128
+ //# sourceMappingURL=bridge.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"bridge.js","sourceRoot":"","sources":["../src/bridge.ts"],"names":[],"mappings":"AACA,OAAO,EACL,gBAAgB,EAChB,iBAAiB,EACjB,uBAAuB,EAEvB,UAAU,EAEV,YAAY,EACZ,6BAA6B,EAC7B,gBAAgB,GACjB,MAAM,8BAA8B,CAAC;AAUtC,MAAM,OAAO,WAAY,SAAQ,KAAK;CAAG;AAEzC,oFAAoF;AACpF,MAAM,UAAU,UAAU,CAAC,GAAuC;IAChE,MAAM,MAAM,GAAG,GAAG,CAAC,YAAY,EAAE,IAAI,EAAE,CAAC;IACxC,MAAM,MAAM,GAAG,GAAG,CAAC,gBAAgB,EAAE,IAAI,EAAE,CAAC;IAC5C,IAAI,CAAC,MAAM;QAAE,MAAM,IAAI,WAAW,CAAC,6DAA6D,CAAC,CAAC;IAClG,IAAI,CAAC,MAAM;QAAE,MAAM,IAAI,WAAW,CAAC,6BAA6B,CAAC,CAAC;IAClE,IAAI,GAAQ,CAAC;IACb,IAAI,CAAC;QACH,GAAG,GAAG,IAAI,GAAG,CAAC,MAAM,CAAC,CAAC;IACxB,CAAC;IAAC,MAAM,CAAC;QACP,MAAM,IAAI,WAAW,CAAC,oCAAoC,MAAM,EAAE,CAAC,CAAC;IACtE,CAAC;IACD,IAAI,GAAG,CAAC,QAAQ,KAAK,OAAO,IAAI,GAAG,CAAC,QAAQ,KAAK,QAAQ,EAAE,CAAC;QAC1D,MAAM,IAAI,WAAW,CAAC,wCAAwC,MAAM,EAAE,CAAC,CAAC;IAC1E,CAAC;IACD,MAAM,IAAI,GAAG,GAAG,CAAC,QAAQ,CAAC,OAAO,CAAC,MAAM,EAAE,EAAE,CAAC,CAAC;IAC9C,GAAG,CAAC,QAAQ,GAAG,IAAI,C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.js ADDED
@@ -0,0 +1,35 @@
1
+ #!/usr/bin/env node
2
+ import { ConfigError, readConfig, startBridge } from './bridge.js';
3
+ import { VERSION } from './version.js';
4
+ const USAGE = `retainer-mcp ${VERSION}: stdio bridge to a Retainer server's MCP endpoint.
5
+
6
+ Environment:
7
+ RETAINER_URL the server's base URL, e.g. https://retainer.example.com
8
+ RETAINER_API_KEY an API key for one workspace (rtn_...)
9
+
10
+ Speaks MCP on stdin and stdout; diagnostics go to stderr.`;
11
+ const arg = process.argv[2];
12
+ if (arg === '--version' || arg === '-v') {
13
+ process.stdout.write(`${VERSION}\n`);
14
+ process.exit(0);
15
+ }
16
+ if (arg === '--help' || arg === '-h') {
17
+ process.stdout.write(`${USAGE}\n`);
18
+ process.exit(0);
19
+ }
20
+ try {
21
+ const bridge = await startBridge(readConfig(process.env), process.stdin, process.stdout);
22
+ for (const signal of ['SIGINT', 'SIGTERM']) {
23
+ process.once(signal, () => void bridge.close());
24
+ }
25
+ await bridge.closed;
26
+ // After a signal stdin is still open and would keep the process alive.
27
+ process.stdin.destroy();
28
+ }
29
+ catch (error) {
30
+ if (!(error instanceof ConfigError))
31
+ throw error;
32
+ process.stderr.write(`retainer-mcp: ${error.message}\n\n${USAGE}\n`);
33
+ process.exitCode = 1;
34
+ }
35
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";AACA,OAAO,EAAE,WAAW,EAAE,UAAU,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AACnE,OAAO,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AAEvC,MAAM,KAAK,GAAG,gBAAgB,OAAO;;;;;;0DAMqB,CAAC;AAE3D,MAAM,GAAG,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;AAC5B,IAAI,GAAG,KAAK,WAAW,IAAI,GAAG,KAAK,IAAI,EAAE,CAAC;IACxC,OAAO,CAAC,MAAM,CAAC,KAAK,CAAC,GAAG,OAAO,IAAI,CAAC,CAAC;IACrC,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;AAClB,CAAC;AACD,IAAI,GAAG,KAAK,QAAQ,IAAI,GAAG,KAAK,IAAI,EAAE,CAAC;IACrC,OAAO,CAAC,MAAM,CAAC,KAAK,CAAC,GAAG,KAAK,IAAI,CAAC,CAAC;IACnC,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;AAClB,CAAC;AAED,IAAI,CAAC;IACH,MAAM,MAAM,GAAG,MAAM,WAAW,CAAC,UAAU,CAAC,OAAO,CAAC,GAAG,CAAC,EAAE,OAAO,CAAC,KAAK,EAAE,OAAO,CAAC,MAAM,CAAC,CAAC;IACzF,KAAK,MAAM,MAAM,IAAI,CAAC,QAAQ,EAAE,SAAS,CAAU,EAAE,CAAC;QACpD,OAAO,CAAC,IAAI,CAAC,MAAM,EAAE,GAAG,EAAE,CAAC,KAAK,MAAM,CAAC,KAAK,EAAE,CAAC,CAAC;IAClD,CAAC;IACD,MAAM,MAAM,CAAC,MAAM,CAAC;IACpB,uEAAuE;IACvE,OAAO,CAAC,KAAK,CAAC,OAAO,EAAE,CAAC;AAC1B,CAAC;AAAC,OAAO,KAAK,EAAE,CAAC;IACf,IAAI,CAAC,CAAC,KAAK,YAAY,WAAW,CAAC;QAAE,MAAM,KAAK,CAAC;IACjD,OAAO,CAAC,MAAM,CAAC,KAAK,CAAC,iBAAiB,KAAK,CAAC,OAAO,OAAO,KAAK,IAAI,CAAC,CAAC;IACrE,OAAO,CAAC,QAAQ,GAAG,CAAC,CAAC;AACvB,CAAC"}
@@ -0,0 +1,2 @@
1
+ /** Read from package.json, which sits one level above both `src` and `dist`. */
2
+ export declare const VERSION: string;
@@ -0,0 +1,4 @@
1
+ import { readFileSync } from 'node:fs';
2
+ /** Read from package.json, which sits one level above both `src` and `dist`. */
3
+ export const VERSION = JSON.parse(readFileSync(new URL('../package.json', import.meta.url), 'utf8')).version;
4
+ //# sourceMappingURL=version.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"version.js","sourceRoot":"","sources":["../src/version.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AAEvC,gFAAgF;AAChF,MAAM,CAAC,MAAM,OAAO,GAAW,IAAI,CAAC,KAAK,CACvC,YAAY,CAAC,IAAI,GAAG,CAAC,iBAAiB,EAAE,OAAO,IAAI,CAAC,GAAG,CAAC,EAAE,MAAM,CAAC,CAClE,CAAC,OAAO,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,44 @@
1
1
  {
2
2
  "name": "@retainer/mcp",
3
- "version": "0.0.0-stage",
4
- "stub": true,
5
- "description": "Temporary package placeholder for staged publishing"
3
+ "version": "0.1.0",
4
+ "description": "stdio bridge to a Retainer server's MCP endpoint, for MCP clients that only speak stdio.",
5
+ "keywords": [
6
+ "retainer",
7
+ "crm",
8
+ "ai-agents",
9
+ "memory",
10
+ "mcp",
11
+ "model-context-protocol",
12
+ "stdio"
13
+ ],
14
+ "license": "MIT",
15
+ "homepage": "https://github.com/Tamloot-cc/Retainer/tree/main/packages/mcp#readme",
16
+ "repository": {
17
+ "type": "git",
18
+ "url": "git+https://github.com/Tamloot-cc/Retainer.git",
19
+ "directory": "packages/mcp"
20
+ },
21
+ "bugs": "https://github.com/Tamloot-cc/Retainer/issues",
22
+ "type": "module",
23
+ "engines": {
24
+ "node": ">=24"
25
+ },
26
+ "bin": {
27
+ "retainer-mcp": "./dist/index.js"
28
+ },
29
+ "files": [
30
+ "dist"
31
+ ],
32
+ "publishConfig": {
33
+ "access": "public",
34
+ "provenance": true
35
+ },
36
+ "dependencies": {
37
+ "@modelcontextprotocol/client": "^2.4.0"
38
+ },
39
+ "scripts": {
40
+ "build": "tsc -p tsconfig.json",
41
+ "typecheck": "tsc -p tsconfig.json --noEmit",
42
+ "test": "vitest run --passWithNoTests"
43
+ }
6
44
  }