Add your description here
Project description
MCP-REPL
A lightweight REPL (Read-Eval-Print Loop) for interacting with various services through MCP (Model Control Protocol).
Overview
mcp-repl is designed for efficient development, debugging, and testing of MCP servers. It provides an intuitive command-line interface that's simpler than using the Cloud Desktop app, allowing developers to quickly:
- Send queries to MCP servers
- View detailed tool execution
- Automatically save chat history
- Test multiple MCP services simultaneously
Installation
Install via pip or uv:
uv add mcp-repl
Development Installation
Clone and install in editable mode:
git clone https://github.com/yourusername/mcp-repl.git
cd mcp-repl
uv venv
Databases Example
This example demonstrates how you can:
- Set up 3 databases (PostgreSQL, MySQL, Redis) in Kubernetes with mock data
- Run MCP servers for each dataset
- Interact with all databases from a single REPL
Key Features
- Natural language queries across multiple databases
- Comparison of data structures across systems
- Execution of complex operations seamlessly
Running the Example
Setup infrastructure (requires kind and helm):
bash examples/databases/setup.sh
Generate mock data:
python examples/databases/generate_mock_data.py
Start the REPL:
python -m src.mcp_repl.repl --config examples/databases/config.json --auto-approve-tools
Sample Queries
You can perform queries like:
- "Find all tables in PostgreSQL and MySQL"
- "Compare the structure of the 'users' table in PostgreSQL with the 'customers' table in MySQL"
- "Count the number of records in each database"
Usage
Start the REPL:
python -m src.mcp_repl.repl --config path/to/config.json
Optional Flags
--auto-approve-tools: Automatically approve all tool executions--always-show-full-output: Always display complete tool outputs--chat-history-dir PATH: Directory to save chat history (default:./chat_history)
Testing
Comprehensive integration tests are included to verify functionality:
Run all tests:
pytest
Run specific integration tests:
pytest ./test/integration/
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
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file mcp_repl-0.1.1.tar.gz.
File metadata
- Download URL: mcp_repl-0.1.1.tar.gz
- Upload date:
- Size: 58.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.6.4
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
e3d86ee1e81c8b9ae2b645a98a2291145a329e7b6e9fefed5eac20d6820fe0e5
|
|
| MD5 |
640b18f495602a7b4a1d943183dcade7
|
|
| BLAKE2b-256 |
2b48567e0592768b5b661c8008cbc972605874c37e2b3e28bce5a3d0caf208cc
|
File details
Details for the file mcp_repl-0.1.1-py3-none-any.whl.
File metadata
- Download URL: mcp_repl-0.1.1-py3-none-any.whl
- Upload date:
- Size: 12.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.6.4
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
d1ecb8259873e6744428f726fedcc154833945e4c20d17c6d508fe346bb41c77
|
|
| MD5 |
9e1d3a93c16c4b8a5d1eb1cebef62bcb
|
|
| BLAKE2b-256 |
8cc59e968495c2fb1b1c94a83d0c04e97a5eb99e6de05a3094678a7843a1a5c8
|