Overview
What is MCP TypeScript Server Starter?
A starter project for building Model Context Protocol (MCP) servers in TypeScript. It includes a simple echo server that demonstrates tools, resources, and prompts, and supports both STDIO and SSE communication modes.
How to use MCP TypeScript Server Starter?
Clone the repository, install dependencies with pnpm install, and run pnpm dev to start the development server with an inspector at http://localhost:6274. To switch between STDIO and SSE modes, comment/uncomment the corresponding code blocks in src/index.ts. Deploy with Docker or Coolify, and connect via npx -y mcp-remote https://your-domain.com/sse.
Key features of MCP TypeScript Server Starter
- Simple echo server with tool, resource, and prompt implementations
- Supports STDIO (local) and SSE (remote) communication
- Built-in web inspector for testing and debugging
- Hot-reloading development server
- TypeScript type safety and modern tooling
- Easy deployment to Coolify and other platforms
Use cases of MCP TypeScript Server Starter
- Quickly prototype and test an MCP server locally
- Integrate an echo server with Cursor or Claude Desktop
- Deploy a production‑ready MCP server via SSE for remote access
- Use as a reference for building custom tools, resources, or prompts
- Experiment with MCP debugging and environment variable handling
FAQ from MCP TypeScript Server Starter
What is the difference between STDIO and SSE modes?
STDIO mode uses direct process communication and is ideal for local development with tools like Cursor or Claude Desktop. SSE mode uses HTTP/SSE and is better for production deployments and remote access.
What are the prerequisites?
Node.js v16 or later and pnpm (or npm) are required.
How do I test the server locally?
Run pnpm dev, open the inspector at http://localhost:6274, click “Connect”, go to “Tools”, “List Tools”, select “echo”, write a message, and submit.
How do I deploy to Coolify?
Disable GZIP compression, ensure port 3001 is exposed, and set the domain with :3001 suffix (e.g. https://subdomain.yourdomain.com:3001). Then connect clients with npx -y mcp-remote https://subdomain.yourdomain.com/sse.
How do I add custom tools, resources, or prompts?
Edit src/index.ts — the file contains commented examples for adding tools (functions your AI can call), resources (data your AI can access), and prompts (templates for AI interactions).