
Company News
AWS Security Hub Adds Socket for Supply Chain Security
Socket is now in the AWS Security Hub Extended plan. Adopt it through AWS, apply committed spend, and block malicious open source packages.
galaxy-mcp
Advanced tools
This is the Python implementation of the Galaxy MCP server, providing a Model Context Protocol server for interacting with Galaxy instances.
# Install from PyPI
pip install galaxy-mcp
# Or using uv (recommended)
uvx galaxy-mcp
# Clone the repository
git clone https://github.com/galaxyproject/galaxy-mcp.git
cd galaxy-mcp/mcp-server-galaxy-py
# Install with uv (recommended)
uv sync --all-extras
At minimum the server needs to know which Galaxy instance to target:
export GALAXY_URL="https://usegalaxy.org.au/"
How you authenticate depends on your transport:
Stdio / long-lived sessions – provide an API key:
export GALAXY_API_KEY="your-api-key"
HTTP / OAuth – configure the public URL that users reach and a signing secret for session tokens. The server mints short-lived Galaxy API keys on behalf of each user.
export GALAXY_MCP_PUBLIC_URL="https://mcp.example.com"
export GALAXY_MCP_SESSION_SECRET="$(openssl rand -hex 32)"
Optionally set GALAXY_MCP_CLIENT_REGISTRY to control where OAuth client registrations are stored.
For non-OAuth HTTP clients, connect(url=..., api_key=...) stores Galaxy credentials per MCP
session rather than globally. Clients normally preserve MCP sessions by default, which allows
multiple users to share the same MCP server while keeping their Galaxy credentials isolated.
You can also steer the transport with GALAXY_MCP_TRANSPORT (stdio, streamable-http, or sse).
All variables can be placed in a .env file for convenience.
uvx# Local stdio transport (no network listener)
uvx galaxy-mcp
# Remote/browser clients with HTTP + OAuth
export GALAXY_URL="https://usegalaxy.org.au/"
export GALAXY_MCP_PUBLIC_URL="https://mcp.example.com"
export GALAXY_MCP_SESSION_SECRET="$(openssl rand -hex 32)"
uvx galaxy-mcp --transport streamable-http --host 0.0.0.0 --port 8000
pip install galaxy-mcp
galaxy-mcp --transport streamable-http --host 0.0.0.0 --port 8000
If --transport is omitted the server defaults to stdio and reads/writes MCP messages via stdin/stdout.
uv sync
uv run galaxy-mcp --transport streamable-http --host 0.0.0.0 --port 8000
See USAGE_EXAMPLES.md for detailed tool usage patterns.
Galaxy MCP exposes 30+ @mcp.tool registrations, which costs tokens on every turn for agents that only ever use a handful. --discovery-mode code (also honored via GALAXY_MCP_DISCOVERY_MODE=code) collapses the whole catalog into three meta-tools:
search -- BM25 search over tool names and descriptionsget_schema -- fetch the full schema for specific toolsrun_galaxy_tool -- execute any tool by namepip install 'galaxy-mcp[code-mode]' # pulls in pydantic-monty sandbox
galaxy-mcp --discovery-mode code
The code-mode extra installs pydantic-monty, the sandboxed Python interpreter that backs run_galaxy_tool. Without it the server still starts in full mode but raises a clear error if --discovery-mode code is requested.
Default is full, which keeps the existing catalog unchanged. CodeMode is useful when you want to keep the agent's context lean and are willing to trade a few extra turns (search -> schema -> execute) per tool call. It's built on FastMCP's experimental CodeMode transform, so the API may shift before it stabilizes.
The server also ships agent-facing usage guidance via the MCP instructions field (returned during the initial handshake). It explains the typical workflow, the difference between MCP tools and Galaxy tools (e.g. FastQC isn't an MCP tool -- find it via search_tools_by_name), and -- when code mode is active -- how to use run_galaxy_tool and call_tool. Agents that respect the instructions field will read this without you having to prompt them.
The Python implementation provides the following MCP tools:
connect: Establish connection to a Galaxy instancesearch_tools_by_name: Find Galaxy tools by nameget_tool_details: Retrieve detailed tool informationrun_tool: Execute a Galaxy tool with parametersget_tool_panel: Retrieve the Galaxy tool panel structureget_tool_run_examples: Retrieve XML-defined test lessons that show how to run a toolget_tool_input_template: Returns a ready-to-fill inputs skeleton (with placeholders) plus the parameter schema for a tool, to build correct run_tool inputsget_user: Get current user informationget_histories: List available Galaxy historieslist_history_ids: Get simplified list of history IDs and namesget_history_details: Get detailed information about a specific historyupload_file: Upload local files to Galaxyupload_file_from_url: Upload files from URLs to Galaxylist_workflows: List available workflows in Galaxy instanceget_workflow_details: Get detailed information about a specific workflowinvoke_workflow: Execute/run a workflow with specified inputscancel_workflow_invocation: Cancel a running workflow invocationget_invocations: View workflow executionsget_iwc_workflows: Access Interactive Workflow Composer workflowssearch_iwc_workflows: Search IWC workflows by keywordsimport_workflow_from_iwc: Import an IWC workflow to GalaxyThe project includes a comprehensive test suite using pytest with mock-based testing.
# Install test dependencies
uv pip install -r requirements-test.txt
# Run all tests
uv run pytest
# Run with coverage report
uv run pytest --cov=main --cov-report=html
# Run specific test file
uv run pytest tests/test_history_operations.py
# Run tests with verbose output
uv run pytest -v
Tests are organized by functionality:
test_connection.py - Galaxy connection and authenticationtest_history_operations.py - History-related operationstest_dataset_operations.py - Dataset upload/downloadtest_tool_operations.py - Tool search and executiontest_workflow_operations.py - Workflow import and invocationtest_integration.py - End-to-end scenariosSee tests/README.md for more details on the testing strategy.
# Install development dependencies
make install-dev
# Set up pre-commit hooks (required for contributing)
uv run pre-commit install
Pre-commit hooks will automatically format your code and run linting checks when you commit. All contributors should install these hooks to maintain consistent code quality.
We use a Makefile for consistent development commands:
# Show all available commands
make help
# Install dependencies
make install # Install all dependencies
# Code quality
make lint # Format code and run all checks
# Testing
make test # Run tests with coverage
# Building
make clean # Clean build artifacts
make build # Build distribution packages
# Running
make run # Run the MCP server
make dev # Run FastMCP2 dev server
All commands can also be run directly with uv:
# Install dependencies
uv sync --all-extras
# Format and lint code
uv run pre-commit run --all-files
# Run tests with coverage
uv run pytest --cov=galaxy_mcp --cov-report=html
# Update dependencies
uv lock --upgrade
Test across multiple Python versions using tox:
# Test on all supported Python versions
tox
# Test on specific version
tox -e py312
# Run only linting
tox -e lint
# Run type checking
tox -e type
The project uses pre-commit hooks for automatic code quality checks:
# Install pre-commit hooks (one-time setup)
uv run pre-commit install
# Run pre-commit manually on all files
uv run pre-commit run --all-files
# Skip pre-commit for a single commit (not recommended)
git commit --no-verify
Pre-commit runs automatically on git commit and includes:
FAQs
Model Context Protocol server for Galaxy bioinformatics platform
The pypi package galaxy-mcp receives a total of 33 weekly downloads. As such, galaxy-mcp popularity was classified as not popular.
We found that galaxy-mcp demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Company News
Socket is now in the AWS Security Hub Extended plan. Adopt it through AWS, apply committed spend, and block malicious open source packages.

Research
/Security News
Popular npm packages keyv and cacheable compromised.

Security News
A misconfiguration gave three Anthropic models internet access, and one, believing it was in a simulation, shipped a credential-stealing package to PyPI.