@pipeworx/mcp-httpstatus 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,57 @@
1
+ # mcp-httpstatus
2
+
3
+ HTTP status code reference MCP.
4
+
5
+ Part of [Pipeworx](https://pipeworx.io) — an MCP gateway connecting AI agents to 1148+ live data sources.
6
+
7
+ ## Tools
8
+
9
+ | Tool | Description |
10
+ |------|-------------|
11
+ | `http_status` | Look up an HTTP status code (100-599): its reason phrase, category, and meaning. Keyless, offline. |
12
+ | `list_http_statuses` | List HTTP status codes, optionally filtered to a class (1, 2, 3, 4 or 5 for 1xx…5xx). |
13
+
14
+ ## Quick Start
15
+
16
+ Add to your MCP client (Claude Desktop, Cursor, Windsurf, etc.):
17
+
18
+ ```json
19
+ {
20
+ "mcpServers": {
21
+ "httpstatus": {
22
+ "url": "https://gateway.pipeworx.io/httpstatus/mcp"
23
+ }
24
+ }
25
+ }
26
+ ```
27
+
28
+ Or connect to the full Pipeworx gateway for access to all 1148+ data sources:
29
+
30
+ ```json
31
+ {
32
+ "mcpServers": {
33
+ "pipeworx": {
34
+ "url": "https://gateway.pipeworx.io/mcp"
35
+ }
36
+ }
37
+ }
38
+ ```
39
+
40
+ ## Using with ask_pipeworx
41
+
42
+ Instead of calling tools directly, you can ask questions in plain English:
43
+
44
+ ```
45
+ ask_pipeworx({ question: "your question about Httpstatus data" })
46
+ ```
47
+
48
+ The gateway picks the right tool and fills the arguments automatically.
49
+
50
+ ## More
51
+
52
+ - [All tools and guides](https://github.com/pipeworx-io/examples)
53
+ - [pipeworx.io](https://pipeworx.io)
54
+
55
+ ## License
56
+
57
+ MIT
package/package.json ADDED
@@ -0,0 +1,20 @@
1
+ {
2
+ "name": "@pipeworx/mcp-httpstatus",
3
+ "version": "0.1.0",
4
+ "description": "HTTP status code reference MCP.",
5
+ "type": "module",
6
+ "main": "src/index.ts",
7
+ "types": "src/index.ts",
8
+ "keywords": ["mcp", "mcp-server", "model-context-protocol", "pipeworx", "httpstatus"],
9
+ "license": "MIT",
10
+ "repository": {
11
+ "type": "git",
12
+ "url": "https://github.com/pipeworx-io/mcp-httpstatus"
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/httpstatus",
4
+ "title": "Httpstatus",
5
+ "description": "HTTP status code reference MCP.",
6
+ "version": "0.1.0",
7
+ "websiteUrl": "https://pipeworx.io/packs/httpstatus",
8
+ "repository": {
9
+ "url": "https://github.com/pipeworx-io/mcp-httpstatus",
10
+ "source": "github"
11
+ },
12
+ "remotes": [
13
+ {
14
+ "type": "streamable-http",
15
+ "url": "https://gateway.pipeworx.io/httpstatus/mcp"
16
+ }
17
+ ]
18
+ }
package/src/index.ts ADDED
@@ -0,0 +1,127 @@
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
+ meter?: { credits: number };
15
+ cost?: Record<string, unknown>;
16
+ provider?: string;
17
+ }
18
+
19
+ /**
20
+ * HTTP status code reference MCP.
21
+ *
22
+ * Keyless, offline reference: look up an HTTP status code's name, category and
23
+ * meaning, or list the codes in a class. Inlined from the IANA registry / RFCs.
24
+ */
25
+
26
+
27
+ const STATUS: Record<number, [string, string]> = {
28
+ 100: ['Continue', 'The client should continue with its request.'],
29
+ 101: ['Switching Protocols', 'The server is switching protocols per the Upgrade header.'],
30
+ 102: ['Processing', 'The server has received and is processing the request (WebDAV).'],
31
+ 103: ['Early Hints', 'Return some response headers before the final response.'],
32
+ 200: ['OK', 'The request succeeded.'],
33
+ 201: ['Created', 'The request succeeded and a new resource was created.'],
34
+ 202: ['Accepted', 'The request was accepted for processing but not yet completed.'],
35
+ 203: ['Non-Authoritative Information', 'Returned metadata is from a copy, not the origin.'],
36
+ 204: ['No Content', 'Success, with no body to return.'],
37
+ 205: ['Reset Content', 'Success; the client should reset the document view.'],
38
+ 206: ['Partial Content', 'Partial resource delivered per a Range request.'],
39
+ 207: ['Multi-Status', 'Multiple independent status codes (WebDAV).'],
40
+ 208: ['Already Reported', 'Members already enumerated (WebDAV).'],
41
+ 226: ['IM Used', 'Response is the result of instance-manipulations.'],
42
+ 300: ['Multiple Choices', 'The request has more than one possible response.'],
43
+ 301: ['Moved Permanently', 'The resource has permanently moved to a new URL.'],
44
+ 302: ['Found', 'The resource is temporarily at a different URL.'],
45
+ 303: ['See Other', 'Get the resource at another URL with GET.'],
46
+ 304: ['Not Modified', 'The cached version is still valid.'],
47
+ 307: ['Temporary Redirect', 'Temporary redirect; keep the same method.'],
48
+ 308: ['Permanent Redirect', 'Permanent redirect; keep the same method.'],
49
+ 400: ['Bad Request', 'The server cannot process the request due to a client error.'],
50
+ 401: ['Unauthorized', 'Authentication is required and has failed or not been provided.'],
51
+ 402: ['Payment Required', 'Reserved for future/paid use.'],
52
+ 403: ['Forbidden', 'The server understood the request but refuses to authorize it.'],
53
+ 404: ['Not Found', 'The requested resource could not be found.'],
54
+ 405: ['Method Not Allowed', 'The HTTP method is not supported for this resource.'],
55
+ 406: ['Not Acceptable', 'No representation matches the Accept headers.'],
56
+ 407: ['Proxy Authentication Required', 'Authentication with the proxy is required.'],
57
+ 408: ['Request Timeout', 'The server timed out waiting for the request.'],
58
+ 409: ['Conflict', 'The request conflicts with the current state of the resource.'],
59
+ 410: ['Gone', 'The resource is permanently gone.'],
60
+ 411: ['Length Required', 'The Content-Length header is required.'],
61
+ 412: ['Precondition Failed', 'A precondition in the request headers failed.'],
62
+ 413: ['Content Too Large', 'The request body is larger than the server will process.'],
63
+ 414: ['URI Too Long', 'The request URI is longer than the server will interpret.'],
64
+ 415: ['Unsupported Media Type', 'The request media type is not supported.'],
65
+ 416: ['Range Not Satisfiable', 'The requested range cannot be fulfilled.'],
66
+ 417: ['Expectation Failed', 'The Expect header could not be met.'],
67
+ 418: ["I'm a teapot", 'An April Fools joke code (RFC 2324).'],
68
+ 421: ['Misdirected Request', 'The request was directed at a server that cannot respond.'],
69
+ 422: ['Unprocessable Content', 'The request is well-formed but semantically invalid.'],
70
+ 423: ['Locked', 'The resource is locked (WebDAV).'],
71
+ 424: ['Failed Dependency', 'The request failed due to a previous failed request (WebDAV).'],
72
+ 425: ['Too Early', 'The server is unwilling to risk processing a replayed request.'],
73
+ 426: ['Upgrade Required', 'The client should switch to a different protocol.'],
74
+ 428: ['Precondition Required', 'The origin requires the request to be conditional.'],
75
+ 429: ['Too Many Requests', 'The client has sent too many requests (rate limited).'],
76
+ 431: ['Request Header Fields Too Large', 'Header fields are too large.'],
77
+ 451: ['Unavailable For Legal Reasons', 'Access denied for legal reasons.'],
78
+ 500: ['Internal Server Error', 'A generic server error occurred.'],
79
+ 501: ['Not Implemented', 'The server does not support the functionality required.'],
80
+ 502: ['Bad Gateway', 'An upstream server returned an invalid response.'],
81
+ 503: ['Service Unavailable', 'The server is overloaded or down for maintenance.'],
82
+ 504: ['Gateway Timeout', 'An upstream server did not respond in time.'],
83
+ 505: ['HTTP Version Not Supported', 'The HTTP version is not supported.'],
84
+ 506: ['Variant Also Negotiates', 'A content-negotiation configuration error.'],
85
+ 507: ['Insufficient Storage', 'The server cannot store the representation (WebDAV).'],
86
+ 508: ['Loop Detected', 'An infinite loop was detected (WebDAV).'],
87
+ 510: ['Not Extended', 'Further extensions to the request are required.'],
88
+ 511: ['Network Authentication Required', 'The client must authenticate to gain network access.'],
89
+ };
90
+
91
+ function category(code: number): string {
92
+ return code < 200 ? 'Informational (1xx)' : code < 300 ? 'Success (2xx)' : code < 400 ? 'Redirection (3xx)' : code < 500 ? 'Client Error (4xx)' : 'Server Error (5xx)';
93
+ }
94
+
95
+ const tools: McpToolExport['tools'] = [
96
+ {
97
+ name: 'http_status',
98
+ description: 'Look up an HTTP status code (100-599): its reason phrase, category, and meaning. Keyless, offline.',
99
+ inputSchema: { type: 'object', properties: { code: { type: 'number', description: 'An HTTP status code, e.g. 404.' } }, required: ['code'] },
100
+ },
101
+ {
102
+ name: 'list_http_statuses',
103
+ description: 'List HTTP status codes, optionally filtered to a class (1, 2, 3, 4 or 5 for 1xx…5xx).',
104
+ inputSchema: { type: 'object', properties: { class: { type: 'number', description: 'Optional leading digit 1-5 to filter (e.g. 4 for 4xx).' } } },
105
+ },
106
+ ];
107
+
108
+ async function callTool(name: string, args: Record<string, unknown>): Promise<unknown> {
109
+ switch (name) {
110
+ case 'http_status': {
111
+ const code = typeof args.code === 'number' ? args.code : Number(args.code);
112
+ if (!Number.isInteger(code)) throw new Error('Required argument "code" must be a number, e.g. 404.');
113
+ const s = STATUS[code];
114
+ if (!s) return { code, known: false, category: code >= 100 && code < 600 ? category(code) : 'Invalid', reason: 'Not a standard registered status code.' };
115
+ return { code, known: true, name: s[0], category: category(code), description: s[1] };
116
+ }
117
+ case 'list_http_statuses': {
118
+ const cls = typeof args.class === 'number' ? args.class : undefined;
119
+ const rows = Object.entries(STATUS).map(([c, [n]]) => ({ code: +c, name: n, category: category(+c) })).filter((r) => cls === undefined || Math.floor(r.code / 100) === cls);
120
+ return { count: rows.length, statuses: rows };
121
+ }
122
+ default:
123
+ throw new Error(`Unknown tool: ${name}`);
124
+ }
125
+ }
126
+
127
+ export default { tools, callTool, meter: { credits: 1 } } 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
+ }