mcp-stdio 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 Balneario de Cofrentes
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,123 @@
1
+ # mcp-stdio
2
+
3
+ Zero-dependency MCP server for stdio transport. Just tools, nothing else.
4
+
5
+ [![npm version](https://img.shields.io/npm/v/mcp-stdio.svg)](https://www.npmjs.com/package/mcp-stdio)
6
+ [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)
7
+
8
+ ## Why
9
+
10
+ The official MCP SDK has 17 dependencies (Express, Hono, OAuth, JWT...). Most MCP servers just need stdio + tools. This package is 222 lines, zero runtime dependencies.
11
+
12
+ | | `@modelcontextprotocol/sdk` | `mcp-stdio` |
13
+ |---|---|---|
14
+ | Dependencies | 17 | **0** |
15
+ | Transport | stdio, HTTP, SSE | **stdio** |
16
+ | Features | tools, resources, prompts, sampling, auth | **tools** |
17
+ | Lines | ~5000+ | **222** |
18
+
19
+ ## Install
20
+
21
+ ```bash
22
+ npm install mcp-stdio
23
+ ```
24
+
25
+ ## Usage
26
+
27
+ ```typescript
28
+ import { createMcpServer } from 'mcp-stdio';
29
+
30
+ createMcpServer({
31
+ name: 'my-server',
32
+ version: '1.0.0',
33
+ tools: {
34
+ greet: {
35
+ description: 'Say hello',
36
+ parameters: {
37
+ type: 'object',
38
+ properties: { name: { type: 'string' } },
39
+ required: ['name'],
40
+ },
41
+ handler: async ({ name }) => `Hello ${name}!`,
42
+ },
43
+
44
+ add: {
45
+ description: 'Add two numbers',
46
+ parameters: {
47
+ type: 'object',
48
+ properties: {
49
+ a: { type: 'number' },
50
+ b: { type: 'number' },
51
+ },
52
+ required: ['a', 'b'],
53
+ },
54
+ handler: async ({ a, b }) => `${Number(a) + Number(b)}`,
55
+ },
56
+ },
57
+ });
58
+ ```
59
+
60
+ ## Configure in Claude Code
61
+
62
+ ```json
63
+ {
64
+ "mcpServers": {
65
+ "my-server": {
66
+ "command": "node",
67
+ "args": ["my-server.js"]
68
+ }
69
+ }
70
+ }
71
+ ```
72
+
73
+ ## API
74
+
75
+ ### `createMcpServer(options)`
76
+
77
+ Starts an MCP server reading JSON-RPC from stdin, writing to stdout.
78
+
79
+ **Options:**
80
+
81
+ | Field | Type | Required | Description |
82
+ |-------|------|----------|-------------|
83
+ | `name` | `string` | yes | Server name (shown to clients) |
84
+ | `version` | `string` | no | Server version (default: `'0.1.0'`) |
85
+ | `tools` | `Record<string, ToolDefinition>` | yes | Tool definitions |
86
+
87
+ **ToolDefinition:**
88
+
89
+ | Field | Type | Required | Description |
90
+ |-------|------|----------|-------------|
91
+ | `description` | `string` | yes | What the tool does |
92
+ | `parameters` | `JsonSchema` | no | JSON Schema for input |
93
+ | `handler` | `(params) => Promise<string \| ToolContent[]>` | yes | Implementation |
94
+
95
+ **Handler return types:**
96
+ - `string` — wrapped as `[{ type: 'text', text: '...' }]`
97
+ - `ToolContent[]` — returned as-is (supports `text`, `image`, `resource`)
98
+
99
+ **Errors in handlers** are caught and returned as `{ isError: true, content: [{ type: 'text', text: 'Error: ...' }] }` — the server never crashes.
100
+
101
+ ## What it implements
102
+
103
+ - JSON-RPC 2.0 over stdio (newline-delimited)
104
+ - `initialize` with capability negotiation
105
+ - `tools/list` with JSON Schema input schemas
106
+ - `tools/call` with structured content responses
107
+ - `ping`
108
+ - Proper error codes (-32700, -32600, -32601, -32603)
109
+ - Notification handling (no response for messages without `id`)
110
+ - Logs to stderr (stdout is protocol-only)
111
+
112
+ ## What it doesn't implement
113
+
114
+ - HTTP/SSE/Streamable HTTP transport
115
+ - Resources, Prompts, Sampling
116
+ - OAuth, authentication
117
+ - Schema validation (trusts the caller — your handler validates)
118
+
119
+ These are intentional omissions. If you need them, use the [official SDK](https://github.com/modelcontextprotocol/typescript-sdk).
120
+
121
+ ## License
122
+
123
+ MIT
@@ -0,0 +1,53 @@
1
+ /**
2
+ * mcp-stdio — Zero-dependency MCP server for stdio transport.
3
+ *
4
+ * Implements the Model Context Protocol over stdin/stdout using JSON-RPC 2.0.
5
+ * Supports tools only (no resources, prompts, or sampling).
6
+ *
7
+ * Usage:
8
+ * import { createMcpServer } from 'mcp-stdio';
9
+ *
10
+ * createMcpServer({
11
+ * name: 'my-server',
12
+ * version: '1.0.0',
13
+ * tools: {
14
+ * greet: {
15
+ * description: 'Say hello',
16
+ * parameters: { type: 'object', properties: { name: { type: 'string' } } },
17
+ * handler: async ({ name }) => `Hello ${name}!`,
18
+ * },
19
+ * },
20
+ * });
21
+ */
22
+ export interface ToolDefinition {
23
+ description: string;
24
+ parameters?: JsonSchema;
25
+ handler: (params: Record<string, unknown>) => Promise<string | ToolContent[]>;
26
+ }
27
+ export interface ToolContent {
28
+ type: 'text' | 'image' | 'resource';
29
+ text?: string;
30
+ data?: string;
31
+ mimeType?: string;
32
+ }
33
+ export interface JsonSchema {
34
+ type?: string;
35
+ properties?: Record<string, unknown>;
36
+ required?: string[];
37
+ [key: string]: unknown;
38
+ }
39
+ export interface McpServerOptions {
40
+ name: string;
41
+ version?: string;
42
+ tools: Record<string, ToolDefinition>;
43
+ }
44
+ /**
45
+ * Start an MCP server that reads JSON-RPC messages from stdin
46
+ * and writes responses to stdout.
47
+ *
48
+ * Logs go to stderr (stdout is reserved for the MCP protocol).
49
+ *
50
+ * Returns a promise that resolves when stdin closes.
51
+ */
52
+ export declare function createMcpServer(options: McpServerOptions): Promise<void>;
53
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;GAoBG;AAMH,MAAM,WAAW,cAAc;IAC7B,WAAW,EAAE,MAAM,CAAC;IACpB,UAAU,CAAC,EAAE,UAAU,CAAC;IACxB,OAAO,EAAE,CAAC,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,KAAK,OAAO,CAAC,MAAM,GAAG,WAAW,EAAE,CAAC,CAAC;CAC/E;AAED,MAAM,WAAW,WAAW;IAC1B,IAAI,EAAE,MAAM,GAAG,OAAO,GAAG,UAAU,CAAC;IACpC,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,QAAQ,CAAC,EAAE,MAAM,CAAC;CACnB;AAED,MAAM,WAAW,UAAU;IACzB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,UAAU,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IACrC,QAAQ,CAAC,EAAE,MAAM,EAAE,CAAC;IACpB,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC;CACxB;AAED,MAAM,WAAW,gBAAgB;IAC/B,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,KAAK,EAAE,MAAM,CAAC,MAAM,EAAE,cAAc,CAAC,CAAC;CACvC;AAgID;;;;;;;GAOG;AACH,wBAAgB,eAAe,CAAC,OAAO,EAAE,gBAAgB,GAAG,OAAO,CAAC,IAAI,CAAC,CAmCxE"}
package/dist/index.js ADDED
@@ -0,0 +1,154 @@
1
+ /**
2
+ * mcp-stdio — Zero-dependency MCP server for stdio transport.
3
+ *
4
+ * Implements the Model Context Protocol over stdin/stdout using JSON-RPC 2.0.
5
+ * Supports tools only (no resources, prompts, or sampling).
6
+ *
7
+ * Usage:
8
+ * import { createMcpServer } from 'mcp-stdio';
9
+ *
10
+ * createMcpServer({
11
+ * name: 'my-server',
12
+ * version: '1.0.0',
13
+ * tools: {
14
+ * greet: {
15
+ * description: 'Say hello',
16
+ * parameters: { type: 'object', properties: { name: { type: 'string' } } },
17
+ * handler: async ({ name }) => `Hello ${name}!`,
18
+ * },
19
+ * },
20
+ * });
21
+ */
22
+ import { createInterface } from 'readline';
23
+ // ─── JSON-RPC error codes ───────────────────────────────────────────────────
24
+ const PARSE_ERROR = -32700;
25
+ const INVALID_REQUEST = -32600;
26
+ const METHOD_NOT_FOUND = -32601;
27
+ const INTERNAL_ERROR = -32603;
28
+ // ─── Core server ────────────────────────────────────────────────────────────
29
+ function send(msg) {
30
+ process.stdout.write(JSON.stringify(msg) + '\n');
31
+ }
32
+ function sendResult(id, result) {
33
+ send({ jsonrpc: '2.0', id, result });
34
+ }
35
+ function sendError(id, code, message) {
36
+ send({ jsonrpc: '2.0', id, error: { code, message } });
37
+ }
38
+ function log(...args) {
39
+ // MCP requires stdout for protocol only — use stderr for diagnostics
40
+ process.stderr.write(args.map(String).join(' ') + '\n');
41
+ }
42
+ function normalizeContent(result) {
43
+ if (typeof result === 'string') {
44
+ return [{ type: 'text', text: result }];
45
+ }
46
+ return result;
47
+ }
48
+ async function handleRequest(req, options) {
49
+ const { id, method, params } = req;
50
+ // Notifications (no id) — acknowledge silently
51
+ if (id === undefined || id === null) {
52
+ // notifications/initialized, notifications/cancelled, etc.
53
+ return;
54
+ }
55
+ switch (method) {
56
+ case 'initialize': {
57
+ sendResult(id, {
58
+ protocolVersion: '2024-11-05',
59
+ capabilities: {
60
+ tools: {},
61
+ },
62
+ serverInfo: {
63
+ name: options.name,
64
+ version: options.version || '0.1.0',
65
+ },
66
+ });
67
+ return;
68
+ }
69
+ case 'tools/list': {
70
+ const tools = Object.entries(options.tools).map(([name, def]) => ({
71
+ name,
72
+ description: def.description,
73
+ inputSchema: def.parameters || { type: 'object', properties: {} },
74
+ }));
75
+ sendResult(id, { tools });
76
+ return;
77
+ }
78
+ case 'tools/call': {
79
+ const toolName = params?.name;
80
+ const toolArgs = params?.arguments || {};
81
+ if (!toolName || !(toolName in options.tools)) {
82
+ sendResult(id, {
83
+ content: [{ type: 'text', text: `Error: Unknown tool "${toolName}"` }],
84
+ isError: true,
85
+ });
86
+ return;
87
+ }
88
+ try {
89
+ const result = await options.tools[toolName].handler(toolArgs);
90
+ sendResult(id, {
91
+ content: normalizeContent(result),
92
+ });
93
+ }
94
+ catch (err) {
95
+ const message = err instanceof Error ? err.message : String(err);
96
+ sendResult(id, {
97
+ content: [{ type: 'text', text: `Error: ${message}` }],
98
+ isError: true,
99
+ });
100
+ }
101
+ return;
102
+ }
103
+ case 'ping': {
104
+ sendResult(id, {});
105
+ return;
106
+ }
107
+ default: {
108
+ sendError(id, METHOD_NOT_FOUND, `Method not found: ${method}`);
109
+ }
110
+ }
111
+ }
112
+ // ─── Public API ─────────────────────────────────────────────────────────────
113
+ /**
114
+ * Start an MCP server that reads JSON-RPC messages from stdin
115
+ * and writes responses to stdout.
116
+ *
117
+ * Logs go to stderr (stdout is reserved for the MCP protocol).
118
+ *
119
+ * Returns a promise that resolves when stdin closes.
120
+ */
121
+ export function createMcpServer(options) {
122
+ return new Promise((resolve) => {
123
+ const rl = createInterface({ input: process.stdin });
124
+ rl.on('line', async (line) => {
125
+ if (!line.trim())
126
+ return;
127
+ let req;
128
+ try {
129
+ req = JSON.parse(line);
130
+ }
131
+ catch {
132
+ sendError(null, PARSE_ERROR, 'Parse error');
133
+ return;
134
+ }
135
+ if (!req.jsonrpc || req.jsonrpc !== '2.0' || !req.method) {
136
+ sendError(req.id ?? null, INVALID_REQUEST, 'Invalid JSON-RPC 2.0 request');
137
+ return;
138
+ }
139
+ try {
140
+ await handleRequest(req, options);
141
+ }
142
+ catch (err) {
143
+ const message = err instanceof Error ? err.message : String(err);
144
+ log('Internal error:', message);
145
+ sendError(req.id ?? null, INTERNAL_ERROR, 'Internal server error');
146
+ }
147
+ });
148
+ rl.on('close', () => {
149
+ resolve();
150
+ });
151
+ log(`${options.name} MCP server started (stdio)`);
152
+ });
153
+ }
154
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;GAoBG;AAEH,OAAO,EAAE,eAAe,EAAE,MAAM,UAAU,CAAC;AA8C3C,+EAA+E;AAE/E,MAAM,WAAW,GAAG,CAAC,KAAK,CAAC;AAC3B,MAAM,eAAe,GAAG,CAAC,KAAK,CAAC;AAC/B,MAAM,gBAAgB,GAAG,CAAC,KAAK,CAAC;AAChC,MAAM,cAAc,GAAG,CAAC,KAAK,CAAC;AAE9B,+EAA+E;AAE/E,SAAS,IAAI,CAAC,GAAoB;IAChC,OAAO,CAAC,MAAM,CAAC,KAAK,CAAC,IAAI,CAAC,SAAS,CAAC,GAAG,CAAC,GAAG,IAAI,CAAC,CAAC;AACnD,CAAC;AAED,SAAS,UAAU,CAAC,EAA0B,EAAE,MAAe;IAC7D,IAAI,CAAC,EAAE,OAAO,EAAE,KAAK,EAAE,EAAE,EAAE,MAAM,EAAE,CAAC,CAAC;AACvC,CAAC;AAED,SAAS,SAAS,CAAC,EAA0B,EAAE,IAAY,EAAE,OAAe;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C;YAAC,OAAO,GAAG,EAAE,CAAC;gBACb,MAAM,OAAO,GAAG,GAAG,YAAY,KAAK,CAAC,CAAC,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC;gBACjE,GAAG,CAAC,iBAAiB,EAAE,OAAO,CAAC,CAAC;gBAChC,SAAS,CAAC,GAAG,CAAC,EAAE,IAAI,IAAI,EAAE,cAAc,EAAE,uBAAuB,CAAC,CAAC;YACrE,CAAC;QACH,CAAC,CAAC,CAAC;QAEH,EAAE,CAAC,EAAE,CAAC,OAAO,EAAE,GAAG,EAAE;YAClB,OAAO,EAAE,CAAC;QACZ,CAAC,CAAC,CAAC;QAEH,GAAG,CAAC,GAAG,OAAO,CAAC,IAAI,6BAA6B,CAAC,CAAC;IACpD,CAAC,CAAC,CAAC;AACL,CAAC"}
package/package.json ADDED
@@ -0,0 +1,49 @@
1
+ {
2
+ "name": "mcp-stdio",
3
+ "version": "0.1.0",
4
+ "description": "Zero-dependency MCP server for stdio transport. Just tools, nothing else.",
5
+ "type": "module",
6
+ "main": "dist/index.js",
7
+ "types": "dist/index.d.ts",
8
+ "exports": {
9
+ ".": {
10
+ "types": "./dist/index.d.ts",
11
+ "import": "./dist/index.js"
12
+ }
13
+ },
14
+ "files": [
15
+ "dist",
16
+ "README.md",
17
+ "LICENSE"
18
+ ],
19
+ "scripts": {
20
+ "build": "tsc",
21
+ "test": "node --test test/*.test.js",
22
+ "prepare": "tsc",
23
+ "prepublishOnly": "npm test"
24
+ },
25
+ "keywords": [
26
+ "mcp",
27
+ "model-context-protocol",
28
+ "stdio",
29
+ "ai",
30
+ "agent",
31
+ "tools",
32
+ "json-rpc",
33
+ "zero-dependency"
34
+ ],
35
+ "author": "Balneario de Cofrentes",
36
+ "license": "MIT",
37
+ "homepage": "https://github.com/Balneario-de-Cofrentes/mcp-stdio#readme",
38
+ "repository": {
39
+ "type": "git",
40
+ "url": "git+https://github.com/Balneario-de-Cofrentes/mcp-stdio.git"
41
+ },
42
+ "devDependencies": {
43
+ "typescript": "^5.7.0",
44
+ "@types/node": "^22.0.0"
45
+ },
46
+ "engines": {
47
+ "node": ">=20"
48
+ }
49
+ }