An AI co-pilot for computational biologists working on the OpenProblems spatial transcriptomics benchmarks. It ships two complementary pieces:
- An MCP server (
src/openproblems_mcp/) β domain-aware validation and analysis tools, built with FastMCP and exposed over the Model Context Protocol so any MCP-capable agent can use them. - A provider-agnostic skill installer (
installer/) β author rules, skills, and domain context once (AGENTS.md,skills/,context/) and install them into Claude Code, OpenAI Codex, Cursor, GitHub Copilot, or Gemini CLI.
Provide bioinformatics-specific capability that complements an agent's built-in file/terminal/git tools, focusing on:
- Spatial transcriptomics domain expertise (data validation, metadata analysis)
- OpenProblems ecosystem alignment (SpatialData/zarr, Viash, the iST pipeline)
- Portable agent setup (one set of rules/skills, every major coding agent)
The server does NOT duplicate an agent's built-in file operations, terminal commands, or git functionality. It adds specialized analysis that works alongside them. Pipeline execution is on the roadmap β see Tools below.
pip install -e . # from a clone; provides both CLI entry pointsInstall the rules, skills, and MCP config into whichever agent you use:
spatialai-install list # see targets and skills
spatialai-install install --target claude # or codex / cursor / copilot / gemini / allThis generates the right files for that agent (e.g. CLAUDE.md + .claude/skills/
.mcp.jsonfor Claude Code;.cursor/rules/*.mdc+.cursor/mcp.jsonfor Cursor). Seeinstaller/README.mdfor the full mapping.
Claude Code plugin (one-step alternative):
/plugin marketplace add Rebell-Leader/SpatialAI_MCP
/plugin install openproblems-spatial@openproblems-spatial
This bundles the four skills and the MCP server config as a single plugin. The
MCP tools still require the pip install above (they run the
openproblems-mcp-server console script).
New here? QUICKSTART.md walks you from install to a validated dataset and a scaffolded Viash component in about 5 minutes.
-
Check server health:
openproblems-mcp check
-
Start the server (usually launched automatically by your agent over stdio):
openproblems-mcp-server
-
Initialize server configuration:
openproblems-mcp init
The co-pilot has two layers: provider-neutral assets that the installer projects into each agent, and the MCP server that any agent then calls.
graph TB
subgraph Canonical["Canonical assets (author once)"]
Agents[AGENTS.md]
Skills[skills/*/SKILL.md]
Ctx[context/*.md]
end
Installer[["installer/ (spatialai-install)"]]
Agents --> Installer
Skills --> Installer
Ctx --> Installer
subgraph Agents_["AI coding agents"]
Claude[Claude Code]
Codex[OpenAI Codex]
Cursor[Cursor]
Copilot[GitHub Copilot]
Gemini[Gemini CLI]
end
Installer -->|CLAUDE.md, .claude/skills, .mcp.json| Claude
Installer -->|AGENTS.md, .codex/skills| Codex
Installer -->|.cursor/rules, .cursor/mcp.json| Cursor
Installer -->|.github/copilot-instructions.md| Copilot
Installer -->|GEMINI.md, .gemini/settings.json| Gemini
subgraph Server["MCP server (local process)"]
MCP[FastMCP Server]
Val[Validation & analysis tools]
MCP --> Val
end
Claude -.->|MCP protocol| MCP
Cursor -.->|MCP protocol| MCP
Gemini -.->|MCP protocol| MCP
Val -.-> Data[(Spatial data:\nSpatialData/zarr, AnnData)]
style Installer fill:#e1f5fe
style MCP fill:#e1f5fe
style Val fill:#f3e5f5
The server currently exposes read-only analysis and validation tools. It does
not yet execute pipelines β execution tools are on the roadmap (see below). The
table reflects exactly what is registered in server.py today.
Core infrastructure
health_check: Check server and detected-tool statuslist_tools_status: List bioinformatics tool availability with install hintsget_server_info: Get server configuration details
Spatial transcriptomics validation & analysis
validate_spatial_data: Validate SpatialData / zarr / AnnData format integrityvalidate_multiple_spatial_files: Batch-validate files with summary statisticsanalyze_spatial_metadata: Extract spatial coordinates and gene/feature metadatacheck_spatial_data_compatibility: Check files for joint-analysis compatibilityextract_bioinformatics_metadata: Extract metadata from Nextflow/Viash/spatial filesanalyze_workflow_configuration: Analyze Nextflow/Viash config structure & depsassess_data_quality: Cross-file data-quality assessmentanalyze_workflow_dependencies: Find dependency requirements/conflicts across files
These appear in the project design notes, but no code backs them yet. Do not
rely on them; an agent that calls them will get an error. The original
requirements for these live in the archived hackathon spec
(docs/archive/kiro-spec-production-mcp-server/).
- Execution:
run_nextflow_workflow,run_viash_component,build_viash_component,build_docker_image,run_nf_test - Troubleshooting:
analyze_nextflow_log - Authoring:
create_spatial_component,setup_spatial_environment - OpenProblems:
analyze_openproblems_repo,build_openproblems_method,run_openproblems_benchmark,validate_openproblems_submission - Workflow state:
get_execution_status,cancel_execution,get_execution_history
config://server: Server configuration (JSON)status://tools: Tool detection status (JSON)status://health: Overall 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: pythonOPENPROBLEMS_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 co-pilot complements an agent's built-in tools rather than duplicating them. The agent handles file I/O, search, terminal, and git; the co-pilot adds:
- Spatial transcriptomics domain expertise (validation, metadata, compatibility)
- OpenProblems ecosystem alignment (SpatialData/zarr, Viash, the iST pipeline)
- Portable, provider-neutral rules and skills via the installer
You: "Help me add a segmentation method to task_ist_preprocessing"
β
1. Agent reads existing code with its own file tools
2. Agent loads the viash-component-authoring skill (installed from skills/)
3. Agent calls validate_spatial_data to check the test data
4. Agent scaffolds the config.vsh.yaml + script, then runs `viash` in the terminal
5. Agent calls analyze_workflow_configuration to check the config before building
You: "This nextflow run failed, why?"
β
1. Agent loads the nextflow-debugging skill
2. Agent inspects the failing task's work-dir logs with its terminal tools
3. Agent calls validate_spatial_data if the failure looks data-shaped
4. Agent reports root cause (OOM / missing tool / data format) and the fix
Execution tools (
run_nextflow_workflow, etc.) are roadmap; today the agent drives the user's localnextflow/viash/dockerCLIs directly.
git clone https://github.com/Rebell-Leader/SpatialAI_MCP.git
cd SpatialAI_MCP
# Install in development mode
pip install -e ".[dev]"
# Run tests
pytest
# Format code
black src/
ruff check src/AGENTS.md # Canonical, provider-neutral agent rules (source of truth)
skills/ # On-demand task playbooks (shared SKILL.md format)
context/ # OpenProblems facts, data-format & pipeline contracts
installer/ # Provider-agnostic skill installer (spatialai-install)
case-study/ # Runnable experiment: skill vs. plain agent (+ grader, runner)
.claude-plugin/ # Plugin marketplace manifests (installable via /plugin)
src/openproblems_mcp/ # The MCP server
βββ server.py # FastMCP server core (tool/resource registration)
βββ spatial_validation.py # SpatialData/zarr/AnnData validation
βββ metadata_analysis.py # Bioinformatics metadata extraction
βββ spatial_tools.py # Tool wrappers exposed over MCP
βββ tool_detection.py # Local tool detection
βββ config.py / cli.py / main.py / exceptions.py
tests/ # pytest suite (server, validation, metadata, installer, case-study)
Generated per-agent files (CLAUDE.md, GEMINI.md, .claude/, .codex/,
.cursor/, .gemini/, .github/copilot-instructions.md, .mcp.json) are
produced by the installer β edit AGENTS.md / skills/ and re-run
spatialai-install, not those files.
case-study/ is a runnable experiment that tests whether an
open-source model with this skill can match a frontier commercial model
without it on a real task_ist_preprocessing task β at fewer agent steps and
fewer human validations. It ships the frozen task, an objective rubric, an
automated grader (case-study/grade.py), reference components that bracket the
rubric, and a runner that drives Gemini CLI /
opencode arms and grades them. Smoke-test the whole pipeline offline first:
python case-study/runner/run.py --config case-study/runner/arms.example.json \
--mock-harness skill-awareSee case-study/README.md.
- Python 3.10 or higher (required by the
fastmcpdependency) - Operating System: Linux, macOS, or Windows
- Nextflow / Viash / Docker: for building and running pipelines yourself (the agent drives these via the terminal; the server only detects them)
- Git: for repository operations
[spatial]extras (pip install -e ".[spatial]"): spatialdata, zarr, anndata, h5py β needed only for deep data-internals validation
- β FastMCP-based MCP server (stdio), pip-installable with CLI commands
- β Spatial data validation (SpatialData / zarr / AnnData) + metadata/config analysis
- β Logging, configuration management, local tool detection, health monitoring
- β Provider-agnostic installer for 5 agents (Claude, Codex, Cursor, Copilot, Gemini CLI)
- β Skills + context grounded in the current OpenProblems iST pipeline
- β
Installable Claude Code plugin (
.claude-plugin/) - β Case-study harness with automated grader and offline mock mode
- β CI: tests on Python 3.10β3.12, generated-files-in-sync check, upstream-drift check
- π§ In-server pipeline execution (Nextflow / Viash / Docker)
- π§ Workflow state management & execution history
- π§ OpenProblems build / benchmark / submission tools
Until those land, the agent drives your local nextflow / viash / docker
CLIs directly. Detailed requirements for these are preserved in the archived
hackathon spec (docs/archive/kiro-spec-production-mcp-server/).
- Quickstart: QUICKSTART.md β install to first result in ~5 min
- Agent rules (source of truth): AGENTS.md
- Installer & per-agent mapping: installer/README.md
- Domain context: context/ (data formats, the iST pipeline)
- Case study: case-study/README.md
- Troubleshooting: run
openproblems-mcp checkfor diagnostics
Contributions welcome. Please:
- Edit the canonical assets (
AGENTS.md,skills/,context/) β never the generated per-agent files; re-runspatialai-installto regenerate them. - Keep
README.md,AGENTS.md, and the kiro task board honest about what is actually implemented; don't advertise roadmap tools as available. - Add tests for new functionality (
python -m pytest).
This project is licensed under the MIT License β see the LICENSE file for details.
- OpenProblems Initiative: for standardizing benchmarking in spatial biology
- FastMCP: for the MCP server framework
- The
AGENTS.mdstandard and the Claude/Codex/Cursor/Copilot/Gemini ecosystems this co-pilot projects into
- GitHub Issues: Report bugs and request features
- Health Check: run
openproblems-mcp checkfor diagnostics - OpenProblems: Learn about OpenProblems