VS Code Copilot Integration
Goal: Query your industrial data from within VS Code.
Prerequisites
- VS Code with GitHub Copilot extension
- Copilot Chat enabled
- OpenIndustrial workspace with warm queries
- API key with appropriate scopes
Step 1: Install MCP Extension
- Open VS Code Extensions (Ctrl+Shift+X)
- Search for "MCP Tools"
- Install the official MCP extension
- Reload VS Code
Step 2: Configure MCP Server
- Open VS Code settings (Ctrl+,)
- Search for "MCP"
- Click "Edit in settings.json"
- Add your OpenIndustrial server:
{
"mcp.servers": {
"open-industrial": {
"command": "npx",
"args": [
"-y",
"@openindustrial/mcp-server",
"--workspace", "YOUR_WORKSPACE_ID",
"--token", "YOUR_API_TOKEN"
]
}
}
}
Step 3: Verify Connection
- Open Copilot Chat (Ctrl+Shift+I)
- Type:
@mcp list tools - You should see your warm queries listed
Step 4: Query Your Data
In Copilot Chat, use the @mcp prefix:
@mcp What's the average temperature from the last hour?
Copilot will:
- Identify the relevant warm query tool
- Execute it with parameters
- Return results in the chat
Use Cases for Developers
Debugging with Real Data
@mcp Show me the last 10 error events from device T-07
Get real error data while debugging device communication code.
Writing Documentation
@mcp What fields does the production-metrics query return?
Document your data schemas based on actual query shapes.
Code Generation
@mcp What's the structure of device telemetry?
I need to write a TypeScript interface for it.
Generate type definitions from real data structures.
Thinking Tip:
Copilot can generate code that matches your actual data shapes when it has access to real query results.
Example Workflow
-
Query current state:
@mcp What's the current status of Line 2? -
Understand the data:
@mcp What metrics are available for production lines? -
Generate code:
Based on those metrics, write a function that calculates OEE -
Validate against real data:
@mcp Run the OEE calculation for Line 2 last shift
Multi-Tool Queries
Copilot can combine multiple MCP tools:
@mcp Compare temperature readings from sensors T-01 and T-07
and tell me if there's a significant difference
The AI orchestrates multiple queries, but each one goes through the governed layer. Full audit trail maintained.
Troubleshooting
| Issue | Solution |
|---|---|
| Tools not appearing | Reload VS Code, check extension is active |
| @mcp not recognized | Ensure MCP extension is installed |
| Authentication errors | Verify token in settings.json |
| Slow first query | MCP server initializing; subsequent queries faster |
Security
- Store tokens in VS Code settings (local to your machine)
- Use environment variables for shared team configs
- Create dedicated token for VS Code usage
- Review audit logs periodically
Next Steps
| If you want to... | Go to... |
|---|---|
| Connect Claude Desktop | Claude Desktop → |
| Build custom client | Custom Clients → |
| Understand MCP protocol | MCP Overview → |
On this page
- FrontmatterVersion: 1 DocumentType: Guide Title: "VS Code Copilot" Summary: "Configure the MCP server in VS Code so Copilot Chat can query production data while you code, debug, and write documentation." Created: 2026-01-18
- VS Code Copilot Integration