Bootstrap MCP Server
A minimal MCP (Model Context Protocol) server template with hot reload support for development.
Features
- Hot Reload Proxy: Maintains connection with Claude while allowing server restarts
- Common Tool Patterns: Example implementations of typical MCP tools
- TypeScript Support: Full TypeScript with strict type checking
- Fast Build System: Uses esbuild for quick compilation
- Development Ready: Configured with ESLint and Prettier
Quick Start
Install dependencies:
pnpm install
Build the project:
pnpm run build
Start the MCP server:
./start_mcp.sh
To reload the server during development:
./reload_mcp.sh
Project Structure
bootstrap_mcp/
├── src/
│ ├── server.ts # Main MCP server implementation
│ └── proxy.ts # Hot reload proxy
├── dist/ # Compiled JavaScript output
├── build.mjs # Build configuration
├── tsconfig.json # TypeScript configuration
├── package.json # Project dependencies
├── start_mcp.sh # Start script with proxy
└── reload_mcp.sh # Reload script for development
Available Tools
The bootstrap includes three example tools:
- hello_world: Simple greeting tool
- echo: Echo back messages
- get_time: Get current timestamp
Development Workflow
- Make changes to
src/server.ts
- Run
./reload_mcp.sh
to rebuild and restart - The proxy maintains the Claude connection during restart
- Check
/tmp/bootstrap-mcp-debug.log
for debugging
Adding New Tools
- Add tool definition to
TOOLS
array inserver.ts
- Implement handler method in
BootstrapMCPServer
class - Add case in
CallToolRequestSchema
handler - Reload the server
Scripts
pnpm run dev
: Development mode with tsx watchpnpm run build
: Build TypeScript to JavaScriptpnpm run typecheck
: Type checking onlypnpm run lint
: Run ESLintpnpm run format
: Format code with Prettier
Requirements
- Node.js v24+
- pnpm package manager