{"_id":"@anushibinj/fetch-mcp","_rev":"2-46f1d49ce65e4b4e0187a02ad9f5930b","name":"@anushibinj/fetch-mcp","dist-tags":{"latest":"1.0.1"},"versions":{"1.0.0":{"name":"@anushibinj/fetch-mcp","version":"1.0.0","_id":"@anushibinj/fetch-mcp@1.0.0","maintainers":[{"name":"anushibinj","email":"anushibin007@gmail.com"}],"bin":{"fetch-mcp":"dist/index.js"},"dist":{"shasum":"686a8af5e0a443f9d8a25aa06a27680ebfffc8c5","tarball":"https://registry.npmjs.org/@anushibinj/fetch-mcp/-/fetch-mcp-1.0.0.tgz","fileCount":12,"integrity":"sha512-pX2bWqG4Oo+RQ3GBqsO3YppgUAPDaQT5ADFZ4lXlGrkwqFWs6n+xnlHkYcZzda7cK9xMhd7PlJ8iuqKDMFc1BA==","signatures":[{"sig":"MEUCIHKdkr2HiDWjLZqY+7q/OTkA117Zw1SCeAzHJbUCHLa3AiEA2t4cl0qqa5N2qM7r3oFBuFlv9/cug6GJm6tN0j+zkis=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":26379},"main":"dist/index.js","type":"module","types":"./dist/index.d.ts","engines":{"node":">=18.0.0"},"gitHead":"5e91e92ac8c0c6eaa7a35770b292fa98b844e556","scripts":{"dev":"tsx src/index.ts","test":"npm run build","build":"tsc","start":"node dist/index.js","dev:http":"tsx src/index.ts --transport=http","start:http":"node dist/index.js --transport=http"},"_npmUser":{"name":"anushibinj","email":"anushibin007@gmail.com"},"_npmVersion":"10.9.7","description":"MCP server for making HTTP requests via the built-in fetch API","directories":{},"_nodeVersion":"22.22.2","dependencies":{"zod":"^3.25.0","express":"^4.21.0","@modelcontextprotocol/sdk":"^1.29.0"},"_hasShrinkwrap":false,"devDependencies":{"tsx":"^4.0.0","typescript":"^5.7.0","@types/node":"^22.0.0","@types/express":"^5.0.0"},"_npmOperationalInternal":{"tmp":"tmp/fetch-mcp_1.0.0_1775628928481_0.5890868952259063","host":"s3://npm-registry-packages-npm-production"}},"1.0.1":{"name":"@anushibinj/fetch-mcp","version":"1.0.1","description":"MCP server for making HTTP requests via the built-in fetch API","type":"module","main":"dist/index.js","bin":{"fetch-mcp":"dist/index.js"},"scripts":{"build":"tsc","prepublishOnly":"npm run build","test":"npm run build","start":"node dist/index.js","start:http":"node dist/index.js --transport=http","dev":"tsx src/index.ts","dev:http":"tsx src/index.ts --transport=http"},"dependencies":{"@modelcontextprotocol/sdk":"^1.29.0","express":"^4.21.0","zod":"^3.25.0"},"devDependencies":{"@types/express":"^5.0.0","@types/node":"^22.0.0","tsx":"^4.0.0","typescript":"^5.7.0"},"engines":{"node":">=18.0.0"},"_id":"@anushibinj/fetch-mcp@1.0.1","gitHead":"47306446fed2363115889c008d8361f7b0e801f4","types":"./dist/index.d.ts","_nodeVersion":"22.22.2","_npmVersion":"10.9.7","dist":{"integrity":"sha512-G6V8twV+6y332+tck/P3NRGn4nbZhLQli/Sozdx5/LACPRVTeluOBeDTXaBXnhLfN/NUNXzw5PCClm9t2ZU/gQ==","shasum":"2d6be525e370ff4859f209db6bc1e00d3f5a8c51","tarball":"https://registry.npmjs.org/@anushibinj/fetch-mcp/-/fetch-mcp-1.0.1.tgz","fileCount":6,"unpackedSize":13846,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCICh83+rjWmBBVrU5f5pQqLvLSgo/m5B2mrboB36b0FQ6AiEA+XkiBUN8JIYoTKA7RYKPZ8xpiblMo00A4sXtcKlrByw="}]},"_npmUser":{"name":"anushibinj","email":"anushibin007@gmail.com"},"directories":{},"maintainers":[{"name":"anushibinj","email":"anushibin007@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/fetch-mcp_1.0.1_1775641752272_0.6589354102332909"},"_hasShrinkwrap":false}},"time":{"created":"2026-04-08T06:15:28.372Z","modified":"2026-04-08T09:49:12.515Z","1.0.0":"2026-04-08T06:15:28.614Z","1.0.1":"2026-04-08T09:49:12.400Z"},"description":"MCP server for making HTTP requests via the built-in fetch API","maintainers":[{"name":"anushibinj","email":"anushibin007@gmail.com"}],"readme":"# fetch-mcp\n\nAn MCP server that makes HTTP requests. Describe what you want in natural language — the AI translates it into the right method, headers, body, and auth parameters and executes it via Node's built-in `fetch`.\n\n## Requirements\n\n- Node.js 18+\n\n## Running from npm\n\nNo installation needed — run directly via `npx`:\n\n```bash\nnpx @anushibinj/fetch-mcp\n```\n\nFor HTTP / Streamable HTTP transport:\n\n```bash\nnpx @anushibinj/fetch-mcp --transport=http\n# optionally: --port=3000 (default)\n```\n\nThe server listens at `http://localhost:3000/mcp`.\n\n---\n\n## Local Development\n\n### Installation\n\n```bash\nnpm install\nnpm run build\n```\n\n### Usage\n\n#### stdio\n\n```bash\nnode dist/index.js\n```\n\n#### HTTP / Streamable HTTP (remote)\n\n```bash\nnode dist/index.js --transport=http\n# optionally: --port=3000 (default)\n```\n\nThe server listens at `http://localhost:3000/mcp`.\n\n---\n\n## Adding to an MCP client\n\n### VS Code (GitHub Copilot)\n\n**Per-workspace** — create `.vscode/mcp.json` in your project:\n\nUsing npm (recommended):\n```json\n{\n  \"servers\": {\n    \"fetch-mcp\": {\n      \"type\": \"stdio\",\n      \"command\": \"npx\",\n      \"args\": [\"-y\", \"@anushibinj/fetch-mcp\"]\n    }\n  }\n}\n```\n\nUsing a local build:\n```json\n{\n  \"servers\": {\n    \"fetch-mcp\": {\n      \"type\": \"stdio\",\n      \"command\": \"node\",\n      \"args\": [\"/absolute/path/to/fetch-mcp/dist/index.js\"]\n    }\n  }\n}\n```\n\n**Global** — add to User Settings (`Ctrl+Shift+P` → \"Open User Settings JSON\"):\n\nUsing npm (recommended):\n```json\n\"mcp\": {\n  \"servers\": {\n    \"fetch-mcp\": {\n      \"type\": \"stdio\",\n      \"command\": \"npx\",\n      \"args\": [\"-y\", \"@anushibinj/fetch-mcp\"]\n    }\n  }\n}\n```\n\nUsing a local build:\n```json\n\"mcp\": {\n  \"servers\": {\n    \"fetch-mcp\": {\n      \"type\": \"stdio\",\n      \"command\": \"node\",\n      \"args\": [\"/absolute/path/to/fetch-mcp/dist/index.js\"]\n    }\n  }\n}\n```\n\n### Claude Desktop\n\nEdit `%APPDATA%\\Claude\\claude_desktop_config.json` (macOS: `~/Library/Application Support/Claude/`):\n\nUsing npm (recommended):\n```json\n{\n  \"mcpServers\": {\n    \"fetch-mcp\": {\n      \"command\": \"npx\",\n      \"args\": [\"-y\", \"@anushibinj/fetch-mcp\"]\n    }\n  }\n}\n```\n\nUsing a local build:\n```json\n{\n  \"mcpServers\": {\n    \"fetch-mcp\": {\n      \"command\": \"node\",\n      \"args\": [\"/absolute/path/to/fetch-mcp/dist/index.js\"]\n    }\n  }\n}\n```\n\nRestart Claude Desktop after saving.\n\n---\n\n## The `http_request` tool\n\nThe server exposes a single tool: **`http_request`**.\n\n| Parameter | Type | Required | Description |\n|---|---|---|---|\n| `url` | string | ✅ | Target URL |\n| `method` | string | | `GET`, `POST`, `PUT`, `PATCH`, `DELETE`, `HEAD`, `OPTIONS` (default: `GET`) |\n| `headers` | object | | Key-value request headers |\n| `body` | string | | Request body — raw string, JSON, form data, etc. Ignored for GET/HEAD |\n| `contentType` | string | | Shorthand for `Content-Type` header (e.g. `application/json`) |\n| `auth` | object | | Authentication — see below |\n| `timeout` | number | | Timeout in milliseconds (default: `30000`) |\n| `followRedirects` | boolean | | Follow HTTP redirects (default: `true`) |\n\n### `auth` object\n\n```json\n{ \"type\": \"bearer\", \"token\": \"my-api-token\" }\n{ \"type\": \"basic\",  \"username\": \"alice\", \"password\": \"secret\" }\n```\n\n### Response format\n\nThe tool returns a plain-text block:\n\n```\nHTTP 200 OK\nDuration: 312ms\n\n--- Response Headers ---\ncontent-type: application/json\n...\n\n--- Response Body ---\n{ ... }\n```\n\n- Non-2xx responses are returned with `isError: true` so the model can self-correct\n- Bodies larger than 50KB are automatically truncated\n\n---\n\n## Example prompts\n\nOnce connected to an MCP client, you can ask naturally:\n\n- *\"GET https://api.github.com/repos/nodejs/node\"*\n- *\"POST to https://httpbin.org/post with JSON body `{\"name\": \"test\"}` and Content-Type application/json\"*\n- *\"Fetch https://api.example.com/data with Bearer token abc123\"*\n- *\"Send a DELETE request to https://api.example.com/items/42 with basic auth user:pass\"*\n- *\"Hit https://httpbin.org/delay/2 with a 5 second timeout\"*\n\n## Development\n\n```bash\nnpm run dev          # run with tsx (no build needed), stdio\nnpm run dev:http     # run with tsx, HTTP transport\nnpm run build        # compile TypeScript → dist/\nnpm start            # run compiled, stdio\nnpm run start:http   # run compiled, HTTP transport\n```\n","readmeFilename":"README.md"}