http-mcp-server
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@http-mcp-serverecho 'hello'"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
MCP Mock HTTP
Mock HTTP server for MCP-style clients.
Quick path
Put
PORTandMCP_NAMEin.envat the repo root.Run
pnpm devorpnpm start.Open
http://localhost:<PORT>/healthor connect a client tohttp://localhost:<PORT>/mcp.
Related MCP server: MCP HTTP Server Demo
Runtime configuration
Source | Behavior |
| Loaded by |
Shell environment | Takes precedence over |
| Validates |
Variable | Default | Purpose |
|
| HTTP listen port |
|
| MCP server name and health payload name |
Tenant request configuration
Each MCP HTTP request can carry its own tenant API settings through headers:
Header | Example | Purpose |
|
| Base URL for the tenant API |
|
| Tenant PAT / bearer token |
Send both headers on each MCP request that needs tenant-aware tools. The server validates the headers per request and exposes the parsed config to tools through request context.
Mock tenant-aware tool
mock-api-ping is a safe stand-in for a real external integration.
Behavior | What you should see |
Valid | A JSON response with the tenant API URL, |
Missing or invalid tenant headers | A tool error with a clear header validation message. |
Secret token value | Never returned by the tool. |
Versioning
Source | Purpose |
| Single source of truth for the server version |
| Runtime accessor used by the MCP server and tests |
| Repository-level release tracking |
When reusing this repository as a base for another MCP server, update the package version and add a changelog entry before the first release.
Requirements
Node.js 26.0.0
pnpm
Install
pnpm installRun
pnpm devThe server bootstrap loads .env automatically, so local values apply without exporting them in the shell.
Build
pnpm buildDocker
Build the production image:
docker build -t mcp-server .Run it with runtime environment variables:
docker run --rm -p 3000:3000 --env-file .env mcp-serverOverride values at runtime when needed:
docker run --rm -p 3000:3000 -e PORT=8080 -e MCP_NAME=my-mcp mcp-serverThe image does not contain your .env file. That keeps secrets out of the image while still letting the server read .env-style values if you provide them at runtime.
Quality checks
pnpm typecheck
pnpm lint
pnpm test
pnpm coverage
pnpm formatpnpm coverage runs Vitest with the v8 coverage provider and prints a coverage summary in the terminal.
Endpoints
GET /health— JSON health response withok,name, anduptime./mcp*— MCP streamable HTTP transport handled by the SDK bridge.mock-api-ping— mock tenant-aware tool that verifies request-scoped tenant config without calling an external API.
MCP Inspector
Use the Inspector as a client against the running HTTP server:
Start this project.
Launch the Inspector:
npx @modelcontextprotocol/inspectorIn the Inspector, choose the Streamable HTTP transport and connect to
http://localhost:<PORT>/mcp.Verify the connection by listing tools or calling one of the registered tools.
Project structure
src/server.ts— process bootstrap onlysrc/app.ts— HTTP server composition and routingsrc/config/env.ts— environment parsing and validationsrc/http/routes/health.ts— health route handlersrc/mcp/create-server.ts— MCP server construction and tool registrationsrc/mcp/request-config.ts— request-scoped tenant config extraction and lookup helperssrc/version.ts— runtime version resolution frompackage.jsonsrc/mcp/tools/echo.ts— echo tool registrationsrc/mcp/tools/mock-api-ping.ts— mock tenant-aware toolsrc/mcp/tools/time.ts— time tool registrationsrc/mcp/transport.ts— Node HTTP to MCP transport bridge
This server cannot be deployed
Maintenance
Related MCP Connectors
Minimal streamable HTTP MCP server used for owned-account registry connectivity tests.
Remote MCP server exposing SMI Aware tools, resources, and skills over Streamable HTTP.
Model Context Protocol server for the Apideck Unified API. Connect any MCP-compatible agent framework to 100+ accounting systems, HRIS platforms, file storage providers, and more through one integration. More information https://www.apideck.com/mcp-server
Host your MCP tool over streamable HTTP in one command.
Related MCP Servers
- AlicenseBqualityDmaintenanceA mock MCP server for testing MCP client implementations and development workflows. Supports tools, prompts, and resources across multiple transport protocols (stdio, HTTP, SSE).1MIT
- FlicenseNot gradedqualityDmaintenanceA minimal Model Context Protocol (MCP) server that uses streamable HTTP transport to provide demo tools for calculations, notes, and time. It serves as a standalone example for testing MCP connectivity and gateway registration through a standard HTTP endpoint.-
- FlicenseNot gradedqualityDmaintenanceA minimal MCP server offering a hello_world tool that returns a greeting and current UTC time via streamable HTTP.-
- FlicenseNot gradedqualityCmaintenanceMCP server providing time retrieval and echo tools, running as an independent network process over Streamable HTTP.-