返回市场
MCP服务器

MCP服务器

作者:yiGmMk5 星标更新:2025-05-13

项目介绍

mcp-server

smithery 徽章

学习如何编写MCP服务器

安装(命令行)

通过Smithery安装

要通过Smithery自动安装mcp-server:

npx -y @smithery/cli install @yiGmMk/mcp-server --client claude

预先依赖项

  • Python 3.12或更新版本
  • uv 包管理器

如果未安装UV,请参考文档UV安装文档

在MacOS或Linux上可以使用以下命令进行安装:

curl -LsSf https://astral.sh/uv/install.sh | sh

在Windows上,在PowerShell下安装:

powershell -ExecutionPolicy ByPass -c "irm https://astral.sh/uv/install.ps1 | iex"

配置文件

优先使用以下配置方法:

{
    "mcpServers": {
        "yiGmMk/mcp-server": {
            "command": "uv",
            "args": [
                "--directory",
                "/path/to/your/mcp-server",
                "run",
                "main.py"
            ],
            "env": {
                "JINA_API_KEY": "jina_api_key,请从https://jina.ai/reader获取",
                "GOOGLE_AI_STUDIO_KEY": "Google AI Studio api key,请从https://aistudio.google.com/apikey获取",
                "PYTHONIOENCODING": "utf-8"
            },
            "disabled": false,
            "autoApprove": []
        }
    }
}

或者使用虚拟环境(增加环境变量配置):

{
    "mcpServers": {
        "yiGmMk/mcp-server": {
            "command": "uv",
            "args": [
                "run",
                "/path/to/your/mcp-server/main.py"
            ],
            "env": {
                "VIRTUAL_ENV": "/path/to/your/mcp-server/.venv",
                "JINA_API_KEY": "jina_api_key,请从https://jina.ai/reader获取",
                "GOOGLE_AI_STUDIO_KEY": "Google AI Studio api key,请从https://aistudio.google.com/apikey获取",
                "PYTHONIOENCODING": "utf-8"
            },
            "disabled": false,
            "autoApprove": []
        }
    }
}

name.ai

name.ai提供了各种工具,例如搜索和阅读网页等。

其他