req-mcp-server
A Bun-based MCP server providing a persistent HTTP request toolset for testing and inspecting JSON APIs. It supports session-aware operations, including cookie persistence, automatic bearer token reuse, and configurable base URLs.
README
req-mcp-server
req-mcp-server is a Bun-based MCP server that provides a persistent HTTP request toolset for testing and inspecting APIs.
It exposes a small set of MCP tools for setting a base URL, sending requests, reusing bearer auth across calls, and resetting request session state.
What it does
- serves an MCP endpoint over HTTP using Hono
- maintains per-session request state
- persists cookies within a session
- can automatically capture and reuse bearer tokens from login responses
- supports JSON request bodies and custom headers for standard API workflows
Exposed tools
The server registers four MCP tools:
new_request_session— clears cookies and stored authget_request_base— returns the current API base URLset_request_base— sets the API base URL used for later callssend_request— sends an HTTP request through the active session
send_request is the main operational tool. The other three manage session state.
Runtime behavior
- MCP transport endpoint:
/mcp - health endpoint:
/health - default port:
9797 - configurable via
MCP_PORT
Each MCP session gets its own request client. Cookies are preserved across requests in that session, and bearer auth is reused when a successful response body includes an access_token field.
Requirements
Install
bun install
Run locally
bun run src/mcp.ts
Once started, the server is available at:
http://localhost:9797/healthhttp://localhost:9797/mcp
If you want a different port:
MCP_PORT=8080 bun run src/mcp.ts
Docker
Build and run with Docker Compose:
docker compose up --build
The container exposes port 9797 and starts the same MCP server entrypoint.
Request model
send_request accepts:
endpoint— request path such as/api/auth/memethod— HTTP method such asGETorPOSTuseStoredAuth— whether to attach the stored bearer tokenheaders— optional string-to-string headersbody— optional JSON object body
Current behavior is designed for standard JSON API traffic. Multipart uploads, binary payloads, and non-object request bodies are not the primary target of this server.
Project structure
src/
mcp.ts MCP server and HTTP transport
xrest.ts session-aware request client
utils.ts small string utility helpers
skills/
request-api-tool/ companion skill guidance for using the MCP tools
Development notes
- built with Bun and TypeScript
- HTTP server implemented with Hono
- request execution uses
impit - cookie persistence uses
tough-cookie
Health check
curl http://localhost:9797/health
Expected response:
{"status":"ok"}
Recommended Servers
playwright-mcp
A Model Context Protocol server that enables LLMs to interact with web pages through structured accessibility snapshots without requiring vision models or screenshots.
Magic Component Platform (MCP)
An AI-powered tool that generates modern UI components from natural language descriptions, integrating with popular IDEs to streamline UI development workflow.
Audiense Insights MCP Server
Enables interaction with Audiense Insights accounts via the Model Context Protocol, facilitating the extraction and analysis of marketing insights and audience data including demographics, behavior, and influencer engagement.
VeyraX MCP
Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.
graphlit-mcp-server
The Model Context Protocol (MCP) Server enables integration between MCP clients and the Graphlit service. Ingest anything from Slack to Gmail to podcast feeds, in addition to web crawling, into a Graphlit project - and then retrieve relevant contents from the MCP client.
Kagi MCP Server
An MCP server that integrates Kagi search capabilities with Claude AI, enabling Claude to perform real-time web searches when answering questions that require up-to-date information.
E2B
Using MCP to run code via e2b.
Neon Database
MCP server for interacting with Neon Management API and databases
Exa Search
A Model Context Protocol (MCP) server lets AI assistants like Claude use the Exa AI Search API for web searches. This setup allows AI models to get real-time web information in a safe and controlled way.
Qdrant Server
This repository is an example of how to create a MCP server for Qdrant, a vector search engine.