wolfdancer/rockfish-mcp
If you are the rightful owner of rockfish-mcp and would like to certify it and/or have it hosted online, please leave a comment on the right or send an email to dayong@mcphub.com.
The Rockfish MCP Server provides a bridge to the Rockfish API, allowing AI assistants to interact with Rockfish's machine learning platform.
Rockfish MCP Server
A Model Context Protocol (MCP) server that provides access to the Rockfish API, enabling AI assistants to interact with Rockfish's machine learning platform.
Features
This MCP server provides tools for the following Rockfish resources:
- Databases: Create, list, update, and delete databases
- Worker Sets: Manage worker sets for distributed processing
- Workflows: Create and manage ML workflows
- Models: Upload, list, and manage ML models
- Projects: Organize and manage projects
- Datasets: Create and manage datasets
Installation
- Clone the repository and set up your virtual environment (Python 3.12 or below):
git clone https://github.com/yourusername/rockfish-mcp.git
cd rockfish-mcp
python3.11 -m venv .venv
source .venv/bin/activate
- Install dependencies (choose one method):
Method A: Install with dev tools (recommended for contributors):
pip install -e ".[dev]"
Method B: Install from requirements.txt (exact locked versions):
pip install -r requirements.txt
Method C: Install runtime only (for production):
pip install -e .
- Set up environment variables:
cp .env.example .env
# Edit .env and add your Rockfish API key
Configuration
Create a .env file with your Rockfish API credentials:
ROCKFISH_API_KEY=your_api_key_here
ROCKFISH_API_URL=https://api.rockfish.ai
If you want to use a specific Rockfish Organization and/or Rockfish Project,
add the following to the .env file too:
ROCKFISH_ORGANIZATION_ID=your_organization_id_here
ROCKFISH_PROJECT_ID=your_project_id_here
Usage
Run the MCP server:
python -m rockfish_mcp.server
Or use the console script:
rockfish-mcp
Claude Desktop Setup
To use this MCP server with Claude Desktop:
-
Complete some of the installation steps above (clone, install dependencies). Note that you do not need to start the MCP server manually for using it with Claude Desktop. Claude Desktop will automatically start it for you when you follow the steps below. Also, the .env file doesn't need to be created, we will be adding the environment variables to the Claude setup.
-
Find your Claude Desktop configuration directory:
- macOS:
~/Library/Application Support/Claude/ - Windows:
%APPDATA%\Claude\ - Linux:
~/.config/Claude/
- macOS:
-
Create or edit the
claude_desktop_config.jsonfile in that directory:
Note that setting ROCKFISH_ORGANIZATION_ID and ROCKFISH_PROJECT_ID is optional.
If you don't set these variables, the default organization and/or default project
will be used.
{
"mcpServers": {
"rockfish": {
"command": "/path/to/your/project/.venv/bin/python",
"args": ["-m", "rockfish_mcp.server"]
}
}
}
Note: Environment variables (API keys, URLs, organization/project IDs) are configured in the .env file in the project root, not in claude_desktop_config.json.
-
Update the paths in the configuration:
- Replace
/path/to/your/project/.venv/bin/pythonwith the actual path to your Python executable - All API keys and URLs should be configured in the
.envfile (see step 5)
- Replace
-
Get the correct Python path by running this command in your project directory:
which python
- Example configuration (replace with your actual path):
{
"mcpServers": {
"rockfish": {
"command": "/Users/shane/code/rockfish-mcp/.venv/bin/python",
"args": ["-m", "rockfish_mcp.server"]
}
}
}
Configure your API key and URL in the .env file:
ROCKFISH_API_KEY=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...
ROCKFISH_API_URL=https://api.rockfish.ai
-
Restart Claude Desktop after making these changes
-
Test the connection by asking Claude to list your Rockfish databases or projects
MCP Inspector Setup
The MCP Inspector is a debugging tool that helps you test your MCP server before connecting it to Claude Desktop.
Installation
npx @modelcontextprotocol/inspector
Usage
- Start the MCP Inspector:
npx @modelcontextprotocol/inspector /Users/shane/code/rockfish-mcp/.venv/bin/python -m rockfish_mcp.server
- Or create a test script for easier repeated testing:
#!/bin/bash
# test-mcp.sh
export ROCKFISH_API_KEY="your_api_key_here"
export ROCKFISH_API_URL="https://api.rockfish.ai"
npx @modelcontextprotocol/inspector /Users/shane/code/rockfish-mcp/.venv/bin/python -m rockfish_mcp.server
Make it executable and run:
chmod +x test-mcp.sh
./test-mcp.sh
-
The Inspector will open in your browser and show:
- Available tools (should show all 32 Rockfish tools)
- Tool schemas and descriptions
- Interactive tool testing interface
-
Test your tools by:
- Selecting a tool from the list (e.g.,
list_databases) - Filling in required parameters
- Clicking "Call Tool" to test the API call
- Viewing the response
- Selecting a tool from the list (e.g.,
Useful Tools to Test First
list_databases- Simple GET request with no parameterslist_projects- Another simple list operationget_database- Test with a database ID from the listcreate_database- Test creating a new resource
Troubleshooting
- MCP server not appearing: Check that the Python path is correct and the virtual environment is activated
- Authentication errors: Verify your
ROCKFISH_API_KEYis correct - Connection issues: Confirm your
ROCKFISH_API_URLis accessible - Path issues on Windows: Use forward slashes or escaped backslashes in JSON paths
Available Tools
Database Tools
list_databases: List all databasescreate_database: Create a new databaseget_database: Get a specific database by IDupdate_database: Update a databasedelete_database: Delete a database
Worker Set Tools
list_worker_sets: List all worker setscreate_worker_set: Create a new worker setget_worker_set: Get a specific worker set by IDdelete_worker_set: Delete a worker setget_worker_set_actions: List actions that the specific worker set can runlist_available_actions: List all actions available to the user (across all worker sets)
Workflow Tools
list_workflows: List all workflowscreate_workflow: Create and run a new workflowget_workflow: Get a specific workflow by IDupdate_workflow: Update a workflow
Model Tools
list_models: List all modelsupload_model: Upload a new modelget_model: Get a specific model by IDdelete_model: Delete a model
Organization Tools
get_active_organization: Get the currently active organizationlist_projects: List all organizations
Project Tools
get_active_project: Get the currently active projectlist_projects: List all projectscreate_project: Create a new projectget_project: Get a specific project by IDupdate_project: Update a project
Dataset Tools
list_datasets: List all datasetscreate_dataset: Create a new datasetget_dataset: Get a specific dataset by IDupdate_dataset: Update a datasetdelete_dataset: Delete a datasetget_dataset_schema: Get dataset metadata present in its schema
SDK Tools (Synthetic Data Generation)
These tools use the Rockfish Python SDK to provide end-to-end synthetic data generation workflows:
Configuration Management:
obtain_train_config: Generate training configuration for TabGAN model with automatic column type detectionupdate_train_config[experimental]: Modify training hyperparameters or field classifications
Workflow Execution:
start_training_workflow: Start TabGAN training workflow using cached configurationget_workflow_logs: Stream workflow logs with configurable level (DEBUG/INFO/WARN/ERROR) and timeoutget_trained_model_id: Extract trained model ID from completed training workflow
Synthetic Data Generation:
start_generation_workflow: Start generation workflow from trained modelobtain_synthetic_dataset_id: Extract generated dataset ID from completed workflow
Quality Assessment:
plot_distribution: Generate distribution plots comparing real and synthetic dataget_marginal_distribution_score: Calculate similarity score between real and synthetic data
Development
Setup
To contribute to this project, install with dev dependencies:
pip install -e ".[dev]"
This installs black, isort, and pytest for code formatting and testing.
Code Formatting
This project uses black and isort to maintain consistent code style.
Format your code before committing:
# Format imports
isort src/rockfish_mcp/
# Format code style
black src/rockfish_mcp/
Check formatting without modifying files:
isort --check-only src/rockfish_mcp/
black --check src/rockfish_mcp/
Running Tests
The project includes automated tests for the Manta incident injection tools. To run tests, you'll need to set up the required environment variables:
Required Environment Variables:
# Add these to your .env file or export them
ROCKFISH_API_KEY=your_api_key_here
ROCKFISH_API_URL=https://api.rockfish.ai
MANTA_API_URL=https://manta.rockfish.ai
ROCKFISH_ORGANIZATION_ID=your_organization_id
ROCKFISH_PROJECT_ID=your_project_id
INCIDENT_CREATION_TEST_DATASET=your_test_dataset_id
Running the tests:
# Run all tests
pytest tests/
# Run specific test file
pytest tests/test_create_incident_dataset.py
# Run tests with verbose output
pytest -v tests/
# Run tests and see print output
pytest -s tests/
Test Coverage:
-
test_create_incident_dataset.py: Tests the
create_incident_datasettool with all four incident types:instantaneous-spike-data: Sudden spikes in time-series datasustained-magnitude-change-data: Sustained changes over a time perioddata-outage-data: Simulated data gaps/outagesvalue-ramp-data: Gradual ramping changes
Test configurations are defined in
Note: The INCIDENT_CREATION_TEST_DATASET should be a valid dataset ID in your Rockfish project with time-series data suitable for incident injection testing.
Contributing
To contribute to this project:
- Fork the repository
- Create a feature branch
- Make your changes
- Format your code with isort and black
- Add tests if applicable
- Submit a pull request
License
MIT License