MCP Demo Server
Click on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@MCP Demo Servercalculate the square root of 144"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
MCP Demo Server
一个基于 Model Context Protocol (MCP) 的演示服务器,展示如何构建可与 AI 助手集成的自定义工具集。
🚀 项目简介
Model Context Protocol (MCP) 是一个标准化协议,用于 AI 助手与外部工具和数据源的安全连接。本项目实现了一个功能完整的 MCP 服务器,提供数学计算和多语言问候功能,可无缝集成到支持 MCP 的 AI 客户端中(如 Claude Desktop、Cursor 等)。
Related MCP server: MCP Boilerplate
✨ 功能特性
🔧 内置工具
🧮 add - 两数相加计算器
👋 greet - 多语言智能问候生成器(支持英语、中文、西班牙语、法语)
📊 calculate - 高级数学运算工具(加减乘除,含错误处理)
🏗️ 技术特点
✅ 基于最新 MCP SDK 构建
✅ TypeScript 类型安全
✅ JSON Schema 参数验证
✅ 完整错误处理机制
✅ stdio 通信协议
✅ 生产就绪的代码结构
📦 安装配置
环境要求
Node.js 18+
npm 或 yarn
TypeScript 支持
快速开始
# 克隆项目
git clone <repository-url>
cd mcp-demo-server/demo
# 安装依赖
npm install
# 启动服务器
npm start项目结构
demo/ ├── demo.ts # MCP 服务器主文件 ├── package.json # 项目配置 ├── test-advanced.js # 高级功能测试脚本 └── README.md # 项目文档
🔧 使用方法
在 Cursor 中配置
打开 Cursor 配置文件:
~/.config/cursor/claude_desktop_config.json添加 MCP 服务器配置:
{
"mcpServers": {
"demo-server": {
"command": "npx",
"args": ["tsx", "/path/to/your/demo/demo.ts"],
"cwd": "/path/to/your/demo"
}
}
}重启 Cursor
在 Claude Desktop 中配置
{
"mcpServers": {
"demo-server": {
"command": "npm",
"args": ["start"],
"cwd": "/path/to/your/demo"
}
}
}示例使用:
💡 如何触发 MCP 工具调用
明确要求使用工具
使用 MCP 工具计算 100 + 200
调用你的数学工具计算这个
用外部计算器算一下
复杂一些的任务
计算 π × 2.5 的平方根
用多种语言问候客户
批量计算这些数字
明确的工具名称
用 add 工具计算
使用 calculate 功能
调用 greet 工具
Available Tools
3 toolsaddC
Add two numbers together
| Name | Required | Description | Default |
|---|---|---|---|
| a | Yes | First number to add | |
| b | Yes | Second number to add |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations are provided, so the description carries the full burden of behavioral disclosure. It states the action ('add') but doesn't describe any behavioral traits such as error handling, performance characteristics, side effects, or output format. For a tool with no annotations, this is a significant gap in transparency.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is extremely concise ('Add two numbers together')—a single sentence with zero waste. It's front-loaded with the core purpose, making it easy for an agent to parse quickly. Every word earns its place by directly conveying the tool's function.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given the tool's simplicity (2 parameters, no annotations, no output schema), the description is incomplete. It lacks information on behavioral aspects (e.g., what happens with non-numeric inputs, overflow handling) and output expectations. While the schema covers parameters well, the description doesn't compensate for missing annotations or output details, leaving gaps for agent understanding.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
The input schema has 100% description coverage, with clear parameter descriptions ('First number to add', 'Second number to add'). The description adds no additional meaning beyond what the schema provides, as it only restates the tool's purpose without detailing parameter usage or constraints. Baseline 3 is appropriate given the schema does the heavy lifting.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description 'Add two numbers together' clearly states the tool's function with a specific verb ('add') and resource ('two numbers'). It distinguishes from sibling tools like 'calculate' (which might do more complex operations) and 'greet' (which is unrelated). However, it doesn't explicitly differentiate from potential sibling arithmetic tools beyond naming the operation.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
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 sibling tools like 'calculate' or specify use cases (e.g., for simple addition only). There's no context about prerequisites, limitations, or when not to use it, leaving the agent to infer usage from the tool name alone.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
calculateC
Perform basic mathematical operations
| Name | Required | Description | Default |
|---|---|---|---|
| operation | Yes | Mathematical operation to perform | |
| x | Yes | First operand | |
| y | Yes | Second operand |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations are provided, so the description carries the full burden of behavioral disclosure. It only states 'Perform basic mathematical operations' without mentioning error handling (e.g., division by zero), output format, or any constraints like rate limits or permissions. This leaves significant gaps in understanding the tool's behavior.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is a single, efficient sentence with no wasted words. It is front-loaded and clear in its brevity, though it could be more informative. Every word earns its place, but it might be too concise given the lack of other details.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given the complexity (a mathematical tool with 3 parameters) and no annotations or output schema, the description is incomplete. It doesn't explain what the tool returns, error conditions, or usage context, leaving the agent with insufficient information for reliable invocation.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema description coverage is 100%, so the input schema fully documents the parameters (operation, x, y) with descriptions and an enum for operation. The description adds no additional meaning beyond what the schema provides, such as examples or edge cases. Baseline 3 is appropriate as the schema does the heavy lifting.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description 'Perform basic mathematical operations' states what the tool does in general terms but is vague about scope and specifics. It mentions 'basic mathematical operations' which aligns with the name 'calculate', but doesn't specify what types of operations or distinguish it from sibling tools like 'add' (which might be a more specific operation).
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
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 sibling tools like 'add' or 'greet', nor does it specify contexts or exclusions for usage. The agent must infer usage solely from the tool name and parameters.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
greetB
Generate a personalized greeting
| Name | Required | Description | Default |
|---|---|---|---|
| name | Yes | Name of the person to greet | |
| language | No | Language for the greeting |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations are provided, so the description carries the full burden of behavioral disclosure. It states the tool 'generates' a greeting, implying a read-only or computational operation, but doesn't clarify if it's idempotent, has side effects, requires authentication, or handles errors. For a tool with no annotation coverage, this leaves key behavioral traits unspecified.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is a single, efficient sentence that directly states the tool's purpose without any wasted words. It's front-loaded and appropriately sized for a simple tool, making it easy for an agent to parse quickly.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given the tool's low complexity (2 parameters, no output schema, no annotations), the description is minimally complete. It states what the tool does but lacks usage guidelines and behavioral details, which are important even for simple tools. Without an output schema, it doesn't explain return values, though this is less critical here.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
The description adds no parameter semantics beyond what the input schema provides. With 100% schema description coverage, the schema already documents both parameters ('name' and 'language') with descriptions and an enum for 'language'. The baseline is 3 since the schema does the heavy lifting, and the description doesn't compensate with additional context.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the tool's purpose with a specific verb ('Generate') and resource ('personalized greeting'), making it immediately understandable. However, it doesn't differentiate from sibling tools like 'add' or 'calculate', which appear unrelated but could potentially overlap in some contexts (e.g., if 'add' could add greetings).
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
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 prerequisites, contexts where it's appropriate, or exclusions, leaving the agent to infer usage based solely on the purpose. This is a significant gap for effective tool selection.
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.
3 tool updates
- First observed
add - First observed
calculate - First observed
greet
TDQS
The 'add' and 'calculate' tools have significant overlap, as 'add' is a subset of basic mathematical operations. An agent might struggle to choose between them for addition tasks, though 'greet' is clearly distinct. This ambiguity reduces clarity in the tool set.
The tools use simple verb-based names ('add', 'calculate', 'greet'), which are readable but lack a consistent pattern. There is no verb_noun structure, and while not chaotic, the naming is basic and does not follow a predictable convention across the set.
With only 3 tools, the server feels thin for a 'Demo Server' that might imply broader functionality. The count is borderline too few, as it lacks depth or variety to showcase a coherent domain, making it seem under-scoped for demonstration purposes.
Inferring a domain of basic utilities or demonstrations, the surface is incomplete. There are gaps in mathematical operations (e.g., no subtract, multiply, divide) and limited greeting functionality. This will likely cause agent failures when more complex tasks are attempted.
Maintenance
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…
The Mercado Pago MCP Server implements the Model Context Protocol to provide AI agents and LLMs with access to Mercado Pago's APIs and tools within compatible development environments. It acts as an intermediary that translates Mercado Pago resources into executable functions (tools) that AI applications can invoke to perform actions and automate flows. The server simplifies integration, enables using documentation to implement or improve code, and optimizes operations through natural language interactions without manual implementations.
Related MCP Servers
- AlicenseNot gradedqualityDmaintenanceA demonstration server for the Model Context Protocol (MCP) that exposes calculator and Yahoo Finance tools, allowing LLMs to interpret natural language requests and make tool calls via the MCP standard.1Apache 2.0
- AlicenseNot gradedqualityDmaintenanceA minimal, production-ready MCP server with a simple addition calculator tool that demonstrates integration with the Model Context Protocol.151MIT
- FlicenseNot gradedqualityNot gradedmaintenanceA 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.-
- FlicenseBqualityDmaintenanceA demonstration TypeScript MCP server that showcases basic MCP concepts with simple tools (greeting, calculator), text resources, and prompt templates for learning the Model Context Protocol.2-
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
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/joeguo911/mcp-demo'
If you have feedback or need assistance with the MCP directory API, please join our Discord server