Fire in da houseTop Tip:Paying $100+ per month for Perplexity, MidJourney, Runway, ChatGPT and other tools is crazy - get all your AI tools in one site starting at $15 per month with Galaxy AI Fire in da houseCheck it out free

mcp-server-template

MCP.Pizza Chef: jatinsandilya

The mcp-server-template is a minimal TypeScript starter template designed to help developers quickly build custom Model Context Protocol (MCP) servers. It provides a ready-to-use project structure, basic server setup, and sample tool implementations, enabling seamless integration with MCP clients like Cursor or Claude Desktop. Built with the @modelcontextprotocol/sdk, it simplifies creating MCP servers that expose structured data and functionality to LLMs.

Use This MCP server To

Create custom MCP servers for specific data or tool integrations Develop MCP servers compatible with Cursor and Claude Desktop Prototype new MCP server features with minimal setup Build lightweight MCP servers using TypeScript Extend MCP functionality with custom tools and APIs

README

MCP Server Template šŸ› ļø

A starter template for building your own Model Context Protocol (MCP) server. This template provides the basic structure and setup needed to create custom MCPs that can be used with Cursor or Claude Desktop.

Server Template MCP server

Features

  • Basic MCP server setup with TypeScript
  • Sample tool implementation
  • Ready-to-use project structure
  • Built with @modelcontextprotocol/sdk

Project Structure

mcp-server-template/
ā”œā”€ā”€ index.ts        # Main server implementation
ā”œā”€ā”€ package.json    # Project dependencies
ā”œā”€ā”€ tsconfig.json   # TypeScript configuration
└── build/         # Compiled JavaScript output

Getting Started

  1. Clone this template:
git clone [your-repo-url] my-mcp-server
cd my-mcp-server
  1. Install dependencies:
pnpm install
  1. Build the project:
pnpm run build

This will generate the /build/index.js file - your compiled MCP server script.

Using with Cursor

  1. Go to Cursor Settings -> MCP -> Add new MCP server
  2. Configure your MCP:
    • Name: [choose your own name]
    • Type: command
    • Command: node ABSOLUTE_PATH_TO_MCP_SERVER/build/index.js

Using with Claude Desktop

Add the following MCP config to your Claude Desktop configuration:

{
  "mcpServers": {
    "your-mcp-name": {
      "command": "node",
      "args": ["ABSOLUTE_PATH_TO_MCP_SERVER/build/index.js"]
    }
  }
}

Development

The template includes a sample tool implementation in index.ts. To create your own MCP:

  1. Modify the server configuration in index.ts:
const server = new McpServer({
  name: "your-mcp-name",
  version: "0.0.1",
});
  1. Define your custom tools using the server.tool() method:
server.tool(
  "your-tool-name",
  "Your tool description",
  {
    // Define your tool's parameters using Zod schema
    parameter: z.string().describe("Parameter description"),
  },
  async ({ parameter }) => {
    // Implement your tool's logic here
    return {
      content: [
        {
          type: "text",
          text: "Your tool's response",
        },
      ],
    };
  }
);
  1. Build and test your implementation:
npm run build

Contributing

Feel free to submit issues and enhancement requests!

License

MIT

mcp-server-template FAQ

How do I get started with the mcp-server-template?
Clone the repository, install dependencies, and run the TypeScript server as per the README instructions.
What programming language is used in this MCP server template?
The template is built using TypeScript for type safety and modern JavaScript features.
Can I customize the tools included in the mcp-server-template?
Yes, the template includes sample tool implementations that you can extend or replace to fit your needs.
Is this template compatible with multiple MCP clients?
Yes, it is designed to work with MCP clients like Cursor and Claude Desktop.
Does the template include production-ready features?
It provides a minimal setup ideal for prototyping; additional production features should be added as needed.
What SDK does this template use?
It uses the @modelcontextprotocol/sdk to facilitate MCP server development.
How do I deploy an MCP server built with this template?
After building the project, deploy the compiled JavaScript output to your preferred hosting environment.
Can this template be used to expose APIs or data sources to LLMs?
Yes, it is designed to expose structured data and functionality to LLMs via MCP.