Skip to main content
Glama

使用uv管理python环境

  • uv启动mcp服务的python脚本

uv run --with mcp[cli] mcp run path/to/mcp.py
  • uvx启动mcp服务的python脚本

uvx --with pillow --with mcp[cli] fastmcp run path/to/mcp.py

启动单个mcp服务 sse和streamable-http两种模式的URL路径

# sse 模式
http://127.0.0.1:8000/sse  # 默认8000端口
http://host.docker.internal:8000/sse  # docker容器内访问
# streamable-http 模式
http://127.0.0.1:8000/mcp  # 默认8000端口
http://host.docker.internal:8000/mcp  # docker容器内访问

使用mcp工具的多种基本配置示例参考:

// 涉及3种模式:stdio,sse,streamable_http
{
  // streamable_http模式
  "mcpServers": {
    "math": {
      "transport": "streamable_http",
      "url": "http://127.0.0.1:8000/mcp"
    },
    // sse模式
    "weather": {
      "transport": "sse",
      "url": "http://127.0.0.1:8000/sse"
    },
    "12306-mcp": {
      "type": "sse",
      "url": "https://mcp.api-inference.modelscope.cn/sse/76ee2dbba8d74f"
    },
    "sequentialthinking": {
      "headers": {
        "Accept": "application/json, text/event-stream",
        "Authorization": "Bearer 0e51a8cd-e77f-072ec3f3d161"
      },
      "url": "https://mcp.api-inference.modelscope.cn/sse/bb19488b5bc049"
    },
    // 本地服务 stdio模式
    "quickchart-server": {
      "isActive": true,
      "command": "cmd",
      "args": [
        "/c",
        "npx",
        "-y",
        "@gongrzhe/quickchart-mcp-server"
      ],
      "name": "quickchart-server"
    },
    "excel-mcp-server": {
      "isActive": true,
      "command": "cmd",
      "args": [
        "/c",
        "npx",
        "--yes",
        "@zhiweixu/excel-mcp-server"
      ],
      "env": {
        "LOG_PATH": "C:\\Users\\username\\Desktop\\temp",
        "CACHE_MAX_AGE": "1",
        "CACHE_CLEANUP_INTERVAL": "4",
        "LOG_RETENTION_DAYS": "7",
        "LOG_CLEANUP_INTERVAL": "24"
      },
      "name": "excel-mcp-server"
    }
  }
}

STDIO 模式启动说明

如果需要在客户端以 stdio 模式启动本项目:

  1. 环境准备: 在项目根目录下运行以下命令,安装 MCP 命令行工具:

uv add "mcp[cli]"
  1. 启动配置: 在配置客户端时,使用 uv 作为命令,并配合 --directory 参数指定项目路径。

    • 命令: uv

    • 参数: ["--directory", "/Users/hfhfn/charmProjects/mcp_server/", "run", "main.py"]

F
license - not found
-
quality - not tested
F
maintenance

Maintenance

Maintainers
Response time
Release cycle
Releases (12mo)
Commit activity

Resources

Unclaimed servers have limited discoverability.

Looking for Admin?

If you are the server author, to access and configure the admin panel.

Related MCP Servers

  • F
    license
    B
    quality
    D
    maintenance
    A template MCP server that provides a basic structure and configuration for building Model Context Protocol servers. Includes Docker support, environment configuration, and examples for both STDIO and SSE transport modes.
    Last updated
    1
  • A
    license
    -
    quality
    D
    maintenance
    A demonstration MCP server supporting both Stdio and SSE transports, providing example tools (echo, add, time, UUID generation) and resources for learning and testing MCP implementations.
    Last updated
    21
    MIT
  • F
    license
    -
    quality
    D
    maintenance
    A starter template for building MCP servers in Python using the streamable HTTP transport protocol. Provides a foundation with the MCP Python SDK and example configuration to quickly develop custom MCP servers.
    Last updated
    2
  • F
    license
    -
    quality
    D
    maintenance
    Enables creating and managing MCP server configurations with SSE streaming endpoints via a UI, deployable on Render with zero infrastructure.
    Last updated
    3

View all related MCP servers

Related MCP Connectors

  • MCP server for the FFmpeg Micro video transcoding API — create, monitor, download transcodes.

  • A MCP server built for developers enabling Git based project management with project and personal…

  • The official MCP Server from Mia-Platform to interact with Mia-Platform Console

View all MCP Connectors

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/hfhfn/mcp_server'

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