Templatesxmcp TypeScript Starter
xmcp TypeScript Starter
Baseline xmcp template with typed tools, prompts, and resources using HTTP transport.
A minimal MCP server with tools, prompts, and resources using TypeScript and HTTP transport.
Features
- File-based routing for tools, prompts, and resources
- Zod schema validation for all inputs
- Type-safe with
InferSchemautility - HTTP and STDIO transport support
- Auto-discovery of tools, prompts, and resources from directories
Getting Started
1. Create the project
2. Install & run
The MCP server will start with HTTP transport at http://localhost:3001.
Project Structure
Adding Tools
Create a new .ts file in src/tools/:
The tool is automatically discovered and registered.
Adding Prompts
Create a new .ts file in src/prompts/:
Adding Resources
Create a new .ts file in src/resources/. Use folder structure to define the URI — for example, (users)/[userId]/profile.ts maps to users://{userId}/profile.
Deploy
Build for production:
Run the compiled server:

