tiny-stdio-mcp-server 0.1.12 → 0.1.14

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 (3) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +33 -13
  3. package/package.json +2 -1
package/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 Poe Platform
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
@@ -14,7 +14,7 @@ npm install tiny-stdio-mcp-server
14
14
  import { createServer, defineSchema } from "tiny-stdio-mcp-server";
15
15
 
16
16
  const schema = defineSchema({
17
- text: { type: "string", description: "Text to reverse" },
17
+ text: { type: "string", description: "Text to reverse" }
18
18
  });
19
19
 
20
20
  createServer({ name: "my-server", version: "1.0.0" })
@@ -49,7 +49,7 @@ Register a tool. The handler receives typed args matching the schema and returns
49
49
  ```ts
50
50
  const schema = defineSchema({
51
51
  query: { type: "string", description: "Search query" },
52
- limit: { type: "number", description: "Max results", optional: true },
52
+ limit: { type: "number", description: "Max results", optional: true }
53
53
  });
54
54
 
55
55
  server.tool("search", "Search for things", schema, async ({ query, limit }) => {
@@ -62,7 +62,7 @@ For structured-data tools, pass a root-object output schema. The server advertis
62
62
 
63
63
  ```ts
64
64
  const input = defineSchema({
65
- query: { type: "string" },
65
+ query: { type: "string" }
66
66
  });
67
67
  const output = defineSchema({
68
68
  items: {
@@ -71,16 +71,22 @@ const output = defineSchema({
71
71
  type: "object",
72
72
  properties: {
73
73
  title: { type: "string" },
74
- score: { type: "number" },
74
+ score: { type: "number" }
75
75
  },
76
- required: ["title", "score"],
77
- },
78
- },
76
+ required: ["title", "score"]
77
+ }
78
+ }
79
79
  });
80
80
 
81
- server.tool("search", "Search", input, async ({ query }) => ({
82
- items: [{ title: query, score: 1 }],
83
- }), output);
81
+ server.tool(
82
+ "search",
83
+ "Search",
84
+ input,
85
+ async ({ query }) => ({
86
+ items: [{ title: query, score: 1 }]
87
+ }),
88
+ output
89
+ );
84
90
  ```
85
91
 
86
92
  Output schemas must have `type: "object"` at the root. Tools whose natural result is prose, images, audio, files, or other content blocks should omit `outputSchema` and keep returning content.
@@ -113,6 +119,12 @@ await server.connectSDK(sdkTransport);
113
119
 
114
120
  Dynamically add/remove tools at runtime and notify connected clients.
115
121
 
122
+ ## Configuration Options
123
+
124
+ - `createServer({ name, version })`: server identity sent during MCP initialization.
125
+ - `.tool(name, description, schema, handler, outputSchema?)`: tool metadata, input schema, handler, and optional structured output schema.
126
+ - `.connect({ readable, writable })`: custom stream transport for tests or embedded hosts.
127
+
116
128
  ## `defineSchema(definition)`
117
129
 
118
130
  Type-safe schema builder. Returns a JSON Schema object with inferred TypeScript types.
@@ -120,11 +132,15 @@ Type-safe schema builder. Returns a JSON Schema object with inferred TypeScript
120
132
  ```ts
121
133
  const schema = defineSchema({
122
134
  name: { type: "string", description: "User name" },
123
- age: { type: "number", description: "User age", optional: true },
135
+ age: { type: "number", description: "User age", optional: true }
124
136
  });
125
137
  // Handler receives: { name: string; age?: number }
126
138
  ```
127
139
 
140
+ ## Environment Variables
141
+
142
+ This package does not read public environment variables.
143
+
128
144
  Supported types: `string`, `number`, `boolean`, `object`, `array`.
129
145
 
130
146
  ## Content helpers
@@ -189,8 +205,12 @@ Use `createTestPair` with the official MCP SDK for in-memory testing:
189
205
  ```ts
190
206
  import { createTestPair } from "tiny-stdio-mcp-server/testing";
191
207
 
192
- const server = createServer({ name: "test", version: "1.0.0" })
193
- .tool("ping", "Ping", defineSchema({}), () => "pong");
208
+ const server = createServer({ name: "test", version: "1.0.0" }).tool(
209
+ "ping",
210
+ "Ping",
211
+ defineSchema({}),
212
+ () => "pong"
213
+ );
194
214
 
195
215
  const { client, cleanup } = await createTestPair(server);
196
216
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "tiny-stdio-mcp-server",
3
- "version": "0.1.12",
3
+ "version": "0.1.14",
4
4
  "bugs": {
5
5
  "url": "https://github.com/poe-platform/poe-code/issues"
6
6
  },
@@ -27,6 +27,7 @@
27
27
  "prepublishOnly": "tsc"
28
28
  },
29
29
  "files": [
30
+ "LICENSE",
30
31
  "dist"
31
32
  ],
32
33
  "engines": {