Skip to main content
Glama

MCP Server 学习实验室

一个基于 Node.js + TypeScript 的 MCP Server 开发实践仓库,使用官方 SDK @modelcontextprotocol/sdk,专注于探索如何将本地服务、API、工具封装为符合 MCP 协议的标准化服务。适合 AI 开发者学习协议实现、工具链集成及服务扩展。

安装使用

安装

# 环境配置
cp .env.example .env

# 项目安装
npm install

# 项目构建
npm run build

本地测试 & 调试

推荐使用 @modelcontextprotocol/inspector 进行测试运行,您可以通过以下命令快速启动:

# 启动默认 inspector 工具服务
npm run inspector

# 启动官方示例(仅默认命令不同,工具是同一个)
npm run inspector:everything

关于该工具的使用方法,参考:https://github.com/modelcontextprotocol/inspector

Related MCP server: mcp_command-line_tool

项目说明

// This example demonstrated an MCP server using the stdio format
// Cursor automatically runs this process for you
// This uses a Node.js server, ran with `npx`
{
  "mcpServers": {
    "mcp-server-toolkit": {
      "command": "node",
      "args": ["build/index.js"],
      "env": {
        "API_KEY": "value"
      }
    }
  }
}

参考文档

Available Tools

2 tools
get_current_timeB

返回当前的日期和时间

ParametersJSON Schema
NameRequiredDescriptionDefault

No parameters

TDQS

B3.2/5.0
Behavior2/5

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

No annotations are provided, so the description carries the full burden. It states the tool returns the current date and time, which implies it's a read-only operation with no side effects, but it doesn't explicitly confirm this or disclose other behavioral traits like timezone handling, format, or potential delays. For a tool with zero annotation coverage, this is a significant gap.

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, efficient sentence in Chinese that directly states the tool's purpose. It's front-loaded with no wasted words, making it highly concise and well-structured for its simple function.

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

Completeness3/5

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

Given the tool's low complexity (0 parameters, no output schema, no annotations), the description is minimally adequate. It states what the tool does but lacks details on return format or behavioral context. Without annotations or output schema, the description should ideally provide more completeness, but it meets the bare minimum for such a simple tool.

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?

The tool has 0 parameters, and the schema description coverage is 100% (since there are no parameters to describe). The description doesn't need to add parameter semantics, so a baseline of 4 is appropriate as it doesn't introduce confusion or redundancy.

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 '返回当前的日期和时间' (returns the current date and time) clearly states the tool's purpose with a specific verb ('返回') and resource ('当前的日期和时间'). It's not tautological with the name 'get_current_time' since it provides the Chinese translation. However, it doesn't explicitly distinguish from the sibling tool 'number_add', though that distinction is obvious given their different domains.

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 versus alternatives. It doesn't mention any context, prerequisites, or exclusions. While the tool's purpose is simple and the sibling 'number_add' is unrelated, the description itself offers no usage guidelines.

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

number_addB

简单的求和工具,当想要计算两个数字相加后的结果时调用

ParametersJSON Schema
NameRequiredDescriptionDefault
aYes第一个数字
bYes第二个数字

TDQS

B3.2/5.0
Behavior2/5

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

No annotations are provided, so the description carries full burden for behavioral disclosure. It states the tool performs addition but doesn't mention error handling (e.g., for non-numeric inputs), performance characteristics, rate limits, or output format. For a simple tool with no annotations, this leaves gaps in understanding how it behaves beyond the basic operation.

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

Conciseness4/5

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

The description is concise with a single sentence that directly states the tool's purpose and usage. It's front-loaded with the core function. However, it could be slightly more structured by separating purpose from usage, but it efficiently communicates the essential information without waste.

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

Completeness3/5

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

Given the tool's low complexity (simple addition with two parameters), no annotations, and no output schema, the description is minimally adequate. It covers the basic purpose and usage but lacks details on output format, error cases, or behavioral traits. For such a simple tool, this might be sufficient, but it doesn't provide a complete picture for an AI agent to handle edge cases confidently.

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 schema description coverage is 100%, with clear descriptions for both parameters ('第一个数字' and '第二个数字'). The description adds no additional parameter semantics beyond what the schema provides, such as constraints or examples. With high schema coverage, the baseline score of 3 is appropriate as the description doesn't compensate but also doesn't detract.

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 clearly states the tool's purpose as '简单的求和工具' (simple summation tool) and specifies it calculates the sum of two numbers. It distinguishes from the sibling tool 'get_current_time' by focusing on arithmetic calculation rather than time retrieval. However, it doesn't explicitly differentiate from potential other mathematical tools beyond the sibling context.

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 description provides implied usage guidance with '当想要计算两个数字相加后的结果时调用' (call when you want to calculate the sum of two numbers), which gives basic context. However, it doesn't offer explicit alternatives, exclusions, or when-not-to-use guidance. The sibling tool 'get_current_time' is unrelated, so no comparison is needed, but the description lacks broader usage context.

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. 1 tool updatev1.0.0
    • Changedget_current_time1 field changed
      • removedInput schema / additionalProperties
        Removed value: -false
  2. 2 tool updates
    • First observedget_current_time
    • First observednumber_add

TDQS

B3.2/5.0

Scored across 2 tools

Disambiguation5/5

The two tools have completely distinct purposes: get_current_time retrieves temporal data, while number_add performs arithmetic addition. There is no overlap in functionality, making it impossible for an agent to confuse them.

Naming Consistency4/5

Both tools follow a verb_noun pattern (get_current_time, number_add), which is consistent and readable. However, the verb styles differ slightly ('get' vs. 'number'), but this minor deviation does not significantly impact clarity.

Tool Count2/5

With only 2 tools, this server feels thin for a 'toolkit' purpose implied by the name 'mcp-toolkittest'. It lacks breadth and depth, making it borderline for practical use, though not extreme like a single tool.

Completeness2/5

The server's domain is unclear from the tool set, but as a basic utility toolkit, it has significant gaps. It only covers time retrieval and addition, missing common operations like subtraction, multiplication, or other utility functions, which limits agent effectiveness.

Maintenance

ActivityInactive
ResponsivenessNo issues

Related MCP Connectors

Related MCP Servers