Skip to main content
Glama

Customized MCP Server

by MorvanZhou

定制MCP项目

该项目利用具有 CLI 支持的mcp库并与 OpenAI 的 API 集成。

要求

确保在运行项目之前安装所需的依赖项:

pip install -r requirements.txt

用法

  1. 将您的 OpenAI API 密钥配置为环境变量:
    export OPENAI_API_KEY="your-api-key"
  2. 启动 MCP 服务器:
    python server.py
  3. 使用客户端与服务器进行交互:
    python client.py
  4. 或者,使用协调器查询 LLM 和工具:
    python main.py

例子

查询天气工具

运行客户端并调用get_weather工具:

python client.py

交互示例:

You: List tools Assistant: { "tools": [ { "name": "get_weather", "description": "Get weather for a city", "parameters": { "city": { "type": "string", "description": "Name of the city" } } } ] } You: Call get_weather with {"city": "Beijing"} Assistant: 北京的天气是晴天

依赖项

  • openai==1.70.0
  • mcp[cli]==1.6.0

执照

该项目已获得 MIT 许可。

-
security - not tested
A
license - permissive license
-
quality - not tested

将 MCP 库与 OpenAI 的 API 集成在一起的服务器,允许用户通过自然语言查询与各种工具(例如天气工具)进行交互。

  1. 要求
    1. 用法
      1. 例子
        1. 查询天气工具
      2. 依赖项
        1. 执照

          Related MCP Servers

          • -
            security
            A
            license
            -
            quality
            A simple MCP server for interacting with OpenAI assistants. This server allows other tools (like Claude Desktop) to create and interact with OpenAI assistants through the Model Context Protocol.
            Last updated -
            33
            Python
            MIT License
            • Apple
          • -
            security
            F
            license
            -
            quality
            An OpenAI API-based MCP server that provides deep thinking and analysis capabilities, integrating with AI editor models to deliver comprehensive insights and practical solutions.
            Last updated -
          • -
            security
            A
            license
            -
            quality
            An MCP server that connects to OpenWeatherMap's API to provide current weather data and multi-day forecasts for locations worldwide in different measurement units.
            Last updated -
            23
            TypeScript
            MIT License
          • -
            security
            F
            license
            -
            quality
            An auto-generated MCP server that enables interaction with the OpenAI API, allowing users to access OpenAI's models and capabilities through the Multi-Agent Conversation Protocol.
            Last updated -
            Python

          View all related MCP servers

          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/MorvanZhou/customized_mcp'

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