Skip to main content

Universal MCP Client with multi-transport support and LLM-powered tool routing

Project description

๐Ÿš€ MCPOmni Connect - Universal Gateway to MCP Servers

MCPOmni Connect is a powerful, universal command-line interface (CLI) that serves as your gateway to the Model Context Protocol (MCP) ecosystem. It seamlessly integrates multiple MCP servers, AI models, and various transport protocols into a unified, intelligent interface.

โœจ Key Features

๐Ÿ”Œ Universal Connectivity

  • Multi-Protocol Support
    • Native support for stdio transport
    • Server-Sent Events (SSE) for real-time communication
    • Docker container integration
    • NPX package execution
    • Extensible transport layer for future protocols

๐Ÿง  AI-Powered Intelligence

  • Advanced LLM Integration
    • Seamless OpenAI model integration
    • Dynamic system prompts based on available capabilities
    • Intelligent context management
    • Automatic tool selection and chaining

๐Ÿ’ฌ Prompt Management

  • Advanced Prompt Handling
    • Dynamic prompt discovery across servers
    • Flexible argument parsing (JSON and key-value formats)
    • Cross-server prompt coordination
    • Intelligent prompt validation
    • Context-aware prompt execution
    • Real-time prompt responses
    • Support for complex nested arguments
    • Automatic type conversion and validation

๐Ÿ› ๏ธ Tool Orchestration

  • Dynamic Tool Discovery & Management
    • Automatic tool capability detection
    • Cross-server tool coordination
    • Intelligent tool selection based on context
    • Real-time tool availability updates

๐Ÿ“ฆ Resource Management

  • Universal Resource Access
    • Cross-server resource discovery
    • Unified resource addressing
    • Automatic resource type detection
    • Smart content summarization

๐Ÿ”„ Server Management

  • Advanced Server Handling
    • Multiple simultaneous server connections
    • Automatic server health monitoring
    • Graceful connection management
    • Dynamic capability updates

๐Ÿ—๏ธ Architecture

Core Components

MCPOmni Connect
โ”œโ”€โ”€ Transport Layer
โ”‚   โ”œโ”€โ”€ Stdio Transport
โ”‚   โ”œโ”€โ”€ SSE Transport
โ”‚   โ””โ”€โ”€ Docker Integration
โ”œโ”€โ”€ Session Management
โ”‚   โ”œโ”€โ”€ Multi-Server Orchestration
โ”‚   โ””โ”€โ”€ Connection Lifecycle Management
โ”œโ”€โ”€ Tool Management
โ”‚   โ”œโ”€โ”€ Dynamic Tool Discovery
โ”‚   โ”œโ”€โ”€ Cross-Server Tool Routing
โ”‚   โ””โ”€โ”€ Tool Execution Engine
โ””โ”€โ”€ AI Integration
    โ”œโ”€โ”€ LLM Processing
    โ”œโ”€โ”€ Context Management
    โ””โ”€โ”€ Response Generation

๐Ÿš€ Getting Started

Prerequisites

  • Python 3.12+
  • OpenAI API key
  • UV package manager (recommended)

Quick Start

  1. Installation

    # Clone the repository
    git clone https://github.com/Abiorh001/mcp_connect.git
    cd mcp_connect
    
    # Create and activate virtual environment
    uv venv
    source .venv/bin/activate
    
    # Install dependencies
    uv sync
    
  2. Configuration

    # Set up environment variables
    echo "OPENAI_API_KEY=your_key_here" > .env
    
    # Configure your servers in servers_config.json
    

Server Configuration Examples

{   
    "LLM": {
        "model": "gpt-4o-mini",
        "temperature": 0.5,
        "max_tokens": 5000,
        "top_p": 0
    },
    "mcpServers": {
        "filesystem-server": {
            "command": "npx",
            "args": [
                "@modelcontextprotocol/server-filesystem",
                "/path/to/files"
            ]
        },
        "sse-server": {
            "type": "sse",
            "url": "http://localhost:3000/mcp",
            "headers": {
                "Authorization": "Bearer token"
            },
        },
        "docker-server": {
            "command": "docker",
            "args": ["run", "-i", "--rm", "mcp/server"]
        }
    }
}

