mcp-starter-kit
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., "@mcp-starter-kit search for documents about climate change"
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.
Production-Ready MCP Server Boilerplate
Ship reliable MCP servers in minutes, not days. A production-ready foundation for building Model Context Protocol servers with built-in security, authentication, and observability.
This is a starter template β not a finished product. You are responsible for reviewing and securing any code before production use.
Don't build from scratch. This kit solves the "boring" parts of MCP server developmentβtransport management, error handling, and security boundariesβso you can focus on your tool's logic.
Works with Claude Code, Cursor, Windsurf, and any MCP-compatible client.
π Why this boilerplate?
Most MCP tutorials show you a "toy" server. This repo gives you a production-grade foundation.
π‘οΈ Secure by Design
SSRF Protection: Blocks requests to private/internal networks (IPv4 + IPv6), including cloud metadata endpoints (
169.254.169.254). DNS resolution is checked to prevent rebinding.JWT Security: Algorithm validation rejects
alg:none, HS384, and RS256 downgrade attacks. Expiry and tampering are verified with constant-time comparison.HMAC-SHA256 Webhook Signatures: Outbound webhooks are signed with
X-Webhook-Signaturewhen a secret is configured.DNS Rebinding Protection: HTTP transport validates
Hostheader against an allowlist.Sandboxed File Access: Prevents AI from reading/writing outside allowed directories, with symlink escape detection.
Strict Input Validation: All tool inputs are validated with Zod schemas.
Injection Protection: SQLite queries use strict parameter binding.
Security tested: 30+ security-focused test cases covering OWASP top threats (SSRF, injection, path traversal, auth bypass).
π Built for Real Projects
Authentication: Built-in strategies for API Key and JWT (configurable per env).
Rate Limiting: Token bucket algorithm to prevent abuse.
Observability: Structured JSON logging (via
pino) ready for CloudWatch/Datadog.
β‘ Developer Experience (DX)
Type-Safe:
strict: trueTypeScript configuration, ESM, fully typed.Testing: 228 tests (unit, integration, and E2E) with Vitest, including 30+ security-focused cases.
Dockerized: Multi-stage Dockerfile for immediate deployment.
Related MCP server: mcp-server-toolkit
π¦ What's Included
Feature | This Boilerplate | Basic Tutorials |
Transport | HTTP (SSE) + Stdio | Stdio only |
Validation | Zod Schemas | Manual / None |
Logging | Structured JSON |
|
Error Handling | Graceful + MCP Codes | Process crash |
CI/CD | GitHub Actions | None |
Reference Implementations
Includes 6 fully-typed tools to copy-paste patterns from:
database-query: Secure SQLite operations.api-connector: Fetch data from external REST APIs.file-manager: Safe file system operations (5 sub-tools).cache-store: TTL-based key-value cache with namespaces (5 sub-tools).semantic-search: Local RAG with embeddings (3 tools + 2 resources + 1 prompt).webhook-notifier: Async webhook delivery with task tracking (4 tools + 2 resources + 1 prompt).
π Quick Start
Prerequisites
Node.js 22+
WSL2 users: Use Node.js installed inside WSL, not Windows. See Troubleshooting.
npm 9+
1. Setup
git clone <your-repo-url> my-mcp-server
cd my-mcp-server
npm install2. Configure Environment
cp .env.example .env
# Edit .env if needed β defaults work out of the box3. Seed Sample Database
npm run db:seed # Populates local SQLite for testingNote: If the server is already running, restart it after seeding to pick up the new database.
4. Build
npm run build # Compiles TypeScript to dist/5. Run Development Server
npm run dev
# Starts server in hot-reload mode6. Verify with Inspector
npm run inspector
# Opens interactive debugger in your browser (uses dist/index.js)π§ Connecting to Clients
Claude Code
Copy the example config to your project root:
cp .mcp.json.example .mcp.json
# Edit paths in .mcp.json to match your setupOr add manually to your .mcp.json:
{
"mcpServers": {
"mcp-starter-kit": {
"command": "node",
"args": ["dist/index.js"],
"env": {
"LOG_LEVEL": "info",
"DB_PATH": "./data/sample.db",
"SANDBOX_ROOT": "./data/sandbox"
}
}
}
}Claude Desktop
Add to your claude_desktop_config.json:
{
"mcpServers": {
"my-production-server": {
"command": "node",
"args": ["/absolute/path/to/my-mcp-server/dist/index.js"]
}
}
}Cursor, Windsurf, & Others
See docs/SETUP.md for detailed connection guides.
π Project Architecture
Designed for scalability:
mcp-starter-kit/
βββ src/
β βββ index.ts # Entry point
β βββ server.ts # Central MCP registry
β βββ config/env.ts # Environment variable validation (Zod)
β βββ tools/
β β βββ database-query/ # SQLite CRUD tool
β β βββ api-connector/ # REST API tool
β β βββ file-manager/ # Sandboxed file operations tool
β β βββ cache-store/ # TTL-based key-value cache
β β βββ semantic-search/ # Local RAG with embeddings
β β βββ webhook-notifier/ # Async webhook delivery
β βββ lib/ # Shared utilities (Logger, Guardrails)
β βββ middleware/ # Auth & rate limiting
β βββ transport/ # stdio and HTTP transports
βββ tests/ # Integration tests & helpers
βββ scripts/ # CLI tools (db:seed, create-tool)
βββ docs/ # Detailed documentation
βββ docker/ # Dockerfile & docker-compose
βββ data/ # Sample DB & sandbox directoryπ Documentation
Document | Description |
Detailed setup, environment variables, client configuration | |
Step-by-step guide to creating new tools | |
Deploy via npm, Docker, or cloud services | |
Design decisions, security model, and data flow | |
Common errors and solutions | |
Test suite organization, writing tests, security checklist | |
Security policy, vulnerability reporting, feature inventory |
π οΈ Scripts
Command | Description |
| Start with hot-reload (tsx watch) |
| Build to |
| Run built server (stdio) |
| Run built server (HTTP) |
| Run all tests |
| Lint with ESLint |
| Type-check with tsc |
| Open MCP Inspector |
| Seed sample SQLite database |
| Scaffold a new tool |
| Run tests with coverage report |
License
MIT Β© 2026 Edge Craft Studio
Not affiliated with, endorsed by, or certified by Anthropic or the Agentic AI Foundation.
Available Tools
15 toolsapi-connectorA
Make HTTP requests to any REST API with custom headers, JSON body, retry, and configurable timeout. Returns the response status, headers, and body.
Inputs: url (required), body, method, headers, +3 more.
cacheC
Key-value cache with TTL and namespaces. Operations: set, get, delete, list, clear.
Inputs: operation (required), key, value, namespace, +1 more.
database-queryA
Execute SQL queries against a SQLite database (SELECT, INSERT, UPDATE, DELETE). Use operation 'list-tables' to discover available tables. Mutation queries require 'allow_mutation: true' for safety.
Inputs: operation (required), sql, params, allow_mutation, +1 more.
file_infoA
Get metadata about a file or directory including size, modification date, and permissions.
Inputs: path (required).
file_listA
List entries in a directory. Returns files and subdirectories sorted with directories first.
Inputs: path.
file_readA
Read the contents of a text file. The path must be relative to the sandbox base directory.
Inputs: path (required), encoding.
file_searchA
Search for files matching a glob pattern (e.g. '**/*.ts'). Returns relative paths within the sandbox.
Inputs: pattern (required).
file_writeA
Write content to a text file. Creates parent directories if needed. Set overwrite to true to replace existing files.
Inputs: path (required), content (required), overwrite.
semantic_clearA
Clear all indexed documents from a collection. This action is irreversible.
Inputs: collection (required).
semantic_indexA
Index a document into a collection for semantic search. Text is automatically chunked and embedded using a local ML model (no API calls). Use document_id to replace an existing document.
Inputs: document (required), collection (required), metadata, document_id.
semantic_searchA
Search a collection for documents semantically similar to a query. Returns top-k results ranked by cosine similarity. The collection must have been indexed first with semantic_index.
Inputs: query (required), collection (required), top_k, min_score.
task_createB
Create an async task for tracking long-running operations. Tasks have a TTL and can optionally trigger webhook notifications on status changes.
Inputs: name (required), metadata, description, ttl_seconds, +1 more.
task_statusA
Get the current status of an async task, or update its status. Supports status transitions: pending->running, running->completed/failed. When a task reaches a terminal state, its configured webhook event is fired.
Inputs: task_id (required), result, update_status.
webhook_registerA
Register a webhook callback URL to receive event notifications. Specify the URL, event types to subscribe to, and an optional HMAC secret for signature verification.
Inputs: url (required), event_types (required), active, secret, +1 more.
webhook_sendA
Send a notification to all registered webhooks matching the event type. Supports idempotency keys to prevent duplicate deliveries and HMAC-SHA256 signatures.
Inputs: event_type (required), payload, idempotency_key.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelogβ¦
TDQS
Scored across 15 tools
Each tool targets a distinct resource and action, with clear boundaries between file, database, cache, semantic, webhook, and task operations. The only minor overlap is task_status handling both get and update, but the description clearly separates these behaviors, so no two tools appear to do the same thing.
Naming conventions are mixed: some tools use hyphens (database-query, api-connector), others use underscores (file_read, task_status), and one is a single word (cache). The word order is also inconsistent, with most tools using noun_verb (file_read) but api-connector using a noun-noun pattern, and no uniform separator across the set.
With 15 tools, the server sits at the upper boundary of a reasonable scope for a starter kit. Each tool covers a distinct capability, but the sheer variety (files, database, cache, semantic search, webhooks, tasks) makes it feel slightly broad, yet still justifiable for its purpose.
The tool surface covers core operations for each domain, but there are notable gaps: no file_delete or file_rename, no webhook_unregister, and no task_cancel or task_delete. These are common lifecycle operations that agents would likely need, making the set somewhat incomplete.
Maintenance
Related MCP Connectors
Zero-log MCP server with 49 tools for AI guardrails, secret scanning, MCP linting & EU compliance.
491MCP server for your apps' tools and custom tools, plus hosted AI agents and approval-gated workflows
A full backend your AI coding agent can set up over MCP
MCP server for secureFlows: token-free URL builders and integration-linting tools for AI agents.
Related MCP Servers
- AlicenseNot gradedqualityDmaintenanceA production-grade MCP server and client implementation with comprehensive features including structured logging, health checks, metrics, authentication, and RAG capabilities with PostgreSQL vector search. Supports both stdio and SSE transports with containerization and security features for enterprise deployment.MIT
- AlicenseNot gradedqualityDmaintenanceProduction-ready MCP server starter with authentication, observability, and a plugin system for building and deploying MCP servers quickly.MIT
- AlicenseNot gradedqualityDmaintenanceA production-grade MCP server designed for multi-tenant, authenticated, and observable AI agent systems, enabling secure tool execution across heterogeneous data sources.67MIT
- AlicenseNot gradedqualityDmaintenanceA production-ready MCP server template that connects LLMs and AI agents to external data, tools, and services with built-in OAuth 2.1 authentication, Redis-backed session management, and a modular tools engine.1MIT