A production-ready Model Context Protocol (MCP) server for OpenProblems spatial transcriptomics workflows, built with FastMCP 2.0 and designed to work seamlessly with Continue.dev in VSCode.
This MCP server provides bioinformatics-specific tools that complement Continue.dev's built-in capabilities, focusing on:
- Spatial transcriptomics domain expertise (data validation, method development)
- Bioinformatics tool execution (Nextflow, Viash, Docker)
- OpenProblems ecosystem integration (benchmarking, method validation)
- Workflow state management (long-running pipeline tracking)
Note: This server does NOT duplicate Continue.dev's built-in file operations, terminal commands, or git functionality. Instead, it provides specialized bioinformatics capabilities that work alongside Continue.dev's existing tools.
pip install openproblems-spatial-mcp
Add to your Continue.dev configuration (~/.continue/config.json
):
{
"mcpServers": {
"openproblems-spatial": {
"command": "openproblems-mcp-server",
"args": [],
"env": {
"OPENPROBLEMS_MCP_LOG_LEVEL": "INFO"
}
}
}
}
-
Check server health:
openproblems-mcp check
-
Start the server (usually automatic via Continue.dev):
openproblems-mcp-server
-
Initialize configuration:
openproblems-mcp init
The system operates as invisible local infrastructure in your development environment:
graph TB
subgraph "Development Environment"
subgraph "IDE"
VSCode[VSCode IDE]
Continue[Continue.dev Extension]
VSCode --> Continue
end
subgraph "MCP Server (Local Process)"
MCP[FastMCP Server]
Tools[Bioinformatics Tools]
State[Workflow State]
MCP --> Tools
MCP --> State
end
subgraph "Local Tools"
Nextflow[Nextflow]
Viash[Viash]
Docker[Docker]
Git[Git]
end
subgraph "User Files"
Workspace[Project Files]
Data[Spatial Data]
Configs[Configurations]
end
end
Continue -.->|MCP Protocol| MCP
Tools --> Nextflow
Tools --> Viash
Tools --> Docker
State -.-> Workspace
MCP -.-> Data
style MCP fill:#e1f5fe
style Tools fill:#f3e5f5
style Continue fill:#e8f5e8
health_check
: Check server and tool statuslist_tools_status
: List bioinformatics tool availabilityget_server_info
: Get server configuration details
run_nextflow_workflow
: Execute Nextflow pipelines locallybuild_viash_component
: Build Viash componentsexecute_viash_component
: Run Viash componentsbuild_docker_image
: Build Docker images
validate_spatial_data
: Validate SpatialData/zarr/AnnData formatsanalyze_spatial_metadata
: Extract spatial data metadatasetup_spatial_environment
: Generate conda/pip environmentscreate_spatial_component
: Generate Viash components for spatial methods
analyze_openproblems_repo
: Analyze repository structurebuild_openproblems_method
: Build methods with OpenProblems frameworkrun_openproblems_benchmark
: Execute benchmarksvalidate_openproblems_submission
: Validate submissions
get_execution_status
: Check workflow statuscancel_execution
: Cancel running workflowsget_execution_history
: View execution history
config://server
: Server configuration (JSON)status://tools
: Tool detection status (JSON)status://health
: OverON)health status (JSON)
The server works out-of-the-box with sensible defaults. Optional configuration:
~/.openproblems-mcp/config.yaml
(user-wide).openproblems-mcp.yaml
(project-specific)
server:
log_level: INFO
max_concurrent_executions: 3
default_timeout_seconds: 3600
workspace_root: "."
tools:
nextflow_executable: nextflow
viash_executable: viash
docker_executable: docker
git_executable: git
python_executable: python
OPENPROBLEMS_MCP_WORKSPACE_ROOT
: Workspace directoryOPENPROBLEMS_MCP_LOG_LEVEL
: Logging level (DEBUG, INFO, WARNING, ERROR)OPENPROBLEMS_MCP_MAX_CONCURRENT
: Max concurrent executionsOPENPROBLEMS_MCP_TIMEOUT
: Default timeout in secondsOPENPROBLEMS_MCP_NEXTFLOW_EXECUTABLE
: Nextflow executable pathOPENPROBLEMS_MCP_VIASH_EXECUTABLE
: Viash executable pathOPENPROBLEMS_MCP_DOCKER_EXECUTABLE
: Docker executable path
This server complements Continue.dev's built-in tools:
- File operations (
read_file
,create_new_file
) - Search operations (
exact_search
,file_glob_search
) - Terminal commands (
run_terminal_command
) - Git operations (
view_diff
) - Directory operations (
view_subdirectory
)
- Bioinformatics tool execution and management
- Spatial transcriptomics domain expertise
- OpenProblems ecosystem integration
- Long-running workflow state management
- Domain-specific error analysis and remediation
Continue.dev Agent: "I need to develop a spatial clustering method"
β
1. Agent uses Continue.dev's file tools to read existing code
2. Agent calls our validate_spatial_data to check test data
3. Agent calls our create_spatial_component to generate Viash component
4. Agent uses Continue.dev's terminal to run tests
5. Agent calls our build_openproblems_method to prepare submission
Continue.dev Agent: "Let's optimize this Nextflow pipeline"
β
1. Agent uses Continue.dev's file tools to read pipeline code
2. Agent calls our run_nextflow_workflow to test execution
3. Agent calls our get_execution_status to monitor progress
4. Agent uses Continue.dev's diff tools to review changes
5. Agent calls our validate_openproblems_submission to check compliance
git clone https://github.com/openproblems-bio/SpatialAI_MCP.git
cd SpatialAI_MCP
# Install in development mode
pip install -e ".[dev]"
# Run tests
pytest
# Format code
black src/
ruff check src/
src/openproblems_mcp/
βββ __init__.py # Package initialization
βββ main.py # Main entry point
βββ server.py # FastMCP server core
βββ cli.py # CLI commands
βββ config.py # Configuration management
βββ tool_detection.py # Tool detection logic
βββ exceptions.py # Error handling
- Python 3.8 or higher
- Operating System: Linux, macOS, or Windows
- Nextflow: For pipeline execution
- Viash: For component building and execution
- Docker: For container operations
- Git: For repository operations
- Python/Conda: For environment management
- β Clean Python package structure
- β FastMCP-based server architecture
- β Comprehensive logging and configuration
- β Local tool detection and validation
- β Pip-installable with CLI commands
- β Health monitoring and status reporting
- π§ Bioinformatics tool execution (Task 2)
- π§ Spatial data validation (Task 3)
- π§ OpenProblems integration (Task 4)
- π§ Workflow state management (Task 5)
FastMCP 2.0 provides:
- Minimal boilerplate: Focus on functionality, not protocol details
- Production-ready: Built for real-world deployment scenarios
- High performance: Optimized for MCP protocol efficiency
- Pythonic: Clean, intuitive API design
- Comprehensive: Full MCP ecosystem support
This implementation is significantly cleaner and more maintainable than raw MCP protocol implementations.
- Installation Guide: See Quick Start section above
- API Reference: Coming soon
- Continue.dev Integration: See Integration section above
- Troubleshooting: Use
openproblems-mcp check
for diagnostics
We welcome contributions! Please:
- Focus on bioinformatics-specific functionality
- Avoid duplicating Continue.dev built-in tools
- Follow the FastMCP patterns established in the codebase
- Add tests for new functionality
This project is licensed under the MIT License - see the LICENSE file for details.
- OpenProblems Initiative: For standardizing benchmarking in spatial biology
- FastMCP: For providing an excellent MCP framework
- Continue.dev: For creating a powerful AI coding assistant platform
- GitHub Issues: Report bugs and request features
- Health Check: Run
openproblems-mcp check
for diagnostics - OpenProblems: Learn about OpenProblems