Incorta MCP Plugin
Version: 1.6.1
An Incorta Copilot plugin that integrates the Model Context Protocol (MCP) to enable AI-powered data analysis with interactive HTML dashboards.
Features
- MCP Integration: Connects to Incorta MCP Server for data querying and analysis
- Smart Prompt Caching: Implements Anthropic's best practices for 90% cost savings
- Session-Based Chat: Maintains conversation history across multiple interactions
- HTML Dashboards: Generates interactive visualizations using Chart.js and Tailwind CSS
- Dual-Task Architecture: Separates markdown analysis from HTML rendering
Installation
Upload Plugin to Incorta
./sdk/upload.sh incorta_mcp_pluginImportant: After uploading, restart Copilot with /restart in the chat window.
Configuration
1. CMC Plugin Configuration
Add to Cluster Configurations > IncortaCopilot > Plugins Configs:
{
"IncortaMCPOperator": {
"enabled": true,
"clients": ["MATERIALIZED_VIEW", "BUSINESS_NOTEBOOK", "DASHBOARDS", "DASHBOARDS_V2"],
"operator_name": "Incorta MCP Operator",
"description": "Insert the MCP Capabilities to copilot using Incorta MCP",
"operator_tag": "/incorta_claude",
"operator_tag_description": "Use Incorta MCP to answer the user query",
"operator_predefined_tasks": [
{
"id": 1,
"operator": "IncortaMCPOperator",
"operator_renderer": "MarkdownRenderer",
"short_description": "Analyzing data..",
"status": "TODO",
"depends_on_output_of": [],
"result": ""
},
{
"id": 2,
"operator": "IncortaMCPOperator",
"operator_renderer": "HtmlRenderer",
"short_description": "Processing results",
"status": "TODO",
"depends_on_output_of": [1],
"result": ""
},
{
"id": 3,
"operator": "FinalResultText",
"short_description": "Final Results and Insights",
"status": "DONE",
"depends_on_output_of": [1, 2],
"result": "@task2 @task1"
}
],
"plugin_name": "incorta_mcp",
"executor_args": {}
}
}Important: After updating configuration, restart Analytics service.
2. API Key Configuration
The plugin requires an Anthropic API key to function. You can configure it in one of two ways:
Option A: Environment Variable (Recommended)
Set the ANTHROPIC_API_KEY environment variable on the Analytics server:
export ANTHROPIC_API_KEY="sk-ant-api03-..."Option B: CMC Configuration
Add the API key to the executor_args in CMC Plugins Configs:
{
"IncortaMCPOperator": {
"enabled": true,
"executor_args": {
"api_key": "sk-ant-api03-..."
}
}
}Model Configuration: The plugin uses claude-sonnet-4-20250514 by default. This can be changed in the code if needed, but this has better limits.
3. MCP Server Configuration (Optional)
The plugin connects to the private endpoints version of the Incorta MCP server. By default, it uses a demo server, but you can configure your own:
{
"IncortaMCPOperator": {
"executor_args": {
"mcp_server_url": "https://your-mcp-server.com/mcp/"
}
}
}Default MCP Server: https://alone-recall-wait-era.trycloudflare.com/mcp/
The MCP server receives Incorta credentials from the user's session context automatically and in current setup we hardcode the SE environment internally.
4. Enable Plugin Upload
In CMC Advanced Configs:
{
"general": {
"allow_custom_plugins_upload": true,
"allow_custom_plugins_execution": true
}
}5. Restart Copilot
- Go to Cloud Portal → Configuration
- Disable then re-enable
Enable Copilot - Or type
/restartin the chat window
Usage
In the Copilot chat window:
/incorta_claude show me sales trends in a dashboardThe plugin will:
- Task 1: Query data and generate analysis (with optional HTML dashboard code according to the context) → save response with extracting the HTML part separately and remove it from the main response
- Task 2: Receive and render the HTML dashboard (if present), as we can set for it a specified renderer in frontend
- Task 3: Display combined results (final)
Architecture
Resource Usage
Memory Storage Only: This plugin stores all data in memory (RAM), NOT on disk:
- Conversation history: Stored in Python global dictionary
_conversation_history - MCP client connections: Stored in memory
- Session data: In-memory only
Note: Anthropic's prompt caching is server-side (on Anthropic's infrastructure), not local disk caching.
File Structure
incorta_mcp_plugin/
├── __init__.py # Package initialization
├── manifest.json # Plugin metadata and version
├── plugin.py # Main executor class
└── README.md # This fileKey Components
- IncortaMCPExecutor: Main execution class
- Manages MCP client connection - Handles LangGraph agent interactions - Implements smart caching logic
- Session Management:
- Global conversation history per session - Prevents cache invalidation - Enables multi-turn conversations
- HTML Extraction:
- Regex-based extraction from markdown - Document completeness validation - Truncation detection and logging
Requirements
Python packages (auto-installed):
mcpanthropiclangchain-core==0.3.75langchain==0.3.27langchain-anthropic==0.3.19langchain-mcp-adapters==0.1.9langgraph==0.2.60markdown
Authentication
Default credentials (can be overridden by context):
{
"incorta_url": "https://se-prod-demo.cloud4.incorta.com/incorta",
"tenant": "demo",
"user": "admin",
"password": "Incorta_1234%"
}Changelog
Version 1.6.1
- Fixed prompt caching (system prompt only added once)
- Increased max_tokens to 8192 for complete dashboards
- Enhanced HTML validation with truncation detection
- Updated to production demo credentials
- Added context management
Troubleshooting
Plugin Not Appearing
Check logs for:
@logShould show:
{
"Available Plugins": [
{
"plugin_name": "incorta_mcp",
"version": "1.6.1"
}
]
}