mcp-multitool 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 +21 -0
- package/README.md +119 -0
- package/dist/index.d.ts +2 -0
- package/dist/index.js +9 -0
- package/dist/tools/wait.d.ts +2 -0
- package/dist/tools/wait.js +45 -0
- package/package.json +35 -0
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 Andy Liner
|
|
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,119 @@
|
|
|
1
|
+
# mcp-multitool
|
|
2
|
+
|
|
3
|
+
[](https://www.npmjs.com/package/mcp-multitool)
|
|
4
|
+
[](https://www.npmjs.com/package/mcp-multitool)
|
|
5
|
+
[](./LICENSE)
|
|
6
|
+
|
|
7
|
+
A minimal [Model Context Protocol (MCP)](https://modelcontextprotocol.io) server. Currently ships one tool: `wait`.
|
|
8
|
+
|
|
9
|
+
## Why
|
|
10
|
+
|
|
11
|
+
Some tasks genuinely need a pause — rate limits, eventual consistency, animations completing, or simply giving a background process time to settle. `mcp-multitool` gives any MCP-compatible client a reliable, configurable `wait` tool without pulling in a larger server.
|
|
12
|
+
|
|
13
|
+
## Quick Start
|
|
14
|
+
|
|
15
|
+
### Install
|
|
16
|
+
|
|
17
|
+
```bash
|
|
18
|
+
npx mcp-multitool
|
|
19
|
+
```
|
|
20
|
+
|
|
21
|
+
### Configure Your MCP Client
|
|
22
|
+
|
|
23
|
+
**VS Code** (`.vscode/mcp.json`):
|
|
24
|
+
|
|
25
|
+
```json
|
|
26
|
+
{
|
|
27
|
+
"servers": {
|
|
28
|
+
"mcp-multitool": {
|
|
29
|
+
"command": "npx",
|
|
30
|
+
"args": ["mcp-multitool"]
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
```
|
|
35
|
+
|
|
36
|
+
**Claude Desktop** (`claude_desktop_config.json`):
|
|
37
|
+
|
|
38
|
+
```json
|
|
39
|
+
{
|
|
40
|
+
"mcpServers": {
|
|
41
|
+
"mcp-multitool": {
|
|
42
|
+
"command": "npx",
|
|
43
|
+
"args": ["mcp-multitool"]
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
```
|
|
48
|
+
|
|
49
|
+
**Cursor, Windsurf, Continue** — follow each client's MCP server documentation using the same `npx mcp-multitool` command.
|
|
50
|
+
|
|
51
|
+
## Tool Reference
|
|
52
|
+
|
|
53
|
+
### `wait`
|
|
54
|
+
|
|
55
|
+
Wait for a specified duration before continuing.
|
|
56
|
+
|
|
57
|
+
| Parameter | Type | Required | Description |
|
|
58
|
+
| ------------ | --------- | -------- | ------------------------------------------------------------------------------------------------- |
|
|
59
|
+
| `durationMs` | `integer` | ✅ | How long to wait in milliseconds. Must be ≥ 1 and ≤ the configured max (default: 300000 / 5 min). |
|
|
60
|
+
| `reason` | `string` | ✅ | Why the wait is needed. Max 64 characters. |
|
|
61
|
+
|
|
62
|
+
**Response:** `"Nms have passed."`
|
|
63
|
+
|
|
64
|
+
**Examples:**
|
|
65
|
+
|
|
66
|
+
```
|
|
67
|
+
wait durationMs=2000 reason="settling after write"
|
|
68
|
+
wait durationMs=5000 reason="rate limit cooldown"
|
|
69
|
+
wait durationMs=500 reason="animation to complete"
|
|
70
|
+
```
|
|
71
|
+
|
|
72
|
+
## Environment Variables
|
|
73
|
+
|
|
74
|
+
| Variable | Default | Description |
|
|
75
|
+
| ------------------- | -------- | --------------------------------------------------------------------------------------------------------- |
|
|
76
|
+
| `waitMaxDurationMs` | `300000` | Override the maximum allowed `durationMs`. Must be a positive number. Server refuses to start if invalid. |
|
|
77
|
+
| `wait` | _(on)_ | Set to `"false"` to disable the `wait` tool at startup. |
|
|
78
|
+
|
|
79
|
+
### Disabling Individual Tools
|
|
80
|
+
|
|
81
|
+
Every tool can be disabled by setting its name to `"false"` in the `env` block of your MCP config.
|
|
82
|
+
|
|
83
|
+
**VS Code** (`.vscode/mcp.json`):
|
|
84
|
+
|
|
85
|
+
```json
|
|
86
|
+
{
|
|
87
|
+
"servers": {
|
|
88
|
+
"mcp-multitool": {
|
|
89
|
+
"command": "npx",
|
|
90
|
+
"args": ["mcp-multitool"],
|
|
91
|
+
"env": {
|
|
92
|
+
"wait": "false"
|
|
93
|
+
}
|
|
94
|
+
}
|
|
95
|
+
}
|
|
96
|
+
}
|
|
97
|
+
```
|
|
98
|
+
|
|
99
|
+
**Claude Desktop** (`claude_desktop_config.json`):
|
|
100
|
+
|
|
101
|
+
```json
|
|
102
|
+
{
|
|
103
|
+
"mcpServers": {
|
|
104
|
+
"mcp-multitool": {
|
|
105
|
+
"command": "npx",
|
|
106
|
+
"args": ["mcp-multitool"],
|
|
107
|
+
"env": {
|
|
108
|
+
"wait": "false"
|
|
109
|
+
}
|
|
110
|
+
}
|
|
111
|
+
}
|
|
112
|
+
}
|
|
113
|
+
```
|
|
114
|
+
|
|
115
|
+
Tools are enabled by default. Only tools explicitly set to `"false"` are skipped at startup.
|
|
116
|
+
|
|
117
|
+
## Requirements
|
|
118
|
+
|
|
119
|
+
- Node.js >= 20
|
package/dist/index.d.ts
ADDED
package/dist/index.js
ADDED
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
import { McpServer } from "@modelcontextprotocol/sdk/server/mcp.js";
|
|
3
|
+
import { StdioServerTransport } from "@modelcontextprotocol/sdk/server/stdio.js";
|
|
4
|
+
import { register as registerWait } from "./tools/wait.js";
|
|
5
|
+
const isEnabled = (name) => process.env[name] !== "false";
|
|
6
|
+
const server = new McpServer({ name: "mcp-multitool", version: "0.1.0" });
|
|
7
|
+
if (isEnabled("wait"))
|
|
8
|
+
registerWait(server);
|
|
9
|
+
await server.connect(new StdioServerTransport());
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
const DEFAULT_MAX_MS = 300_000;
|
|
3
|
+
const maxMs = parseMaxDuration();
|
|
4
|
+
function parseMaxDuration() {
|
|
5
|
+
const env = process.env.waitMaxDurationMs;
|
|
6
|
+
if (!env)
|
|
7
|
+
return DEFAULT_MAX_MS;
|
|
8
|
+
const parsed = Number(env);
|
|
9
|
+
if (!Number.isFinite(parsed) || parsed <= 0) {
|
|
10
|
+
process.stderr.write(`Invalid waitMaxDurationMs: "${env}". Must be a positive number.\n`);
|
|
11
|
+
process.exit(1);
|
|
12
|
+
}
|
|
13
|
+
return parsed;
|
|
14
|
+
}
|
|
15
|
+
const schema = z.object({
|
|
16
|
+
durationMs: z
|
|
17
|
+
.number()
|
|
18
|
+
.int()
|
|
19
|
+
.min(1)
|
|
20
|
+
.max(maxMs)
|
|
21
|
+
.describe(`Milliseconds to wait. Min: 1, max: ${maxMs}.`),
|
|
22
|
+
reason: z
|
|
23
|
+
.string()
|
|
24
|
+
.min(1)
|
|
25
|
+
.max(64)
|
|
26
|
+
.describe("Why the wait is needed. Max 64 characters."),
|
|
27
|
+
});
|
|
28
|
+
export function register(server) {
|
|
29
|
+
server.tool("wait", "Wait for a specified duration before continuing.", schema.shape, async (input) => {
|
|
30
|
+
try {
|
|
31
|
+
await new Promise((r) => setTimeout(r, input.durationMs));
|
|
32
|
+
return {
|
|
33
|
+
content: [
|
|
34
|
+
{ type: "text", text: `${input.durationMs}ms have passed.` },
|
|
35
|
+
],
|
|
36
|
+
};
|
|
37
|
+
}
|
|
38
|
+
catch (err) {
|
|
39
|
+
return {
|
|
40
|
+
content: [{ type: "text", text: String(err) }],
|
|
41
|
+
isError: true,
|
|
42
|
+
};
|
|
43
|
+
}
|
|
44
|
+
});
|
|
45
|
+
}
|
package/package.json
ADDED
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "mcp-multitool",
|
|
3
|
+
"version": "0.1.0",
|
|
4
|
+
"description": "Minimal MCP server — wait tool and more.",
|
|
5
|
+
"license": "MIT",
|
|
6
|
+
"type": "module",
|
|
7
|
+
"main": "dist/index.js",
|
|
8
|
+
"bin": "./dist/index.js",
|
|
9
|
+
"files": [
|
|
10
|
+
"dist",
|
|
11
|
+
"README.md",
|
|
12
|
+
"LICENSE"
|
|
13
|
+
],
|
|
14
|
+
"keywords": [
|
|
15
|
+
"mcp",
|
|
16
|
+
"model-context-protocol",
|
|
17
|
+
"wait",
|
|
18
|
+
"tool"
|
|
19
|
+
],
|
|
20
|
+
"scripts": {
|
|
21
|
+
"build": "tsc",
|
|
22
|
+
"prepublishOnly": "npm run build"
|
|
23
|
+
},
|
|
24
|
+
"dependencies": {
|
|
25
|
+
"@modelcontextprotocol/sdk": "1.29.0",
|
|
26
|
+
"zod": "^3.24.0"
|
|
27
|
+
},
|
|
28
|
+
"devDependencies": {
|
|
29
|
+
"@types/node": "^25.5.2",
|
|
30
|
+
"typescript": "^5.7.0"
|
|
31
|
+
},
|
|
32
|
+
"engines": {
|
|
33
|
+
"node": ">=20"
|
|
34
|
+
}
|
|
35
|
+
}
|