๐ŸŽฏ Usage

Interactive Commands

  • /tools - List all available tools across servers
  • /prompts - View available prompts
  • /prompt:<name>/<args> - Execute a prompt with arguments
    # Example: Weather prompt
    /prompt:weather/location=tokyo/units=metric
    
    # Alternative JSON format
    /prompt:weather/{"location":"tokyo","units":"metric"}
    
  • /resources - List available resources
  • /resource:<uri> - Access and analyze a resource
  • /debug - Toggle debug mode
  • /refresh - Update server capabilities

Prompt Management

# List all available prompts
/prompts

# Basic prompt usage
/prompt:weather/location=tokyo

# Prompt with multiple arguments depends on the server prompt arguments requirements
/prompt:travel-planner/from=london/to=paris/date=2024-03-25

# JSON format for complex arguments
/prompt:analyze-data/{
    "dataset": "sales_2024",
    "metrics": ["revenue", "growth"],
    "filters": {
        "region": "europe",
        "period": "q1"
    }
}

# Nested argument structures
/prompt:market-research/target=smartphones/criteria={
    "price_range": {"min": 500, "max": 1000},
    "features": ["5G", "wireless-charging"],
    "markets": ["US", "EU", "Asia"]
}

Advanced Prompt Features

  • Argument Validation: Automatic type checking and validation
  • Default Values: Smart handling of optional arguments
  • Context Awareness: Prompts can access previous conversation context
  • Cross-Server Execution: Seamless execution across multiple MCP servers
  • Error Handling: Graceful handling of invalid arguments with helpful messages
  • Dynamic Help: Detailed usage information for each prompt

AI-Powered Interactions

The client intelligently:

  • Chains multiple tools together
  • Provides context-aware responses
  • Automatically selects appropriate tools
  • Handles errors gracefully
  • Maintains conversation context

๐Ÿ”ง Advanced Features

Tool Orchestration

# Example of automatic tool chaining if the tool is available in the servers connected
User: "Find charging stations near Silicon Valley and check their current status"

# Client automatically:
1. Uses Google Maps API to locate Silicon Valley
2. Searches for charging stations in the area
3. Checks station status through EV network API
4. Formats and presents results

Resource Analysis

# Automatic resource processing
User: "Analyze the contents of /path/to/document.pdf"

# Client automatically:
1. Identifies resource type
2. Extracts content
3. Processes through LLM
4. Provides intelligent summary

๐Ÿค Contributing

We welcome contributions! See our Contributing Guide for details.

๐Ÿ“„ License

This project is licensed under the MIT License - see the LICENSE file for details.

๐Ÿ“ฌ Contact & Support


Built with โค๏ธ by the MCPOmni Connect Team

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

mcpomni_connect-0.1.0.tar.gz (18.9 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

mcpomni_connect-0.1.0-py3-none-any.whl (21.0 kB view details)

Uploaded Python 3

File details

Details for the file mcpomni_connect-0.1.0.tar.gz.

File metadata

  • Download URL: mcpomni_connect-0.1.0.tar.gz
  • Upload date:
  • Size: 18.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.3

File hashes

Hashes for mcpomni_connect-0.1.0.tar.gz
Algorithm Hash digest
SHA256 95374ddd7481819755a875bf2a7409f409163faf1c821fd8d6e7c1756811ed7d
MD5 07c216a1e343541a2709193fef0e50a3
BLAKE2b-256 322e334561ea8e0a04fdfc035fbfb43592be9e5be7e49b181db99950eeb1edb5

See more details on using hashes here.

File details

Details for the file mcpomni_connect-0.1.0-py3-none-any.whl.

File metadata

File hashes

Hashes for mcpomni_connect-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 0a45b96b3ed25ae7871bd54b5d0733499c3e0055cbdd001a62289a6d1dc7e2d3
MD5 1acb7ed659b37f88886c6c6f14d22171
BLAKE2b-256 58a7a48918dcf813fdef4438dea2b40c7d6043f05a0e09ea8d2e264c46fb31ea

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page