MCP Template
Integrates with Biome for code linting and formatting, ensuring code quality standards in the MCP server
Enables repository management and version control for MCP server development
Provides CI/CD pipelines for testing, building, and releasing MCP servers, with automated template synchronization to derived repositories
Runs on Node.js runtime environment with testing across multiple Node.js versions (18, 20, and 22)
Enables automated package publishing and version management for MCP servers
Automates version bumping and release creation based on commit messages
Built with TypeScript for type safety and modern JavaScript features in MCP server development
Provides comprehensive testing framework with coverage reporting for MCP tools
Used for dependency management and script execution in development workflow
Enables schema validation for MCP tool inputs with automatic JSON Schema generation
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 Templateshow me how to create a new tool"
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 Template
Build Status
Related MCP server: MCP Server Template
Release Status
A TypeScript template for building MCP (Model Context Protocol) servers with automated template synchronization to downstream repositories.
Features
🚀 TypeScript with ES Modules - Modern JavaScript with full type safety
🧪 Comprehensive Testing - Vitest with coverage reporting
🔧 Code Quality - Biome for linting and formatting
📦 Automated Publishing - Semantic versioning and NPM publishing
🔄 Template Synchronization - Automatic updates to derived repositories
🛠️ Development Tools - Hot reload, watch mode, and CLI support
📋 Git Hooks - Automated linting and commit message validation
Quick Start
Using as Template
Use this template on GitHub to create your new MCP server repository
Clone your new repository:
git clone https://github.com/yourusername/your-mcp-server.git cd your-mcp-serverInstall dependencies:
yarn installUpdate configuration:
Edit
package.jsonwith your server name and detailsUpdate
src/index.tsserver name and versionReplace example tools in
src/tools/with your implementations
Development
# Start development server with hot reload
yarn dev
# Run tests
yarn test
# Run tests in watch mode
yarn test:watch
# Build the project
yarn build
# Run linting
yarn lint
# Auto-fix linting issues
yarn lint:fixTemplate Structure
mcp-template/
├── src/
│ ├── index.ts # MCP server entry point
│ ├── cli.ts # CLI entry point (optional)
│ ├── tools/
│ │ ├── example.ts # Example tool implementation
│ │ ├── example.test.ts # Example tool tests
│ │ └── fetch-example.ts # HTTP fetch example tool
│ └── utils/
│ ├── validation.ts # Common validation schemas
│ └── fetch.ts # HTTP utilities with caching
├── .github/
│ └── workflows/
│ ├── ci.yml # Continuous Integration
│ ├── semantic-release.yml # Automated versioning
│ └── template-sync-*.yml # Template synchronization
├── .template-marker # Template tracking file
├── .template-version # Template version tracking
└── shared/ # Shared utilities for template syncWriting MCP Tools
Basic Tool Example
import { z } from 'zod';
import { zodToJsonSchema } from 'zod-to-json-schema';
// Define input schema
export const MyToolSchema = z.object({
input: z.string().describe('Input parameter'),
count: z.number().optional().default(1).describe('Number of iterations'),
});
export type MyToolInput = z.infer<typeof MyToolSchema>;
// Export tool schema for MCP registration
export const myToolSchema = {
name: 'my_tool',
description: 'Description of what this tool does',
inputSchema: zodToJsonSchema(MyToolSchema),
};
// Tool implementation
export async function myTool(input: unknown) {
const validated = MyToolSchema.parse(input);
// Your tool logic here
const result = `Processed: ${validated.input}`;
return {
content: [
{
type: 'text',
text: result,
},
],
};
}Register Tools in MCP Server
// In src/index.ts
import { myToolSchema, myTool } from './tools/my-tool.js';
// Register in ListToolsRequestSchema handler
server.setRequestHandler(ListToolsRequestSchema, async () => ({
tools: [
myToolSchema,
// ... other tools
],
}));
// Register in CallToolRequestSchema handler
server.setRequestHandler(CallToolRequestSchema, async (request) => {
const { name, arguments: args } = request.params;
switch (name) {
case 'my_tool':
return await myTool(args);
// ... other tools
default:
throw new Error(`Unknown tool: ${name}`);
}
});Template Synchronization
This template includes an automated synchronization system that keeps derived repositories up to date:
How It Works
Template Changes: When you update the template repository
Automatic Discovery: GitHub Actions discovers all repositories created from this template
Sync Dispatch: Template changes are automatically synchronized to derived repos
Pull Request Creation: Changes are proposed via pull requests for review
Template Marker
The .template-marker file identifies repositories created from this template:
template_repository: mcp-template
template_version: 1.0.0
created_from_template: true
sync_enabled: trueCustomizing Sync Behavior
Edit .github/template-sync-config.yml to control what gets synchronized:
sync_patterns:
- "tsconfig.json"
- "biome.json"
- "vitest.config.ts"
- ".github/workflows/**"
- "src/utils/validation*"
# Add patterns for files to sync
ignore_patterns:
- "src/tools/**" # Don't sync tool implementations
- "README.md" # Keep custom README
# Add patterns for files to ignoreCI/CD Pipeline
Continuous Integration
Code Quality: Linting, formatting, and type checking
Testing: Unit tests with coverage reporting
Build Verification: Ensures TypeScript compiles successfully
Multi-Node Testing: Tests on Node.js 18, 20, and 22
Automated Release
Semantic Versioning: Automatic version bumping based on commit messages
Changelog Generation: Automatically generated from commit history
NPM Publishing: Automatic package publishing on release
GitHub Releases: Automatic GitHub release creation
Commit Message Format
Follow Conventional Commits:
feat: add new tool for data processing
fix: resolve validation error in example tool
docs: update README with usage examples
chore: update dependenciesContributing
Fork the repository
Create a feature branch:
git checkout -b feature/amazing-featureCommit changes:
git commit -m 'feat: add amazing feature'Push to branch:
git push origin feature/amazing-featureOpen a Pull Request
License
This project is licensed under the CC BY-NC-SA 4.0 license.
Related Projects
This server cannot be installed
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Related MCP Servers
- AlicenseCqualityDmaintenanceA production-ready template for creating Model Context Protocol servers with TypeScript, providing tools for efficient testing, development, and deployment.Last updated114347MIT
- AlicenseCqualityDmaintenanceA TypeScript-based template for developing Model Context Protocol servers with features like dependency injection and service-based architecture, facilitating the creation and integration of custom data processing tools.Last updated1234ISC
- AlicenseCqualityDmaintenanceA TypeScript-based template for building Model Context Protocol servers, featuring fast testing, automated version management, and a clean structure for MCP tool implementations.Last updated11434MIT
- Flicense-qualityDmaintenanceA template repository for building Model Context Protocol (MCP) servers with TypeScript, featuring full TypeScript support, testing setup, CI/CD pipelines, and modular architecture for easy extension.Last updated26
Related MCP Connectors
Kickstart development with a customizable TypeScript template featuring sample tools for greeting,…
A Model Context Protocol server for Wix AI tools
A TypeScript MCP server for Home Assistant, enabling programmatic management of entities, automati…
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/Mearman/mcp-ai'
If you have feedback or need assistance with the MCP directory API, please join our Discord server