Skip to main content
Glama
askarthikey

MCP Starter Server

by askarthikey

MCP Starter Server (TypeScript)

一个使用官方 @modelcontextprotocol/sdk 构建于 Node.js / TypeScript 的入门级 Model Context Protocol (MCP) 服务器。

功能

  • 🛠️ 工具:

    • add_numbers:将两个数字相加并返回格式化结果。

    • get_system_status:返回系统运行时间、平台、Node 版本和时间戳。

  • 📄 资源:

    • info://welcome:提供欢迎信息的文本资源。

    • config://app-settings:暴露服务器配置设置的 JSON 资源。

  • 💡 提示:

    • code_review:用于结构化代码审查请求的提示模板。

    • summarize_notes:用于将会议记录总结为要点的提示模板。


Related MCP server: MCP AI Chat LangChain

快速开始

1. 安装依赖

npm install

2. 构建服务器

npm run build

这会将 TypeScript 源代码从 src/ 编译到 dist/index.js。

3. 以开发模式运行

npm run dev

4. 使用 MCP Inspector 进行测试

您可以使用官方 MCP Inspector 直观地测试并与您的工具、资源和提示进行交互:

npx @modelcontextprotocol/inspector node dist/index.js

与 MCP 客户端集成

Antigravity / Claude Desktop / Cursor 配置

将此服务器添加到您客户端的 MCP 服务器配置文件中(例如 mcp_config.json 或 claude_desktop_config.json):

{
  "mcpServers": {
    "starter-mcp-server": {
      "command": "node",
      "args": [
        "C:/Users/naska/coding/dev/mcp-temp/dist/index.js"
      ]
    }
  }
}

目录结构

.
├── src/
│   └── index.ts        # Main MCP Server implementation (Tools, Resources, Prompts)
├── dist/               # Compiled JavaScript outputs (generated on build)
├── package.json        # Dependencies and build scripts
├── tsconfig.json       # TypeScript compiler settings
└── README.md           # Documentation

Available Tools

2 tools
add_numbersA

Adds two numbers together and returns the result.

ParametersJSON Schema
NameRequiredDescriptionDefault
aYesFirst number
bYesSecond number

TDQS

A3.8/5.0
Behavior3/5

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

With no annotations, the description carries the full behavioral burden. It discloses the core behavior and the fact that a result is returned, which is adequate for a pure arithmetic function. However, it says nothing about edge cases, error handling, or whether the operation is stateless — though the simplicity lessens the severity of these omissions.

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?

One sentence, ten words, zero fluff. The action verb and resource are front-loaded and every word earns its place. There is nothing extraneous.

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

Completeness4/5

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

The tool is trivial in complexity, so the schema's thorough parameter docs and the description's clear operation statement are largely sufficient. Could theoretically note edge cases or the return type explicitly, but the implied number return is practically unambiguous.

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?

The input schema already provides 100% coverage, so the baseline of 3 applies. The description adds no extra meaning about the parameters beyond what the schema states — it simply confirms the operation performed on them.

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

Purpose5/5

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

Names a specific verb ('adds') and resource ('two numbers') and goes beyond a mere label by stating the outcome ('returns the result'). The sibling tool get_system_status is so categorically different that there is no realistic ambiguity about which tool this is.

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

Usage Guidelines3/5

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

The intended use is obvious for the operation being performed, but no guidance is given for distinguishing when to use this over an alternative. There is no when-to-use or when-not-to-use context — the usage is implied but never stated.

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

get_system_statusA

Retrieves system runtime status including Node version, OS, uptime, and timestamp.

ParametersJSON Schema
NameRequiredDescriptionDefault

No parameters

TDQS

A3.5/5.0
Behavior3/5

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

There are no annotations, so the description carries the full burden. It clearly indicates a read-only fetch behavior, which is useful, but it does not disclose whether the returned status is a plain object, whether errors or empty values are possible, or any environment-specific caveats. Given the simple nature of a status query, this is adequate but not thorough.

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 a single, front-loaded sentence that immediately states the action and lists the relevant content. There is no filler or repetition of the tool name.

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

Completeness4/5

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

With no output schema or annotations, the description provides enough grounding about the expected contents, including four concrete status fields. It stops short of describing the exact return shape or exception behavior, but for a zero-parameter status query this is a reasonable, workable definition.

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

Parameters4/5

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

There are 0 parameters, so there is no parameter semantics to explain. The description compensates by enumerating the kind of data that will be returned, which helps clarify what 'status' means even without an output schema.

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

Purpose4/5

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

The description uses a specific verb ('Retrieves') and names the resource ('system runtime status') along with concrete fields: Node version, OS, uptime, and timestamp. This clearly distinguishes it from sibling add_numbers, though it does not explicitly name the sibling as an alternative.

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?

No guidance is given for when to use this tool versus alternatives or when not to use it. While the sibling 'add_numbers' is clearly unrelated, there is no explicit usage context or exclusion criteria.

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.

  1. 2 tool updatesv1.0.0
    • First observedadd_numbers
    • First observedget_system_status

TDQS

A3.8/5.0

Scored across 2 tools

Disambiguation5/5

add_numbers and get_system_status have completely separate purposes, so an agent would not confuse them. Each tool's name and description uniquely identify its intended action.

Naming Consistency5/5

Both tools use a consistent verb_noun snake_case pattern: add_numbers and get_system_status. This makes the naming predictable and easy to extend.

Tool Count3/5

Two tools is on the low end and feels thin for an MCP server. However, for a starter server it is defensible, so the count is borderline rather than unreasonable.

Completeness4/5

The two tools cover what a minimal starter server would likely demonstrate: a computational example and a system information example. There are no obvious missing operations given the small scope, though the surface is not broad enough for general-purpose use.

Maintenance

ActivitySlowing
ResponsivenessNo issues

Related MCP Connectors

Related MCP Servers

  • A
    license
    Not graded
    quality
    Not graded
    maintenance
    A demonstration MCP server that provides calculator tools for arithmetic operations, personalized greeting resources, and code review prompt templates. Enables users to perform basic math calculations, generate dynamic greetings, and access reusable code review templates through the Model Context Protocol.
    MIT
  • F
    license
    C
    quality
    D
    maintenance
    A Model Context Protocol server that provides tools for mathematical calculations and directory listing, alongside prompt templates for code reviews and explanations. It enables file system access and resource reading through stdio transport.
    2
    -