The server provides integration with ESLint through development scripts, allowing for linting and automatic fixing of code issues during development.
Provides GitHub integration for issue tracking and contributions, allowing users to report problems and contribute through pull requests.
Integrates with npm for package management, installation of dependencies, and running scripts for development, building, and linting.
Built with full TypeScript support, offering type safety, strict type checking, and a strongly-typed interface for creating MCP tools and resources.
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., "@MCP Server TypeScript Boilerplateshow me the example tools available"
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.
MCP Server TypeScript Boilerplate
A clean, reusable TypeScript boilerplate for building Model Context Protocol (MCP) servers.
Features
Clean Architecture: Modular design with clear separation of concerns
Type Safety: Full TypeScript support with strict type checking
Easy Configuration: Simple configuration object for tools and resources
Built-in Examples: Sample tools and resources to get you started
Error Handling: Comprehensive error handling with meaningful messages
Graceful Shutdown: Proper cleanup on process termination
Development Ready: Hot reload and debugging support
Related MCP server: MCP Server Template
Quick Start
Installation
npm installDevelopment
npm run devBuild
npm run build
npm startUsage
Adding Custom Tools
Tools are functions that can be called by MCP clients. Add them to the tools array in your server configuration:
const customTool: ToolHandler = {
name: "my_custom_tool",
description: "Description of what this tool does",
inputSchema: {
type: "object",
properties: {
param1: {
type: "string",
description: "Parameter description",
},
},
required: ["param1"],
},
handler: async (args: { param1: string }) => {
// Your tool logic here
return `Processed: ${args.param1}`;
},
};Adding Custom Resources
Resources are static or dynamic content that can be read by MCP clients:
const customResource: ResourceHandler = {
uri: "custom://my-resource",
name: "My Custom Resource",
description: "Description of this resource",
mimeType: "application/json",
handler: async () => {
// Your resource logic here
return JSON.stringify({ data: "example" });
},
};Configuration
Modify the serverConfig object to customize your server:
const serverConfig: ServerConfig = {
name: "my-mcp-server",
version: "1.0.0",
description: "My custom MCP server",
tools: [customTool, ...exampleTools],
resources: [customResource, ...exampleResources],
};Project Structure
├── src/
│ └── index.ts # Main server implementation
├── dist/ # Compiled JavaScript (generated)
├── package.json # Dependencies and scripts
├── tsconfig.json # TypeScript configuration
└── README.md # This fileExample Tools
The boilerplate includes several example tools:
echo: Echo back input messages
add_numbers: Add two numbers together
current_time: Get current time in various formats
Example Resources
info://server/status: Server status and runtime information
info://server/config: Server configuration details
Development
Scripts
npm run dev- Start development server with hot reloadnpm run build- Build for productionnpm start- Start production servernpm run clean- Clean build artifactsnpm run lint- Run ESLintnpm run lint:fix- Fix ESLint issues
Testing Your Server
You can test your MCP server using any MCP client. The server communicates via stdio, so you can also test it directly:
echo '{"jsonrpc": "2.0", "id": 1, "method": "tools/list", "params": {}}' | node dist/index.jsDeployment
As a Standalone Application
npm run build
node dist/index.jsAs a Library
You can also use this as a library in other projects:
import { MCPServer, ToolHandler, ResourceHandler } from './src/index.js';
const myTools: ToolHandler[] = [
// Your custom tools
];
const server = new MCPServer({
name: "my-server",
version: "1.0.0",
tools: myTools,
resources: [],
});
await server.start();Contributing
Fork the repository
Create a feature branch
Make your changes
Add tests if applicable
Submit a pull request
License
MIT License - see LICENSE file for details
Support
For issues and questions:
Create an issue on GitHub
Check the MCP documentation
Review the example implementations
Changelog
1.0.0
Initial release
Basic tool and resource support
TypeScript boilerplate
Example implementations
This server cannot be installed
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.