@pipeworx/mcp-victorian-complaint 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 Pipeworx
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,35 @@
1
+ # mcp-victorian-complaint
2
+
3
+ victorian-complaint MCP — wraps StupidAPIs (requires X-API-Key)
4
+
5
+ Part of the [Pipeworx](https://pipeworx.io) open MCP gateway.
6
+
7
+ ## Tools
8
+
9
+ | Tool | Description |
10
+ |------|-------------|
11
+ | `victorian_complaint_generate` | Any complaint, maximum Victorian indignation. The wifi being slow has never been taken more seriously. |
12
+
13
+ ## Quick Start
14
+
15
+ Add to your MCP client config:
16
+
17
+ ```json
18
+ {
19
+ "mcpServers": {
20
+ "victorian-complaint": {
21
+ "url": "https://gateway.pipeworx.io/victorian-complaint/mcp"
22
+ }
23
+ }
24
+ }
25
+ ```
26
+
27
+ Or use the CLI:
28
+
29
+ ```bash
30
+ npx pipeworx use victorian-complaint
31
+ ```
32
+
33
+ ## License
34
+
35
+ MIT
package/package.json ADDED
@@ -0,0 +1,20 @@
1
+ {
2
+ "name": "@pipeworx/mcp-victorian-complaint",
3
+ "version": "0.1.0",
4
+ "description": "victorian-complaint MCP — wraps StupidAPIs (requires X-API-Key)",
5
+ "type": "module",
6
+ "main": "src/index.ts",
7
+ "types": "src/index.ts",
8
+ "keywords": ["mcp", "mcp-server", "model-context-protocol", "pipeworx", "victorian-complaint"],
9
+ "license": "MIT",
10
+ "repository": {
11
+ "type": "git",
12
+ "url": "https://github.com/pipeworx-io/mcp-victorian-complaint"
13
+ },
14
+ "scripts": {
15
+ "typecheck": "tsc --noEmit"
16
+ },
17
+ "devDependencies": {
18
+ "typescript": "^5.7.0"
19
+ }
20
+ }
package/server.json ADDED
@@ -0,0 +1,18 @@
1
+ {
2
+ "$schema": "https://static.modelcontextprotocol.io/schemas/2025-12-11/server.schema.json",
3
+ "name": "io.github.pipeworx-io/victorian-complaint",
4
+ "title": "victorian complaint",
5
+ "description": "victorian-complaint MCP — wraps StupidAPIs (requires X-API-Key)",
6
+ "version": "0.1.0",
7
+ "websiteUrl": "https://pipeworx.io/packs/victorian-complaint",
8
+ "repository": {
9
+ "url": "https://github.com/pipeworx-io/mcp-victorian-complaint",
10
+ "source": "github"
11
+ },
12
+ "remotes": [
13
+ {
14
+ "type": "streamable-http",
15
+ "url": "https://gateway.pipeworx.io/victorian-complaint/mcp"
16
+ }
17
+ ]
18
+ }
package/src/index.ts ADDED
@@ -0,0 +1,61 @@
1
+ interface McpToolDefinition {
2
+ name: string;
3
+ description: string;
4
+ inputSchema: {
5
+ type: 'object';
6
+ properties: Record<string, unknown>;
7
+ required?: string[];
8
+ };
9
+ }
10
+
11
+ interface McpToolExport {
12
+ tools: McpToolDefinition[];
13
+ callTool: (name: string, args: Record<string, unknown>) => Promise<unknown>;
14
+ }
15
+
16
+ /**
17
+ * victorian-complaint MCP — wraps StupidAPIs (requires X-API-Key)
18
+ *
19
+ * Any complaint, maximum Victorian indignation. The wifi being slow has never been
20
+ */
21
+
22
+
23
+ const API_KEY = '6e0ddbe88486dc354370290979829dc892b0386bd789ae5a';
24
+
25
+ const tools: McpToolExport['tools'] = [
26
+ {
27
+ name: 'victorian_complaint_generate',
28
+ description: 'Any complaint, maximum Victorian indignation. The wifi being slow has never been taken more seriously.',
29
+ inputSchema: {
30
+ type: 'object' as const,
31
+ properties: {"complaint": {"type": "string"}, "recipient": {"type": "string"}, "indignation": {"type": "string", "enum": ["mild", "considerable", "severe", "maximum"]}, "complaint_type": {"type": "string", "enum": ["service", "neighbor", "technology", "food", "abstract", "government"]}, "length": {"type": "string", "enum": ["brief", "standard", "excessive"]}},
32
+ required: ["complaint"],
33
+ },
34
+ },
35
+ ];
36
+
37
+ async function callApi(url: string, args: Record<string, unknown>): Promise<unknown> {
38
+ const params = new URLSearchParams();
39
+ for (const [k, v] of Object.entries(args)) {
40
+ if (v !== undefined && v !== null && v !== '') {
41
+ params.set(k, String(v));
42
+ }
43
+ }
44
+ const fullUrl = params.toString() ? url + '?' + params.toString() : url;
45
+ const res = await fetch(fullUrl, {
46
+ headers: { 'X-API-Key': API_KEY },
47
+ });
48
+ if (!res.ok) throw new Error('victorian-complaint API error: ' + res.status);
49
+ return res.json();
50
+ }
51
+
52
+ async function callTool(name: string, args: Record<string, unknown>): Promise<unknown> {
53
+ switch (name) {
54
+ case 'victorian_complaint_generate':
55
+ return callApi('https://api.stupidapis.com/victorian-complaint/generate', args);
56
+ default:
57
+ throw new Error('Unknown tool: ' + name);
58
+ }
59
+ }
60
+
61
+ export default { tools, callTool } satisfies McpToolExport;
package/tsconfig.json ADDED
@@ -0,0 +1,14 @@
1
+ {
2
+ "compilerOptions": {
3
+ "target": "ES2022",
4
+ "module": "ESNext",
5
+ "moduleResolution": "bundler",
6
+ "strict": true,
7
+ "esModuleInterop": true,
8
+ "skipLibCheck": true,
9
+ "outDir": "dist",
10
+ "rootDir": "src",
11
+ "declaration": true
12
+ },
13
+ "include": ["src"]
14
+ }