Spaces:
Sleeping
A newer version of the Gradio SDK is available:
6.9.0
Continue.dev Integration Guide
This guide covers two approaches for integrating OpenProblems spatial transcriptomics documentation with Continue.dev:
- Enhanced MCP Server (Primary approach - what we've built)
- Continue.dev Document Artifacts (Alternative approach)
π― Approach 1: Enhanced MCP Server (RECOMMENDED)
Our OpenProblems MCP Server now provides real, comprehensive documentation from official sources through the Model Context Protocol.
Features
β Real-time documentation access from official sources β Structured knowledge delivery via MCP Resources β File system operations for local development β Environment validation and setup assistance β Pipeline creation and validation β Automated documentation updates
Setup
1. Install Dependencies
pip install -e .
2. Download Real Documentation
openproblems-mcp download-docs
This command downloads and caches:
- Nextflow Documentation - Complete official docs from nextflow.io
- Viash Documentation - Comprehensive guides from viash.io
- OpenProblems Documentation - READMEs and guides from GitHub repositories
- Docker Best Practices - Bioinformatics-specific containerization patterns
- Spatial Workflow Templates - Ready-to-use pipeline templates
3. Configure Continue.dev
Add to your Continue.dev configuration (~/.continue/config.json):
{
"mcpServers": {
"openproblems": {
"command": "python",
"args": ["-m", "mcp_server.main"],
"cwd": "/path/to/SpatialAI_MCP"
}
}
}
4. Verify Integration
openproblems-mcp doctor --check-tools
openproblems-mcp info
Continue.dev Workflow Example
Once configured, Continue.dev agents can:
// Agent can access comprehensive documentation
const nextflowDocs = await mcp.readResource("documentation://nextflow");
const spatialTemplates = await mcp.readResource("templates://spatial-workflows");
// Agent can perform file operations
const projectFiles = await mcp.callTool("list_directory", { directory_path: "." });
const pipelineContent = await mcp.callTool("read_file", { file_path: "main.nf" });
// Agent can validate and create pipelines
const validation = await mcp.callTool("validate_nextflow_config", {
pipeline_path: "main.nf"
});
// Agent can check environment setup
const environment = await mcp.callTool("check_environment", {});
Available MCP Resources
| Resource URI | Content | Size |
|---|---|---|
documentation://nextflow |
Complete Nextflow docs | ~50KB+ |
documentation://viash |
Complete Viash docs | ~30KB+ |
documentation://docker |
Bioinformatics Docker patterns | ~10KB |
templates://spatial-workflows |
Spatial pipeline templates | ~15KB |
server://status |
Server status and capabilities | ~1KB |
Available MCP Tools
| Tool | Description | Use Case |
|---|---|---|
read_file |
Read file contents | Analyze configs, scripts |
write_file |
Create/modify files | Generate pipelines, configs |
list_directory |
Navigate project structure | Explore repositories |
check_environment |
Validate tool installation | Setup verification |
validate_nextflow_config |
Pipeline syntax checking | Quality assurance |
run_nextflow_workflow |
Execute pipelines | Testing and deployment |
build_docker_image |
Container preparation | Environment setup |
analyze_nextflow_log |
Debug pipeline errors | Troubleshooting |
π Approach 2: Continue.dev Document Artifacts (ALTERNATIVE)
For users who prefer to manage documentation directly in Continue.dev:
Setup
1. Download Documentation
openproblems-mcp download-docs
cd data/docs_cache
2. Add to Continue.dev Documents
In Continue.dev, add these cached documentation files as document artifacts:
data/docs_cache/nextflow_docs.md
data/docs_cache/viash_docs.md
data/docs_cache/openproblems_docs.md
data/docs_cache/docker_docs.md
data/docs_cache/spatial_templates_docs.md
3. Configure Continue.dev
Add to ~/.continue/config.json:
{
"docs": [
{
"title": "Nextflow Documentation",
"startUrl": "file:///path/to/SpatialAI_MCP/data/docs_cache/nextflow_docs.md"
},
{
"title": "Viash Documentation",
"startUrl": "file:///path/to/SpatialAI_MCP/data/docs_cache/viash_docs.md"
},
{
"title": "OpenProblems Documentation",
"startUrl": "file:///path/to/SpatialAI_MCP/data/docs_cache/openproblems_docs.md"
},
{
"title": "Docker Best Practices",
"startUrl": "file:///path/to/SpatialAI_MCP/data/docs_cache/docker_docs.md"
},
{
"title": "Spatial Pipeline Templates",
"startUrl": "file:///path/to/SpatialAI_MCP/data/docs_cache/spatial_templates_docs.md"
}
]
}
Pros and Cons
| MCP Server Approach | Document Artifacts Approach | |
|---|---|---|
| Pros | β’ Real-time access β’ Structured delivery β’ File operations β’ Tool execution |
β’ Simple setup β’ Direct file access β’ No server dependency |
| Cons | β’ Requires MCP setup β’ More complex |
β’ Manual updates β’ No tool execution β’ Static content |
π Recommendation: Use Enhanced MCP Server
The Enhanced MCP Server approach is recommended because:
- Real-time Documentation - Always up-to-date with official sources
- Interactive Capabilities - Agent can perform actions, not just read docs
- Structured Knowledge - Organized, searchable, contextual information
- Complete Workflow - From documentation to execution
- Environment Integration - Validates setup and provides guidance
Example Continue.dev Agent Conversation
𧬠User: "Help me create a spatial transcriptomics quality control pipeline"
π€ Agent: Let me help you with that! I'll:
1. Check your environment setup
2. Get the latest Nextflow best practices
3. Use spatial transcriptomics templates
4. Create an optimized pipeline for you
[Agent uses MCP tools to check environment, read documentation, and create pipeline]
β
Agent: "I've created a spatial QC pipeline following OpenProblems standards.
The pipeline includes:
- Scanpy-based quality control
- Proper Docker containerization
- DSL2 Nextflow syntax
- Resource management
- Output publishing
Would you like me to validate the syntax and explain any part?"
π§ Maintenance
Updating Documentation
# Refresh all documentation
openproblems-mcp download-docs
# Check server status
openproblems-mcp doctor
# Test integration
openproblems-mcp tool check_environment
Monitoring
# View cached documentation
ls -la data/docs_cache/
# Check server resources
openproblems-mcp info
π Next Steps
- Set up the Enhanced MCP Server using Approach 1
- Download real documentation with
openproblems-mcp download-docs - Configure Continue.dev to connect to the MCP server
- Test the integration with spatial transcriptomics workflows
- Enjoy AI-assisted bioinformatics development!
The integration provides computational biologists with unprecedented AI assistance for spatial transcriptomics pipeline development, combining the power of Continue.dev with comprehensive, real-time bioinformatics knowledge.