Skip to main content
Glama
Limter2333

Cotton MCP Tools

by Limter2333

Cotton MCP Tools

棉花 MCP 工具集 - 一个 Model Context Protocol (MCP) 工具服务项目

项目简介

Cotton MCP Tools 是一个基于 Python 的 MCP 服务项目,提供各种实用工具供 AI 助手调用。

Related MCP server: MCP Playground 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.md

MCP 工具列表

工具

说明

add

两数相加

greet

生成问候语

开发指南

添加新工具

  1. src/cotton_mcp_tools/tools/ 下创建新模块

  2. 实现工具函数并使用 @server.tool() 装饰器

  3. 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. Dates show when Glama detected each change.

No tool schema history has been recorded yet.

Maintenance

ActivityMaintained
ResponsivenessNo issues

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

Related MCP Servers

  • A
    license
    Not graded
    quality
    D
    maintenance
    A 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
  • F
    license
    Not graded
    quality
    C
    maintenance
    A 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.
    -
  • A
    license
    Not graded
    quality
    D
    maintenance
    A 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

Latest Blog Posts

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/Limter2333/cotton-mcp-tools'

If you have feedback or need assistance with the MCP directory API, please join our Discord server