Skip to main content
 _   _       _ __  __  ____ ____ 
| | | | ___ (_)  \/  |/ ___|  _ \
| | | |/ _ \| | |\/| | |   | |_) |
| |_| | | | | | |  | | |___|  __/ 
 \___/|_| |_|_|_|  |_|\____|_|    
  Universal MCP Client

UniMCP

A simple, Python-native client library to connect to any Model Context Protocol (MCP) server. UniMCP allows you to interact with tools seamlessly via native Python code, an interactive CLI, or an autonomous LLM agent.

Features

  • Multiple Transports: Connect to remote servers via SSE (http://...) or local executables via Stdio (server.py, npx ...).
  • Dynamic Tool Generation: Automatically converts MCP tools into native Python async functions with IDE support.
  • Interactive CLI Playground: Test and chat with your tools straight from the terminal.
  • LLM Integration: Built-in, provider-agnostic LLM wrapper (OpenAI, Groq, Ollama, etc.) to hook your MCP server tools directly into an autonomous agent.
  • Session Management: Automatically persist and resume multi-turn conversations with context awareness.

Installation

pip install unimcp

🚀 Interactive CLI

The CLI provides a quick way to chat with your MCP server without writing any code.

Quick Start

Run the chat command from your terminal:

unimcp-chat

Configuration

The CLI uses environment variables from your .env file by default. To make it work, add these to your .env:

  • MCP_SERVER: The endpoint of your server (e.g., http://localhost:8000/sse or reference/server.py).
  • LLM_API_KEY: Your LLM provider API key.
  • LLM_BASE_URL: The API base URL (e.g., for NVIDIA NIM or Gemini).
  • LLM_MODEL_NAME: The specific model you wish to use.

CLI Options

You can override environment variables using flags:

  • --url <url>: Override the server endpoint.
  • --api-key <key>: Override the API key.
  • --base-url <url>: Override the LLM base URL.
  • --model <name>: Override the model name.
  • --system-prompt "text": Set a custom system instruction.

Example:

unimcp-chat --url http://localhost:8000/sse --model meta/llama-3.1-70b --api-key sk-123...

Metadata

Release files for unimcp 1.3.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for unimcp 1.3.0
File Size Uploaded Provenance Actions
unimcp-1.3.0.tar.gz 73.1 kB Without provenance Details for unimcp-1.3.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for unimcp 1.3.0
File Interpreter ABI Platform Actions
unimcp-1.3.0-py3-none-any.whl Python 3 none any Details for unimcp-1.3.0-py3-none-any.whl

Total release size: 97.0 kB

Release files / unimcp-1.3.0.tar.gz

Download URL unimcp-1.3.0.tar.gz
Size 73.1 kB
Tags Source
SHA-256 checksum
How to use checksums
4187fa9927d32ceefb9f44fe12bf1d2bb7c7195998eff02d259b85907935bfdf
BLAKE2b-256 checksum
How to use checksums
fba75d999583a98e6adfdaacae2573f5b7baa101c39df69f3e79a0832973bc7b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.13.5

Release files / unimcp-1.3.0-py3-none-any.whl

Download URL unimcp-1.3.0-py3-none-any.whl
Size 23.9 kB
Tags Python 3
SHA-256 checksum
How to use checksums
4ca4bcd9f20e181e8e475aff7e006b9efc8fb6d0bed558293f63a670e95a0d31
BLAKE2b-256 checksum
How to use checksums
03bb888f63de0c27e818900dd67cc149b963cd11e5f722df3c84f03fc92f0f3f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.13.5

Security for unimcp 1.3.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page