Click on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@Axivion MISRA C:2012 Compliance Agentanalyze the MISRA violation at src/main.c:42 and suggest a fix"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
Axivion MISRA C:2012 Compliance Agent — MCP Server
An MCP (Model Context Protocol) server that turns GitHub Copilot into a MISRA C:2012 compliance assistant. It loads Axivion static-analysis reports, explains violations with full rule rationale, and proposes concrete, confidence-scored fixes.
Disclaimer: The MISRA rule knowledge in this tool is derived from publicly available summaries and documentation. It is not a substitute for the official MISRA C:2012 standard. For authoritative rule text, consult your licensed copy.
Features
Capability | Description |
Report parsing | Auto-detects multiple Axivion JSON formats ( |
Rule knowledge base | 29 MISRA C:2012 rules (2.x, 8.x, 10.x) with rationale, compliant/non-compliant examples, and fix strategies |
Fix engine | Pattern-matching fixes for mechanical rules + context-aware guidance for complex ones |
Confidence scoring | Each fix suggestion is rated HIGH / MEDIUM / LOW |
Side-effect warnings | Cross-file impact analysis for rules affecting headers and callers |
Architecture
Prerequisites
Python 3.10 or higher (required by the
mcpSDK)VS Code with GitHub Copilot extension
An Axivion JSON report (or use the included mock reports for testing)
Setup
VS Code Configuration
Add the following to your VS Code settings.json (User or Workspace):
Replace
/absolute/path/to/with the actual paths on your machine.
MCP Tools
1. load_report
Loads an Axivion JSON report and sets the workspace root for code context.
2. list_violations
Lists all violations in a specific file, with rule titles.
3. analyze_violation
Deep analysis: code context + rule explanation + fix suggestion in one call.
4. explain_rule
Full MISRA rule reference: title, category, rationale, compliant/non-compliant examples, and fix strategy.
5. propose_fix
Concrete, confidence-scored fix with before/after code and side-effect warnings.
Supported Axivion JSON Formats
The parser auto-detects these structures:
Each issue can use various key names — the parser normalises them:
Rule ID:
ruleId,rule_id,rule,checkIdFile path:
location.path,location.file,file,pathLine number:
location.startLine,location.line,line,startLineSeverity:
severity,priority,level
MISRA Rules Covered
Rule 2.x — Unused Code (7 rules)
2.1 Unreachable code · 2.2 Dead code · 2.3 Unused type · 2.4 Unused tag · 2.5 Unused macro · 2.6 Unused label · 2.7 Unused parameter
Rule 8.x — Declarations & Definitions (14 rules)
8.1 Explicit types · 8.2 Prototype form · 8.3 Consistent declarations · 8.4 Compatible declaration · 8.5 Single extern · 8.6 One external definition · 8.7 No block-scope extern · 8.8 Static for internal · 8.9 Block scope if single use · 8.10 Static inline · 8.11 Extern array size · 8.12 Unique enum values · 8.13 Pointer to const · 8.14 No restrict
Rule 10.x — Essential Type Model (8 rules)
10.1 Appropriate operand type · 10.2 Character arithmetic · 10.3 Narrowing assignment · 10.4 Same type category · 10.5 Appropriate cast type · 10.6 Composite to wider · 10.7 Composite operand width · 10.8 Composite cast category
Running Tests
The test suite validates:
Parser loads 55 violations across 29 rules
Knowledge base has complete entries for all 29 rules
Fix engine produces suggestions for every violation
Mechanical fixes are correct (8.10, 8.14, 8.2, 2.7, 2.1)
Enhanced context provider features work
Cross-file side-effect warnings fire for affected rules
Project Structure
License
MIT — see LICENSE.