Canvas Dev
БесплатноНе проверенA Model Context Protocol (MCP) server for Canvas Medical API/SDK development assistance, providing streamlined access to Canvas Medical documentation and AI-pow
Описание
A Model Context Protocol (MCP) server for Canvas Medical API/SDK development assistance, providing streamlined access to Canvas Medical documentation and AI-powered development tools.
README
A Model Context Protocol (MCP) server for Canvas Medical API/SDK development assistance. This server provides streamlined access to Canvas Medical documentation and AI-powered development tools.
🚀 Quick Start
1. Installation
# Clone and install dependencies
git clone https://github.com/your-username/mcp-canvas.git
cd mcp-canvas
pnpm install
2. Configuration
# Copy environment template
cp packages/server/env.template packages/server/.env
# Edit with your API credentials
nano packages/server/.env
# Set CARA_CANVAS_API_KEY=your_api_key_here
# Contact [email protected] for API credentials
3. Build and Start
# Build the server
pnpm build
# Start in stdio mode (for MCP clients like Claude Desktop)
pnpm dev
# Start in HTTP mode (for web applications)
STREAMABLE_HTTP=1 pnpm dev
🔧 Configuration Options
Option 1: Use Public API (Recommended)
The server uses public API endpoints with API key authentication:
# Set environment variables in packages/server/.env (only API key needed for most users)
CARA_CANVAS_BASE_URL=https://k8zoi0cmul.execute-api.us-east-1.amazonaws.com/dev
CARA_CANVAS_API_KEY=your_api_key_here
Need API credentials? Email [email protected] to request access.
Option 2: Deploy Your Own Lambda Proxy
For production use or custom knowledge bases, deploy your own Lambda proxy:
# Navigate to lambda-proxy directory
cd lambda-proxy
# Install dependencies
npm install
# Configure your AWS credentials and Knowledge Base IDs
export API_KNOWLEDGE_BASE_ID=your_api_knowledge_base_id
export SDK_KNOWLEDGE_BASE_ID=your_sdk_knowledge_base_id
# Deploy to AWS
npm run deploy:dev
Option 3: Use Your Own API Endpoints
Configure the server to use your own API endpoints:
# In packages/server/.env
CARA_CANVAS_BASE_URL=https://your-api-endpoint.com
CARA_CANVAS_API_KEY=your_api_key
🛠️ Available Tools
The server provides 9 streamlined tools and 6 comprehensive prompts for Canvas Medical development:
📚 Documentation Search
search_api_docs- Search Canvas Medical API documentationsearch_sdk_docs- Search Canvas Medical SDK documentationsearch_all_docs- Search all Canvas Medical documentation
🤖 AI-Powered Development
generate_response- Generate AI responses using Canvas Medical documentationgenerate_code- Generate code examples for Canvas Medical API integrationreview_code- Review Canvas Medical integration code and provide suggestionssmart_canvas_development- Intelligent assistant with automatic documentation search and code generationgenerate_canvas_manifest- Generate complete Canvas Medical plugin manifest files with proper structure and data access permissionsvalidate_code_against_docs- Validate that code only uses documented APIs, methods, and imports from Canvas Medical documentation. Prevents hallucination of non-existent features.
🎯 Code Generation Prompts
prompts.generate_code_from_docs- Generate complete code from Canvas Medical documentation search resultsprompts.implement_from_findings- Create complete implementation from research findings and documentationprompts.code_review- Review Canvas Medical integration code and provide suggestionsprompts.api_implementation- Generate implementation guidance for Canvas Medical API featuresprompts.debug_assistance- Help debug issues with Canvas Medical API integrationprompts.canvas_manifest_guide- Comprehensive guide for creating and understanding Canvas Medical plugin manifest files (CANVAS_MANIFEST.json)
🧠 Intelligent Auto-Triggering
The MCP server now automatically provides comprehensive responses for Canvas Medical development requests:
- Plugin Development: Auto-triggers documentation search and code generation
- API Integration: Automatically searches relevant API documentation
- SDK Development: Provides SDK-specific guidance and examples
- Physician Information: Intelligent responses for clinical workflow questions
Example: Ask "create a plugin for canvas which creates a text in a note about what physician / clinician did the note" and get:
- 📚 Relevant API and SDK documentation
- 💻 Complete Python plugin code
- 🚀 Step-by-step implementation guide
- 🛠️ Best practices and deployment instructions
🔄 Code Generation Workflow
Clear Path from Research to Implementation:
🔍 Research Phase:
- Use
search_api_docsto find relevant Canvas Medical APIs - Use
search_sdk_docsto understand Canvas Medical SDK patterns - Use
search_all_docsfor comprehensive documentation coverage
- Use
📝 Code Generation Phase:
- Use
prompts.generate_code_from_docsfor documentation-based code generation - Use
prompts.implement_from_findingsfor complete implementation from research - Get production-ready code with Canvas Medical best practices
- Use
🔧 Development Phase:
- Use
prompts.code_reviewto review and improve generated code - Use
prompts.debug_assistancefor troubleshooting - Use
prompts.api_implementationfor implementation guidance
- Use
Example Workflow:
1. search_api_docs("note creation") → Get API documentation
2. search_sdk_docs("plugin development") → Get SDK patterns
3. prompts.generate_code_from_docs({
request: "Create note analysis plugin",
documentation: [API + SDK results],
language: "Python"
}) → Get complete implementation
4. prompts.code_review({code: generated_code}) → Review and improve
🛡️ Anti-Hallucination Measures
Production-Ready Code Generation:
The MCP server includes comprehensive anti-hallucination measures to ensure all generated code uses only documented Canvas Medical APIs:
Documentation Search with Source Verification:
- Source verification for each API and method
- Anti-hallucination warnings in all documentation results
- Clear guidelines on what can and cannot be used
- Explicit warnings about undocumented features
Code Generation with Strict Validation:
- Source verification comments in generated code
- Validation for undocumented methods and imports
- Error handling for non-existent APIs
- Strict requirements in all prompts
Code Validation Tool:
validate_code_against_docs- Validates code against documentation- Detects undocumented APIs and methods
- Prevents hallucination of non-existent features
- Provides specific recommendations for fixes
Example Anti-Hallucination Workflow:
User: "Create a Canvas plugin for note analysis"
MCP Server Response:
1. 🔍 search_api_docs("note analysis") → Get documented APIs with source verification
2. 🔍 search_sdk_docs("Canvas plugin development") → Get documented SDK methods
3. 📝 generate_canvas_manifest({...}) → Generate manifest with documented structure
4. 💻 prompts.generate_code_from_docs({...}) → Generate code with strict validation
5. 🔧 validate_code_against_docs({...}) → Validate generated code against documentation
Result: Complete Canvas Medical plugin with:
- ✅ Only documented APIs and methods
- ✅ Source verification for all components
- ✅ Anti-hallucination validation
- ✅ Proper error handling for undocumented features
📚 Documentation
- MCP Client Setup - Detailed MCP client configuration
- Troubleshooting - Common issues and solutions
- API Credentials - How to get API access
Prerequisites
- Node.js 18+
- pnpm
Setup
# Install dependencies
pnpm install
# Build the server
pnpm build
# Run tests
pnpm test
# Start development server
pnpm dev
🛡️ Security
- No credentials required - Uses public API endpoints
- Open source - All code is publicly available
- Environment variable configuration for customization
�� Documentation
- README.md - This file with setup and usage instructions
- MCP Client Setup - Detailed MCP client configuration
- Troubleshooting - Common issues and solutions
- API Credentials - How to get API access
🔒 Security & Privacy
Public API Usage
- API key required - Contact [email protected] for credentials
- No AWS credentials required for basic usage
- No sensitive data stored in the repository
- Public endpoints available with API key authentication
Custom Deployment
- Deploy your own Lambda proxy for production use
- Keep your AWS credentials private
- Use your own API keys and endpoints
🤝 Contributing
- Fork the repository
- Create a feature branch
- Make your changes
- Add tests if applicable
- Submit a pull request
📄 License
MIT License - see LICENSE file for details.
��️ MCP Client Setup
The Canvas Medical MCP server works with various MCP-compatible applications. Here's how to set it up:
Claude Desktop (Anthropic)
Install Claude Desktop from Anthropic's website
Create configuration file:
# Create config directory mkdir -p ~/.config/claude-desktop # Create configuration file nano ~/.config/claude-desktop/claude_desktop_config.jsonAdd MCP server configuration:
{ "mcpServers": { "canvas-medical": { "command": "node", "args": ["/path/to/your/mcp-canvas/packages/server/dist/index.js"], "env": { "CARA_CANVAS_API_KEY": "your_api_key_here" } } } }Restart Claude Desktop and start using Canvas Medical tools!
Cursor IDE
Open Cursor IDE
Create MCP configuration:
# Create config directory mkdir -p ~/.cursor # Create configuration file nano ~/.cursor/mcp.jsonAdd MCP server configuration:
{ "mcpServers": { "canvas-medical": { "command": "node", "args": ["/path/to/your/mcp-canvas/packages/server/dist/index.js"], "env": { "CARA_CANVAS_API_KEY": "your_api_key_here" } } } }Restart Cursor and use Canvas Medical tools in chat!
Continue.dev (VS Code Extension)
Install Continue extension in VS Code
Open Continue config (
Cmd/Ctrl + Shift + P→ "Continue: Open Config")Add MCP server configuration:
{ "mcpServers": { "canvas-medical": { "command": "node", "args": ["/path/to/your/mcp-canvas/packages/server/dist/index.js"], "env": { "CARA_CANVAS_API_KEY": "your_api_key_here" } } } }Restart VS Code and use Canvas Medical tools!
Open WebUI
Install Open WebUI with MCP support
Configure MCP server in settings:
- Server Name:
canvas-medical - Command:
node - Args:
["/path/to/your/mcp-canvas/packages/server/dist/index.js"] - Environment Variables:
CARA_CANVAS_API_KEY=your_api_key_here
- Server Name:
Start using Canvas Medical tools!
LM Studio
Install LM Studio with MCP support
Configure MCP server in settings:
- Server Path:
/path/to/your/mcp-canvas/packages/server/dist/index.js - Environment Variables:
CARA_CANVAS_API_KEY=your_api_key_here
- Server Path:
Start using Canvas Medical tools!
Custom Applications
For custom applications that support MCP:
Start the server:
cd packages/server CARA_CANVAS_API_KEY="your_api_key" pnpm devConnect via stdio or HTTP mode:
# HTTP mode for web applications STREAMABLE_HTTP=1 CARA_CANVAS_API_KEY="your_api_key" pnpm dev
🔑 Getting API Credentials
Need API credentials? Email [email protected] to request access.
Note: Only the API key is required for most users. The server uses public endpoints by default.
🔧 Troubleshooting
Common Issues:
"API key is required" error:
- Make sure
CARA_CANVAS_API_KEYis set in your MCP client configuration - Verify the API key is valid by emailing [email protected]
"Cannot find module" error:
- Make sure you've built the server:
pnpm build - Check that the path to
dist/index.jsis correct
"Connection refused" error:
- Verify the server is running:
pnpm dev - Check that the MCP client configuration is correct
Tools not appearing:
- Restart your MCP client after configuration changes
- Verify the server is running and accessible
Testing the Server:
# Test the server directly
cd packages/server
CARA_CANVAS_API_KEY="your_api_key" pnpm dev
Getting Help:
- Issues: GitHub Issues
- API Credentials: [email protected]
- Documentation: Check the README.md for detailed examples
Установка Canvas Dev
У этого сервера нет опубликованного пакета — он собирается из исходников. Открой репозиторий и следуй инструкции в README.
▸ github.com/carainc/canvas-medical-mcpFAQ
Canvas Dev MCP бесплатный?
Да, Canvas Dev MCP бесплатный — установка в пару кликов через Unyly без оплаты.
Нужен ли API-ключ для Canvas Dev?
Нет, Canvas Dev работает без API-ключей и переменных окружения.
Canvas Dev — hosted или self-hosted?
Доступен hosted-вариант: Unyly запускает сервер в облаке, локальная установка не обязательна.
Как установить Canvas Dev в Claude Desktop, Claude Code или Cursor?
Открой Canvas Dev на unyly.org, выбери вкладку своего клиента (Claude Desktop, Claude Code, Cursor) и нажми Install — конфиг сгенерируется автоматически, без правки JSON.
Похожие MCP
LibreOffice Tools
Enables AI agents to read, write, and edit Office documents via LibreOffice with token-efficient design. Supports multiple formats including DOCX, XLSX, PPTX, a
автор: passerbyflutterdannote/figma-use
Full Figma control: create shapes, text, components, set styles, auto-layout, variables, export. 80+ tools.
автор: dannoteLogo.dev
Search and retrieve company logos by brand or domain. Customize size, format, and theme to match your design needs. Accelerate design, prototyping, and content
автор: NOVA-3951PIX4Dmatic
Enables GUI automation for controlling PIX4Dmatic on Windows through MCP. Supports launching, focusing, capturing screenshots, sending hotkeys, clicking UI elem
автор: jangjo123Compare Canvas Dev with
Не уверен что выбрать?
Найди свой стек за 60 секунд
Автор?
Embed-бейдж для README
Похожее
Все в категории design
