Skip to main content
Glama

Шаблон сервера MCP 🛠️

Начальный шаблон для создания собственного сервера Model Context Protocol (MCP). Этот шаблон обеспечивает базовую структуру и настройку, необходимые для создания пользовательских MCP, которые можно использовать с Cursor или Claude Desktop.

Функции

  • Базовая настройка сервера MCP с TypeScript

  • Пример реализации инструмента

  • Готовая к использованию структура проекта

  • Создано с помощью @modelcontextprotocol/sdk

Related MCP server: Python MCP Server Template

Структура проекта

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

Начиная

  1. Клонируйте этот шаблон:

git clone [your-repo-url] my-mcp-server
cd my-mcp-server
  1. Установить зависимости:

pnpm install
  1. Создайте проект:

pnpm run build

Это сгенерирует файл /build/index.js — ваш скомпилированный скрипт сервера MCP.

Использование с курсором

  1. Перейдите в Настройки курсора -> MCP -> Добавить новый сервер MCP.

  2. Настройте свой MCP:

    • Имя: [выберите свое имя]

    • Тип: команда

    • Команда: node ABSOLUTE_PATH_TO_MCP_SERVER/build/index.js

Использование с Claude Desktop

Добавьте следующую конфигурацию MCP в конфигурацию Claude Desktop:

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

Разработка

Шаблон включает в себя пример реализации инструмента в index.ts . Чтобы создать свой собственный MCP:

  1. Измените конфигурацию сервера в index.ts :

const server = new McpServer({
  name: "your-mcp-name",
  version: "0.0.1",
});
  1. Определите свои пользовательские инструменты с помощью метода server.tool() :

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. Создайте и протестируйте свою реализацию:

npm run build

Внося вклад

Не стесняйтесь отправлять сообщения о проблемах и запросы на улучшения!

Лицензия

Массачусетский технологический институт

Available Tools

1 tool
sample-toolC

A sample tool for demonstration purposes

ParametersJSON Schema
NameRequiredDescriptionDefault
inputYesInput parameter for the sample tool

TDQS

C2.3/5.0
Behavior1/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

The description provides zero behavioral information beyond the name. With no annotations provided, the description carries the full burden of disclosing behavioral traits like whether this is a read or write operation, what side effects it might have, authentication requirements, or rate limits. The description fails to address any of these aspects, leaving the agent completely in the dark about how this tool behaves.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is extremely concise at just one sentence with no wasted words. It's appropriately sized for what little information it conveys, and while it's under-specified, it's not verbose or poorly structured. Every word in 'A sample tool for demonstration purposes' serves its purpose within the minimal context provided.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given that this is a tool with one parameter, no annotations, no output schema, and no sibling tools, the description is incomplete. It fails to explain what the tool actually does, what behavior to expect, or what context it operates in. While the simplicity of the tool might lower expectations, the description doesn't provide enough information for an agent to understand when and how to use it effectively.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

With 100% schema description coverage and only one parameter documented in the schema, the description adds no additional parameter information. The schema already describes the 'input' parameter as 'Input parameter for the sample tool,' so the description doesn't compensate or add meaning beyond what's in the structured data. This meets the baseline of 3 when schema coverage is high.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose2/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description 'A sample tool for demonstration purposes' is a tautology that essentially restates the tool name 'sample-tool' without specifying what it actually does. It doesn't mention any specific verb or resource, nor does it explain what kind of demonstration it performs. While it's not misleading, it provides minimal functional information beyond the name itself.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides no guidance on when to use this tool, what context it's appropriate for, or what alternatives might exist. With no sibling tools mentioned, there's no need for differentiation, but the description fails to establish any usage context whatsoever. It doesn't indicate whether this is for testing, learning, or any specific scenario.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections. Dates show when Glama detected each change.

  1. 1 tool update
    • First observedsample-tool

TDQS

C2.6/5.0
Disambiguation5/5

With only one tool, there is no possibility of ambiguity or overlap between tools, as there are no other tools to confuse it with. The single tool's purpose is clearly distinct by default in this minimal set.

Naming Consistency5/5

The tool name 'sample-tool' uses a consistent hyphenated noun pattern, and with only one tool, there is no inconsistency to evaluate. The naming is straightforward and follows a simple convention.

Tool Count2/5

A single tool is too few for most practical server purposes, as it severely limits functionality and scope. This feels thin and inadequate for handling any meaningful domain or workflow beyond basic demonstration.

Completeness1/5

The server is severely incomplete, with only a sample tool that lacks any clear domain or operational coverage. There are obvious gaps, as no CRUD, lifecycle, or specific functionality is provided, making it impossible for agents to perform useful tasks.

Maintenance

ActivityInactive
ResponsivenessSyncing

Resources

Unclaimed servers have limited discoverability.

Looking for Admin?

If you are the server author, to access and configure the admin panel.

Related MCP Connectors

  • A comprehensive Model Context Protocol (MCP) server that enables AI assistants to interact with yo…

  • A Model Context Protocol server for Wix AI tools

  • Model Context Protocol server for the Apideck Unified API. Connect any MCP-compatible agent framework to 100+ accounting systems, HRIS platforms, file storage providers, and more through one integration. More information https://www.apideck.com/mcp-server

  • The Telnyx MCP server is an official implementation of the Model Context Protocol that enables AI clients (like Claude Desktop, Cursor, and OpenAI Agents) to interact with Telnyx's telephony, messaging, and AI assistant APIs. It provides comprehensive capabilities including making and managing phone calls, sending SMS/MMS messages, purchasing and configuring phone numbers, creating AI assistants with custom instructions, managing cloud storage buckets, scraping and embedding website content, and handling integration secrets. The server exists as both a local implementation and a remotely hosted version, allowing developers to integrate real-world communication infrastructure directly into AI applications.

Related MCP Servers

  • F
    license
    C
    quality
    D
    maintenance
    A starter template for building Model Context Protocol servers that integrate with AI assistants like Claude and Cursor, providing custom tools, resource providers, and prompt templates.
    2
    0
    -

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/hypermodel-labs/mcp-server-template'

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