-
securityA
license-
qualityA simple implementation of a Model Context Protocol server that demonstrates core functionality including mathematical tools (add, subtract) and personalized greeting resources.
Last updated -
75
GPL 3.0
这是模型上下文协议 (MCP) 服务器实现的基本示例,演示了包括工具和资源在内的核心功能。
初始化项目(转到任何本地文件夹并启动 powershell 或 cmd):
安装依赖项:
或者
该服务器实现了以下功能:
add(a: int, b: int)
:将两个数字相加
subtract(a: int, b: int)
:从第一个数字中减去第二个数字
greeting://{name}
:返回个性化问候语
要使用 MCP Inspector 运行服务器进行开发:
要正常运行服务器:
要在 Claude 桌面应用程序中安装服务器:
在 vs code 中打开文件夹/mcp-server-basic
打开终端并运行以下命令:
单击 Cntrl+Shift+I 在 VS Code 中启动聊天
使用 Github 登录并设置
请按照以下步骤操作(为 vs 代码用户设置添加 mcp 配置的两种方法):
#来自 mcp 的你好
This server cannot be installed
模型上下文协议服务器的示例实现,使用简单的算术工具和问候资源展示核心功能。
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/ugundhar/mcp-server'
If you have feedback or need assistance with the MCP directory API, please join our Discord server