Skip to main content
Glama
Mikertk86

MCP Starter Server

by Mikertk86

MCP Starter Server

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

Quick Start

Prerequisites

  • Node.js 18+

  • npm or yarn

Installation

npm install

Build

npm run build

Run

npm run dev

Related MCP server: MCP TypeScript Template

Architecture

  • src/index.ts - Main server file with tool definitions

  • tsconfig.json - TypeScript configuration

  • package.json - Dependencies and scripts

Adding Tools

Edit src/index.ts to add new tools:

  1. Define a Zod schema for input validation

  2. Add the tool to the tools array with name, description, and inputSchema

  3. Handle the tool in the CallToolRequestSchema handler

Example:

const MyToolSchema = z.object({
  param1: z.string().describe("Description"),
});

const tools: Tool[] = [
  {
    name: "my_tool",
    description: "What this tool does",
    inputSchema: {
      type: "object",
      properties: {
        param1: {
          type: "string",
          description: "Description",
        },
      },
      required: ["param1"],
    },
  },
];

server.setRequestHandler(CallToolRequestSchema, async (request) => {
  const { name, arguments: args } = request;
  
  if (name === "my_tool") {
    const parsed = MyToolSchema.parse(args);
    return {
      content: [
        {
          type: "text",
          text: `Result: ${parsed.param1}`,
        },
      ],
    };
  }
});

Testing

Use the MCP Inspector to test your server:

npx @modelcontextprotocol/inspector node build/index.js

Next Steps

  1. Add your first custom tool

  2. Connect to an external API

  3. Test with MCP Inspector

  4. Deploy to production

Resources

A
license - permissive license
-
quality - not tested
C
maintenance

Maintenance

Maintainers
Response time
Release cycle
Releases (12mo)
Commit activity

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

  • F
    license
    -
    quality
    D
    maintenance
    A clean, reusable TypeScript boilerplate for building Model Context Protocol servers with support for custom tools and resources.
    182
  • F
    license
    -
    quality
    D
    maintenance
    A starter template designed to jumpstart the development of Model Context Protocol (MCP) servers using TypeScript. It provides pre-configured examples for creating tools and resources, along with integration guides for MCP clients like Cursor.
  • F
    license
    B
    quality
    D
    maintenance
    A starter template for building Model Context Protocol (MCP) servers using Node.js and TypeScript. It provides sample implementations for tools, resources, and prompts, designed to help developers test and integrate MCP capabilities into clients like Codex.
    2

View all related MCP servers

Related MCP Connectors

View all MCP Connectors

Latest Blog Posts

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/Mikertk86/mcp-starter'

If you have feedback or need assistance with the MCP directory API, please join our Discord server