chaddorsey/CODAP-mcp-bck
If you are the rightful owner of CODAP-mcp-bck and would like to certify it and/or have it hosted online, please leave a comment on the right or send an email to henry@mcphub.com.
The CODAP MCP Integration is a fully operational Model Context Protocol server that allows large language models to interact with the CODAP data analysis tool for data manipulation and visualization.
create_dataset_with_table
Create datasets with automatic table display.
create_graph
Generate visualizations like scatter plots and bar charts.
create_data_context
Create new data contexts.
create_items
Add cases to existing datasets.
get_data_contexts
List all data contexts.
get_components
List all visualization components.
CODAP MCP Integration
A Model Context Protocol (MCP) server for the CODAP (Common Online Data Analysis Platform) data analysis tool, enabling large language models to interact directly with CODAP for data manipulation and visualization.
🌟 Status: Fully Operational
The system is now fully deployed and operational! LLMs can:
- ✅ Discover tools via the metadata endpoint
- ✅ Queue tool requests which are processed asynchronously
- ✅ Create real datasets in your CODAP session
- ✅ Generate visualizations (graphs, tables, etc.)
- ✅ Execute all tools through the web-based API
No local installation required - everything runs through web APIs.
🚀 Quick Start for LLMs
- Get session code from your CODAP session (e.g.,
T5SDQIRW
) - Discover available tools:
GET https://codap-mcp-cdorsey-concordorgs-projects.vercel.app/api/metadata?code=YOUR_SESSION_CODE
- Queue tool requests:
POST https://codap-mcp-cdorsey-concordorgs-projects.vercel.app/api/request { "sessionCode": "YOUR_SESSION_CODE", "requestId": "unique-id-123", "toolName": "create_dataset_with_table", "params": { ... } }
🔧 System Architecture
Web-Based Operation
- Request Queue: Tools are queued via HTTP POST to
/api/request
- SSE Streaming: Browser worker receives requests via Server-Sent Events from
/api/stream
- Tool Execution: Browser worker executes tools directly against CODAP Plugin API
- Response Storage: Results stored in KV and accessible via web APIs
Available Tools (9 total)
create_dataset_with_table
- Create datasets with automatic table displaycreate_graph
- Generate visualizations (scatter plots, bar charts, etc.)create_data_context
- Create new data contextscreate_items
- Add cases to existing datasetsget_data_contexts
- List all data contextsget_components
- List all visualization components- And more...
📊 Example Usage
Create a Student Performance Dataset
POST /api/request
{
"sessionCode": "T5SDQIRW",
"requestId": "create-students-001",
"toolName": "create_dataset_with_table",
"params": {
"name": "StudentPerformance",
"attributes": [
{"name": "student_id", "type": "categorical"},
{"name": "math_score", "type": "numeric"},
{"name": "reading_score", "type": "numeric"}
],
"data": [
{"student_id": "S001", "math_score": 85, "reading_score": 78},
{"student_id": "S002", "math_score": 92, "reading_score": 88}
]
}
}
Create a Scatter Plot Visualization
POST /api/request
{
"sessionCode": "T5SDQIRW",
"requestId": "viz-scatter-001",
"toolName": "create_graph",
"params": {
"dataContext": "StudentPerformance",
"graphType": "scatterplot",
"xAttribute": "math_score",
"yAttribute": "reading_score",
"title": "Math vs Reading Scores"
}
}
🌐 API Endpoints
Endpoint | Method | Description |
---|---|---|
/api/metadata?code={sessionCode} | GET | Get available tools and schemas |
/api/request | POST | Queue tool execution request |
/api/response | POST | Store tool execution response |
/api/stream?code={sessionCode} | GET | SSE stream for browser worker |
🔧 For Developers
Local Development
npm install
npm run dev
Testing
npm test # Unit tests
npm run test:integration # Integration tests
npm run test:playwright # E2E tests
Project Structure
api/
- Vercel serverless functions (HTTP API)src/services/browserWorker/
- Browser-based tool executiondocs/
- API documentation and examplesplaywright/
- End-to-end tests
📖 Documentation
🔒 Security & Session Management
- Session codes are 8-character Base32 format (e.g.,
T5SDQIRW
) - Sessions auto-expire after inactivity
- CORS enabled for cross-origin requests
- Rate limiting on API endpoints
🎯 LLM Integration Patterns
For LLMs with MCP Support
Use the native MCP protocol with tool calling capabilities.
For LLMs without MCP Support
Use the HTTP API endpoints directly:
- Call metadata endpoint for tool discovery
- POST to request endpoint for tool execution
- Monitor results through web interface
For LLMs without Web Access (like ChatGPT)
Use the action-triggered URL patterns or copy-paste workflows described in the integration guide.
📈 Version Management
The API supports version negotiation:
- Current API Version:
1.0.0
- Tool Manifest Version:
1.0.0
- Use
Accept-Version
header for version control
🤝 Contributing
See project documentation in docs/delivery/
for development workflow and task management.
📄 License
MIT License - see LICENSE file for details.
Ready to integrate with any LLM! 🚀