flowchart LR
subgraph User["👤 User Layer"]
U["<b>You</b><br/>Natural Language"]
end
subgraph AI["🤖 AI Orchestration"]
C["<b>Claude</b><br/>AI Assistant"]
end
subgraph Servers["⚡ MCP Servers"]
M1["📊 Power BI<br/>Semantic Models"]
M2["📈 Statistics<br/>Analysis & Viz"]
M3["🔧 OR-Tools<br/>Optimization"]
M4["🕸️ iGraph<br/>Networks"]
end
subgraph Data["💾 Data Sources"]
D1[("VP Dataset")]
D2["Statistical<br/>Functions"]
D3["Optimization<br/>Engine"]
D4["Graph<br/>Algorithms"]
end
U --> C
C <--> M1 & M2 & M3 & M4
M1 --> D1
M2 --> D2
M3 --> D3
M4 --> D4
style U fill:#8b5cf6,color:white,stroke:#7c3aed,stroke-width:2px
style C fill:#3b82f6,color:white,stroke:#1e40af,stroke-width:2px
style M1 fill:#f59e0b,color:white,stroke:#d97706
style M2 fill:#10b981,color:white,stroke:#059669
style M3 fill:#f43f5e,color:white,stroke:#e11d48
style M4 fill:#06b6d4,color:white,stroke:#0891b2
3 Understanding MCP
4 What is MCP?
MCP (Model Context Protocol) is a standard that allows AI assistants like Claude to connect with external tools and data sources. Think of it as giving Claude “hands” to interact with the world beyond just text.
4.0.1 🧠 The Core Idea
Without MCP, Claude can only process text you type and generate text responses. With MCP, Claude can:
- Read data from databases, APIs, and files
- Execute calculations, queries, and transformations
- Create documents, visualizations, and exports
- Interact with specialized software and services
4.1 How MCP Works
- You ask Claude a question in natural language
- Claude identifies which tool can help answer the question
- Claude requests permission to use that tool
- MCP Server executes the operation (query, calculation, etc.)
- Claude receives the results and explains them to you
5 The Context Window
5.0.1 🎒 Analogy: Claude’s Backpack
Imagine Claude has a backpack that can only hold a certain amount of information. Everything you discuss — your messages, Claude’s responses, and data from tools — goes into this backpack. When it gets full, older information falls out.
This backpack is called the context window.
5.1 Context Window Size
| Model | Context Window | Approximate Pages of Text |
|---|---|---|
| Claude 4 Sonnet | 200K tokens | ~500 pages |
| Claude 4.5 Opus | 200K tokens | ~500 pages |
A token is roughly 4 characters or ¾ of a word. The sentence “Hello, how are you?” is about 6 tokens.
5.2 Why Context Window Matters
5.2.1 ⚠️ The Overflow Problem
If you load too much data into the context window:
- Earlier conversation is forgotten — Claude loses track of what you discussed
- Performance degrades — Responses become slower and less accurate
- Important details are missed — Critical information may be pushed out
5.2.2 Real Example: Loading Too Much Data
❌ Bad approach:
"Show me all 100,000 rows from the Sales table"
✅ Good approach:
"Summarize total sales by product category for 2024"
The second approach returns aggregated data (maybe 20 rows) instead of raw data (100,000 rows), preserving context window space.
6 Best Practices
6.1 1. Choose the Right Server for the Job
6.1.0.1 📊 Power BI MCP Server
Best for:
- Querying semantic models
- Business intelligence analysis
- Time intelligence calculations
- Filtering and aggregating data
Not for:
- Statistical hypothesis testing
- Network/graph analysis
- Optimization problems
6.1.0.2 📈 MCP Stats
Best for:
- Statistical testing (t-tests, ANOVA)
- Regression analysis
- Bayesian inference
- Survival analysis
Not for:
- Querying business data
- Route optimization
- Graph visualization
6.1.0.3 🔧 OR-Tools
Best for:
- Linear/integer programming
- Vehicle routing
- Job scheduling
- Bin packing
Not for:
- Data analysis
- Statistical testing
- Network centrality
6.1.0.4 🕸️ iGraph
Best for:
- Network analysis
- Community detection
- Centrality measures
- Shortest path
Not for:
- Business metrics
- Statistical inference
- Optimization
6.2 2. Use Aggregations, Not Raw Data
6.2.1 ✅ Best Practice: Aggregate at the Source
Let the MCP server do the heavy lifting. Request summaries, not raw rows.
Instead of this:
EVALUATE Sales
Do this:
EVALUATE
SUMMARIZECOLUMNS(
Product[Category],
"Total Sales", SUM(Sales[Amount]),
"Units Sold", SUM(Sales[Quantity])
)
6.3 3. Be Specific in Your Requests
6.3.1 ✅ Best Practice: Clear, Focused Questions
The more specific your question, the more efficient the tool usage.
| ❌ Vague | ✅ Specific |
|---|---|
| “Tell me about sales” | “What were total sales by region for Q4 2024?” |
| “Analyze the data” | “Is there a significant difference in sales between weekdays and weekends?” |
| “Optimize something” | “Find the optimal delivery route for 5 stops minimizing total distance” |
6.4 4. Work Iteratively
6.4.1 ✅ Best Practice: Start Simple, Then Drill Down
Begin with overview questions, then ask follow-up questions to explore details.
Good workflow:
- “What tables are in the SalesVP model?”
- “Show me the key measures in the Sales table”
- “What is the trend of Liter sales over the past 12 months?”
- “Compare this to the same period last year”
6.5 5. Use Skills/Custom Instructions
Claude Desktop supports skills — predefined instructions that guide behavior for specific tasks.
Create skills for common workflows:
- “DAX Expert” — Guides Claude to write efficient DAX
- “Statistical Analyst” — Ensures proper hypothesis setup
- “Power BI Documenter” — Generates model documentation
7 When NOT to Use Each Server
Understanding limitations is as important as knowing capabilities:
| Server | Limitations |
|---|---|
| Power BI | Cannot modify data, limited by Premium capacity, DAX-only |
| MCP Stats | Large datasets slow, no database connectivity |
| OR-Tools | Very large problems may timeout, no ML/AI |
| iGraph | Memory-bound for huge graphs, no database queries |
| Quantitative Finance | Simplified models, not production trading systems |
| Nordic Statistics | API rate limits, historical data gaps |
8 Context Window Management Strategy
flowchart TD
subgraph Start["🚀 Begin"]
A["💬 Start Conversation"]
end
subgraph Decision["🤔 Assess Complexity"]
B{"Simple<br/>Question?"}
end
subgraph Simple["⚡ Quick Path"]
C["✅ Direct Answer"]
end
subgraph Complex["📋 Multi-Step Path"]
D["📝 Plan Approach"]
E["🔍 Overview Query"]
F["📊 Review Results"]
G{"Need More<br/>Detail?"}
H["🎯 Focused Query"]
I["🧩 Synthesize"]
J["📢 Present"]
end
subgraph End["🏁 Complete"]
K["✨ Done"]
end
A --> B
B -->|"Yes"| C
B -->|"No"| D
D --> E
E --> F
F --> G
G -->|"Yes"| H
H --> F
G -->|"No"| I
I --> J
C --> K
J --> K
style A fill:#8b5cf6,color:white
style B fill:#f59e0b,color:white
style C fill:#10b981,color:white
style D fill:#3b82f6,color:white
style K fill:#10b981,color:white
8.1 Practical Tips
- Start fresh for unrelated tasks — don’t carry over unnecessary context
- Export results to files when you need to preserve data between sessions
- Summarize periodically — ask Claude to summarize key findings before continuing
- Use filters in DAX queries to limit result set sizes
9 Summary
- MCP extends Claude with external tools and data sources
- Context window is limited — be mindful of how much data you load
- Choose the right tool for each task
- Aggregate data at the source, don’t pull raw rows
- Be specific in your questions
- Work iteratively from overview to detail
10 Next Steps
Now that you understand MCP concepts, let’s put them into practice! Head to Chapter 3: The Journey Begins to connect to a real Power BI model and start exploring data.