Demo MCP Server
This server does not currently have a deployable release on Glama. Follow the repository's setup instructions to install and configure it for your MCP client, including any required credentials and local dependencies.
MCP Server Demo
这是一个MCP(Model Context Protocol)服务器示例,提供多种工具和资源供AI模型调用。
项目简介
本项目是一个基于FastMCP框架构建的MCP服务器,提供了基础的数学计算工具、个性化问候资源和用户问候提示等功能。
Related MCP server: Fast MCP Local
功能特性
加法工具:执行两个整数的加法运算
乘法工具:执行两个整数的乘法运算
个性化问候资源:根据姓名生成个性化问候语
用户问候提示:根据指定风格生成问候提示
依赖要求
Python >= 3.12
mcp[cli] >= 1.12.2
安装步骤
确保已安装Python 3.12或更高版本
安装依赖:
pip install mcp[cli]>=1.12.2
启动服务
运行以下命令启动MCP服务器:
uv run server fastmcp_quickstart stdio或者直接运行Python文件:
python mcp_server.py魔搭社区部署说明
部署准备
确保项目根目录包含以下文件:
mcp_server.py - 主服务文件
pyproject.toml - 项目配置文件
README.md - 项目说明文件
部署步骤
将项目代码上传至魔搭社区环境
在魔搭环境中安装依赖:
pip install -r requirements.txt # 或者直接安装pyproject.toml中的依赖 pip install .启动服务:
uv run server fastmcp_quickstart stdio
服务配置
服务名称:Demo
通信方式:stdio
支持的工具:
add: 两数相加multi: 两数相乘get_greeting: 获取个性化问候greet_user: 生成用户问候提示
使用示例
加法工具:输入两个整数,返回它们的和
乘法工具:输入两个整数,返回它们的积
问候资源:输入姓名,返回个性化问候语(格式:greeting://{name})
问候提示:输入姓名和风格(友好/正式/随意),返回相应风格的问候
注意事项
确保在魔搭社区环境中正确配置了Python运行环境
检查依赖包是否正确安装
服务启动后会监听stdio进行MCP协议通信
许可证
请在此处添加许可证信息(如适用)
This server cannot be deployed
Maintenance
Related MCP Connectors
A simple MCP server built with FastMCP and python
This MCP server enables users to perform scientific computations regarding linear algebra and vect…
Related MCP Servers
- FlicenseAqualityDmaintenanceA demonstration MCP server built with FastMCP v2.0 that provides basic mathematical calculations and greeting functionality. Features Docker containerization, comprehensive testing, and CI/CD automation for learning MCP development patterns.2-
- AlicenseNot gradedqualityDmaintenanceA minimal FastMCP server implementation that provides basic mathematical and greeting tools. Enables users to perform simple operations like adding numbers and greeting people by name through a lightweight MCP interface.MIT
- FlicenseNot gradedqualityDmaintenanceA minimal demonstration MCP server that provides basic mathematical addition and greeting functionality, serving as a template for building and deploying FastMCP servers.-
- FlicenseNot gradedqualityDmaintenanceA simple demonstration MCP server built with FastMCP that provides basic functionality including an addition tool, dynamic greeting resources, and user greeting prompts over STDIO.-