apikey-mcp-server
Click on "Install 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., "@apikey-mcp-serverfind customer by email john@doe.com"
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.
apikey-mcp-server
A fully-featured Model Context Protocol (MCP) server with API-key authentication, demonstrating realistic e-commerce tools, resources, and prompts. Built on the official @modelcontextprotocol/sdk.
Quick Start
npm install
npm run build
# Start with a custom key:
API_KEY=my-secret-key npm start
# Or start without setting API_KEY — uses default key "mcp-api-key-default":
npm startRelated MCP server: mcp-server-demo
Authentication
This server requires an API key passed via the x-api-key custom header for HTTP transport access. This is the industry-standard header used by Stripe, SendGrid, GitHub REST API, and many others.
If
API_KEYenv var is set: use that value as the key.If
API_KEYenv var is unset: a default keymcp-api-key-defaultis used, so the server is never wide open.stdio transport: No authentication required — stdio is launched as a local subprocess on a trusted machine.
The /health endpoint is not authenticated so load balancers and monitoring tools can probe it.
Transports
Streamable HTTP
# Start the server
API_KEY=my-secret-key npm start
# Health check (no auth required)
curl http://localhost:3000/health
# Initialize an MCP session
curl -X POST http://localhost:3000/mcp \
-H "Content-Type: application/json" \
-H "x-api-key: my-secret-key" \
-d '{"jsonrpc":"2.0","id":1,"method":"initialize","params":{"protocolVersion":"2026-07-28","capabilities":{},"clientInfo":{"name":"test","version":"1.0.0"}}}'stdio
npm run start:stdio
# Or: npx @modelcontextprotocol/inspector node dist/stdio.jsMCP Inspector
Transport:
Streamable HTTPURL:
http://localhost:3000/mcpCustom Header:
x-api-key = your-key-here
Configuration
Variable | Default | Description |
|
| API key for HTTP auth. Always falls back to this default if unset. |
|
| HTTP server port |
|
| Bind address (auto-switches to |
|
| Environment name |
|
| Max chars of request/response body to log |
MCP Capabilities
Tools (7)
Tool | Description |
| Search 25 customer records by name, email, or ID |
| Fetch full order details with line items, pricing, and tracking |
| Browse 30 products across 5 categories with text search and category filters |
| Estimate shipping cost by product weight and destination zone |
| Generate business reports: sales, customers, orders, inventory, or summary |
| Validate and standardize postal addresses with confidence scoring |
| Connectivity and health check with uptime info |
Resources (5)
URI | Description |
| Server configuration and feature flags (JSON) |
| Full product catalog — 30 products (JSON) |
| API documentation listing all capabilities (Markdown) |
| Individual customer record with order history (JSON) |
| Individual order record with line items and tracking (JSON) |
Prompts (4)
Prompt | Description |
| Generate a customer summary for support staff |
| Draft an order status email to a customer |
| Generate personalized product recommendations |
| Analyze business metrics and surface actionable insights |
Mock Data
All data is in-memory (no external database required):
25 customers across 4 tiers (bronze / silver / gold / platinum)
30 products across 5 categories (Electronics, Apparel, Home, Books, Sports)
30 orders across 5 statuses (pending, confirmed, shipped, delivered, cancelled)
4 shipping zones with weight-tiered rate tables
MCP Protocol Compatibility
Spec | Transport | Status |
Streamable HTTP | ✅ Primary | |
HTTP + SSE | ✅ Compatible |
Claude Desktop Configuration
Add to claude_desktop_config.json:
{
"mcpServers": {
"apikey-mcp-server": {
"command": "node",
"args": ["C:\\Users\\...\\apikey-mcp-server\\dist\\stdio.js"]
}
}
}Docker
docker build -t apikey-mcp-server .
docker run -p 8080:8080 -e API_KEY=my-secret-key apikey-mcp-serverScripts
Script | Description |
| Compile TypeScript to |
| Start HTTP server |
| Start stdio server |
| Watch mode (TypeScript compilation only) |
| Hot-reload HTTP server with tsx |
| Hot-reload stdio server with tsx |
| Launch MCP Inspector (stdio) |
| Build + run smoke test |
| Remove |
Project Structure
src/
├── server.ts # MCP server factory (createServer)
├── http.ts # Streamable HTTP transport + auth middleware
├── stdio.ts # Stdio transport entry point
├── auth.ts # API key validation (x-api-key header)
├── config.ts # Typed configuration loader (env vars)
├── data.ts # Mock data store (customers, products, orders, shipping)
├── tools.ts # 7 e-commerce tools
├── resources.ts # 5 resources (static + templated)
├── prompts.ts # 4 prompts
├── banner.ts # ANSI startup banner
└── logging.ts # Structured JSON logging with redaction
scripts/
└── smoke.mjs # stdio smoke testLicense
MIT
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Related MCP Servers
- Flicense-qualityDmaintenanceA Model Context Protocol server that enables AI assistants to interact with a complete e-commerce application, providing authentication, product browsing, and shopping cart management through standardized MCP tools.
- Flicense-qualityDmaintenanceExample MCP server built with FastMCP, demonstrating tools, resources, and prompts for AI integration.10
- Flicense-qualityCmaintenanceA proof of concept MCP server that gives AI agents business context for e-commerce operations including orders, inventory, logistics, returns, claims, and payments.
- Flicense-qualityBmaintenanceA beginner-friendly MCP server demonstrating custom Tools, Resources, and Prompts using FastMCP.
Related MCP Connectors
Hosted Amazon Seller and Vendor MCP server for Claude, ChatGPT, Cursor, Codex, Gemini, Copilot.
Hosted MCP endpoint with realistic fake data for prototyping agents. 12 tools, no setup.
MCP server for generating rough-draft project plans from natural-language prompts.
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/Shylendra/apikey-mcp-server'
If you have feedback or need assistance with the MCP directory API, please join our Discord server