my-mcp-server

my-mcp-server

A TypeScript starter template for building Model Context Protocol (MCP) servers with built-in support for tools, testing, and CI/CD pipelines. It provides a complete development environment for creating custom AI assistant integrations for tools like Claude, Copilot, and Cursor.

Category
Visit Server

README

MCP Server Template

A starter template for building MCP (Model Context Protocol) servers in TypeScript

License: MIT Node.js

What You Get

  • A working MCP server with an example hello tool
  • TypeScript with ES modules
  • Testing with Vitest
  • Linting (ESLint) and formatting (Prettier)
  • CI pipeline and npm publishing workflow
  • VS Code, Claude Desktop, and Cursor configuration examples
┌─────────────────┐     ┌────────────┐     ┌──────────────────┐
│  AI Assistant    │────▶│ MCP Client │────▶│ Your MCP Server  │
│ (Copilot/Claude) │◀────│            │◀────│                  │
└─────────────────┘     └────────────┘     └──────────────────┘

Quick Start

1. Create your project

npx -y degit matracey/mcp-server-template my-mcp-server
cd my-mcp-server
npm install

2. Customize

  • Update name, description, and bin in package.json
  • Replace the example hello tool in src/server.ts with your own tools
  • Update the server name/version in src/server.ts

3. Build and test

npm run build
npm test

4. Run locally

npm run dev    # Run with auto-restart on file changes
npm start      # Run the built version

Adding Tools

Edit src/server.ts and register a new tool:

server.tool(
  'my_tool',
  'Description of what this tool does.',
  {
    param: z.string().describe('Parameter description'),
  },
  async ({ param }) => {
    return {
      content: [{ type: 'text' as const, text: `Result: ${param}` }],
    }
  }
)

The template includes an example hello tool to demonstrate the pattern.

Client Configuration

Once published (or running locally), configure your AI client:

VS Code (GitHub Copilot)

Add to .vscode/mcp.json:

{
  "servers": {
    "my-server": {
      "type": "stdio",
      "command": "npx",
      "args": ["-y", "my-mcp-server"]
    }
  }
}

Claude Desktop

Add to claude_desktop_config.json:

{
  "mcpServers": {
    "my-server": {
      "command": "npx",
      "args": ["-y", "my-mcp-server"]
    }
  }
}

Cursor

Add to .cursor/mcp.json:

{
  "mcpServers": {
    "my-server": {
      "command": "npx",
      "args": ["-y", "my-mcp-server"]
    }
  }
}

Replace my-mcp-server with your published package name.

Project Structure

src/
├── index.ts          # Entry point — stdio transport setup
├── server.ts         # MCP server & tool definitions
├── __tests__/        # Tests (vitest)
└── data/             # Static data (if needed)
scripts/              # Dev-time scripts

Development

Prerequisites

  • Node.js >= 20
  • npm

Commands

npm run build           # TypeScript compilation
npm test                # Run tests
npm run test:watch      # Watch mode
npm run test:coverage   # With coverage report
npm run dev             # Run with auto-restart on changes
npm run validate        # Run all CI checks (format, lint, build, test)

Contributing

Contributions are welcome! Please see CONTRIBUTING.md for guidelines.

License

MIT — see LICENSE for details.

Recommended Servers

playwright-mcp

playwright-mcp

A Model Context Protocol server that enables LLMs to interact with web pages through structured accessibility snapshots without requiring vision models or screenshots.

Official
Featured
TypeScript
Magic Component Platform (MCP)

Magic Component Platform (MCP)

An AI-powered tool that generates modern UI components from natural language descriptions, integrating with popular IDEs to streamline UI development workflow.

Official
Featured
Local
TypeScript
Audiense Insights MCP Server

Audiense Insights MCP Server

Enables interaction with Audiense Insights accounts via the Model Context Protocol, facilitating the extraction and analysis of marketing insights and audience data including demographics, behavior, and influencer engagement.

Official
Featured
Local
TypeScript
VeyraX MCP

VeyraX MCP

Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.

Official
Featured
Local
graphlit-mcp-server

graphlit-mcp-server

The Model Context Protocol (MCP) Server enables integration between MCP clients and the Graphlit service. Ingest anything from Slack to Gmail to podcast feeds, in addition to web crawling, into a Graphlit project - and then retrieve relevant contents from the MCP client.

Official
Featured
TypeScript
Kagi MCP Server

Kagi MCP Server

An MCP server that integrates Kagi search capabilities with Claude AI, enabling Claude to perform real-time web searches when answering questions that require up-to-date information.

Official
Featured
Python
E2B

E2B

Using MCP to run code via e2b.

Official
Featured
Neon Database

Neon Database

MCP server for interacting with Neon Management API and databases

Official
Featured
Exa Search

Exa Search

A Model Context Protocol (MCP) server lets AI assistants like Claude use the Exa AI Search API for web searches. This setup allows AI models to get real-time web information in a safe and controlled way.

Official
Featured
Qdrant Server

Qdrant Server

This repository is an example of how to create a MCP server for Qdrant, a vector search engine.

Official
Featured