Skip to main content

A comprehensive MCP client with direct connection and AI agent modes, including web interface

Project description

Egile MCP Client

A comprehensive Model Context Protocol (MCP) client that provides two operational modes and a web interface for interacting with MCP servers.

Features

  • Two Operation Modes:
    • Direct Mode: Connect directly to MCP server tools and resources
    • Agent Mode: Use a generic AI agent that works with any MCP server
  • Multiple Interfaces:
    • Terminal CLI: Command-line interface for both modes
    • Web Chat Interface: Browser-based chatbot with conversation history
  • AI Provider Support: OpenAI, Anthropic Claude, xAI Grok, and extensible for other providers
  • Conversation History: Persistent chat history across sessions
  • Real-time Communication: WebSocket support for live interactions

Quick Start

Installation

# Install dependencies
pip install -e .

# Or using poetry
poetry install

Configuration

Create a config.yaml file:

# AI Providers (for agent mode)
ai_providers:
  openai:
    api_key: "your-openai-api-key"
    model: "gpt-4"
  anthropic:
    api_key: "your-anthropic-api-key"
    model: "claude-3-sonnet-20240229"
  xai:
    api_key: "your-xai-api-key"
    model: "grok-3"

# MCP Servers
mcp_servers:
  - name: "example_server"
    url: "http://localhost:8000"
    type: "http"
  - name: "local_server"
    command: ["python", "/path/to/server/main.py"]
    type: "stdio"

# Default settings
default_ai_provider: "openai"
web_interface:
  host: "localhost"
  port: 8080

Usage

Terminal Interface

# Direct mode - connect directly to MCP server
egile-mcp-client direct --server example_server

# Agent mode - use AI agent with MCP tools
egile-mcp-client agent --provider openai

# List available tools from a server
egile-mcp-client tools --server example_server

# Interactive chat in terminal
egile-mcp-client chat --mode agent --provider openai

Web Interface

# Start the web server
egile-mcp-client web

# Then open http://localhost:8080 in your browser

Architecture

egile-mcp-client/
├── egile_mcp_client/
│   ├── __init__.py
│   ├── cli.py              # Command-line interface
│   ├── config.py           # Configuration management
│   ├── mcp/
│   │   ├── __init__.py
│   │   ├── client.py       # MCP client implementation
│   │   ├── connection.py   # Connection management
│   │   └── protocol.py     # MCP protocol handling
│   ├── agents/
│   │   ├── __init__.py
│   │   ├── base.py         # Base agent interface
│   │   ├── openai_agent.py # OpenAI implementation
│   │   └── anthropic_agent.py # Anthropic implementation
│   ├── web/
│   │   ├── __init__.py
│   │   ├── app.py          # FastAPI web application
│   │   ├── routes.py       # API routes
│   │   ├── static/         # Static files (CSS, JS)
│   │   └── templates/      # HTML templates
│   └── utils/
│       ├── __init__.py
│       ├── history.py      # Conversation history
│       └── logging.py      # Logging utilities
├── tests/
├── config.example.yaml
└── README.md

License

MIT License

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

egile_mcp_client-0.1.3.tar.gz (30.2 kB view details)

Uploaded Source

Built Distribution

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

egile_mcp_client-0.1.3-py3-none-any.whl (37.8 kB view details)

Uploaded Python 3

File details

Details for the file egile_mcp_client-0.1.3.tar.gz.

File metadata

  • Download URL: egile_mcp_client-0.1.3.tar.gz
  • Upload date:
  • Size: 30.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.9

File hashes

Hashes for egile_mcp_client-0.1.3.tar.gz
Algorithm Hash digest
SHA256 aed89265ff252eafe805846cbaa5c9c37b0356edae9ad54035f660c180272432
MD5 a14146f2634b7b90abde18b92a9273a4
BLAKE2b-256 f18718b49e292ac0886328b94e79f3c2f903a0772f59aa6f1551a9daf4c5a34c

See more details on using hashes here.

File details

Details for the file egile_mcp_client-0.1.3-py3-none-any.whl.

File metadata

File hashes

Hashes for egile_mcp_client-0.1.3-py3-none-any.whl
Algorithm Hash digest
SHA256 42e4cca7c7ed1d5c7f0395a089d1252cb9855a7c19fb1ebbb7a39721a2cca578
MD5 6ace06fb3c746232bdd9f8016290f980
BLAKE2b-256 481ae44fb54041dac7d9202e8733a5a900fc4250875051b5784c1931a4645d04

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