Setup:
# requires conda
pip install invoke
invoke setup
conda activate mcp-ploomber
If you're not using conda, create a virtual env and do:
pip install --editable .
You'll need to set up a virtual environment to run the MCP server. We provide setup scripts to make this easy:
- Run the setup script to create and configure the virtual environment:
# Make the script executable first
chmod +x setup_venv.sh
./setup_venv.sh
This script will:
- Create a Python virtual environment
- Install all required dependencies
- Set up the package in development mode
To configure the MCP server, you need to create an mcp.json
file:
- Run the generation script to create a personalized configuration:
# Make the script executable first
chmod +x generate_mcp_json.sh
./generate_mcp_json.sh
- Edit the generated
mcp.json
file to add your Ploomber Cloud API key:
{
"mcpServers": {
"ploomber-mcp": {
"command": "/path/to/your/venv/bin/python",
"args": [
"/path/to/your/src/mcp_ploomber/server.py"
],
"env": {
"_PLOOMBER_CLOUD_ENV": "",
"PLOOMBER_CLOUD_KEY": "YOUR_API_KEY_HERE"
},
"setup": "/path/to/your/setup_venv.sh"
}
}
}
Once you've completed the setup, you can start the MCP server manually using:
cd src/mcp_ploomber
mcp run server.py
To debug, you can also run the MCP server in dev mode:
mcp dev server.py
To add the MCP to your LLM client, simply copy/paste your mcp.json
where the client expects the MCP config file.