Cotton MCP Tools
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.
Cotton MCP Tools
棉花 MCP 工具集 - 一个 Model Context Protocol (MCP) 工具服务项目
项目简介
Cotton MCP Tools 是一个基于 Python 的 MCP 服务项目,提供各种实用工具供 AI 助手调用。
Related MCP server: FastMCP Basic Server
快速开始
环境要求
Python >= 3.10
安装依赖
pip install -e .开发模式安装(包含开发依赖):
pip install -e ".[dev]"启动服务
# 通过命令行入口
cotton-mcp-tools
# 或直接运行
python -m cotton_mcp_tools.main项目结构
cotton-mcp-tools/
├── src/
│ └── cotton_mcp_tools/
│ ├── __init__.py # 包初始化
│ ├── main.py # MCP 服务入口
│ ├── tools/ # MCP 工具模块
│ │ ├── __init__.py # 工具注册入口
│ │ └── sample.py # 示例工具
│ └── utils/ # 工具函数
│ ├── __init__.py
│ └── config.py # 配置管理
├── tests/ # 测试文件
│ ├── __init__.py
│ └── test_sample.py # 示例工具测试
├── pyproject.toml # 项目配置与依赖
├── .gitignore
└── README.mdMCP 工具列表
工具 | 说明 |
| 两数相加 |
| 生成问候语 |
开发指南
添加新工具
在
src/cotton_mcp_tools/tools/下创建新模块实现工具函数并使用
@server.tool()装饰器在
tools/__init__.py中注册新工具
示例:
# src/cotton_mcp_tools/tools/my_tool.py
from mcp.server.fastmcp import FastMCP
def register_my_tools(server: FastMCP) -> None:
@server.tool()
def my_tool(param: str) -> str:
"""工具描述。
Args:
param: 参数说明
Returns:
返回值说明
"""
return f"Result: {param}"然后在 tools/__init__.py 中添加注册:
from cotton_mcp_tools.tools.my_tool import register_my_tools
def register_all_tools(server: FastMCP) -> None:
register_sample_tools(server)
register_my_tools(server) # 添加这行运行测试
pytest代码检查
ruff check src/ tests/
ruff format src/ tests/许可证
MIT License
联系方式
作者: Sheven
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
This server cannot be deployed
Maintenance
Related MCP Connectors
Nifty's MCP server — exposes tasks, projects, messages, and files as tools for AI agents.
MCP server for your apps' tools and custom tools, plus hosted AI agents and approval-gated workflows
Related MCP Servers
- 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 gradedqualityCmaintenanceA basic MCP server implementation using the FastMCP framework that provides utility tools for greetings and mathematical calculations. It is designed to demonstrate tool integration for AI-assisted development workflows like Cline.-
- AlicenseNot gradedqualityDmaintenanceA foundational Model Context Protocol server demonstrating core functionality through basic arithmetic tools and personalized greeting resources. It serves as a template for developers learning to build and deploy MCP-enabled AI applications.GPL 3.0
- FlicenseAqualityDmaintenanceA simple local MCP server that provides greeting and integer addition tools.2-