Customized MCP Server

by MorvanZhou
MIT License

Integrations

  • Integrates with OpenAI's API to provide LLM capabilities that can be queried through the MCP server, allowing for tools like weather information retrieval to be called via the client interface.

Customized MCP Project

This project leverages the mcp library with CLI support and integrates with OpenAI's API.

Requirements

Make sure to install the required dependencies before running the project:

pip install -r requirements.txt

Usage

  1. Configure your OpenAI API key as an environment variable:
    export OPENAI_API_KEY="your-api-key"
  2. Start the MCP server:
    python server.py
  3. Use the client to interact with the server:
    python client.py
  4. Alternatively, use the orchestrator to query the LLM and tools:
    python main.py

Example

Querying the Weather Tool

Run the client and call the get_weather tool:

python client.py

Example interaction:

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: 北京的天气是晴天

Dependencies

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

License

This project is licensed under the MIT License.

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

A server that integrates the MCP library with OpenAI's API, allowing users to interact with various tools, such as the weather tool, through natural language queries.

  1. Requirements
    1. Usage
      1. Example
        1. Querying the Weather Tool
      2. Dependencies
        1. License

          Related MCP Servers

          • -
            security
            A
            license
            -
            quality
            A Model Context Protocol (MCP) server that lets you seamlessly use OpenAI's models right from Claude.
            Last updated -
            1
            24
            28
            JavaScript
            MIT License
            • Apple
          • -
            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 -
            18
            Python
            MIT License
            • Apple
          • -
            security
            F
            license
            -
            quality
            A Model Context Protocol server implementation that enables connection between OpenAI APIs and MCP clients for coding assistance with features like CLI interaction, web API integration, and tool-based architecture.
            Last updated -
            9
            Python
            • Linux
            • Apple
          • A
            security
            A
            license
            A
            quality
            An MCP server that provides tools for interacting with Vercel API, enabling management of deployments, DNS records, domains, projects, and environment variables through natural language.
            Last updated -
            7
            60
            3
            TypeScript
            MIT License

          View all related MCP servers

          ID: b4nj5l9ncf