Before we dive in: I share practical insights like this weekly. Join developers and founders getting my newsletter with real solutions to engineering and business challenges.
I've been using Cont3xt's MCP server for about six weeks now, and it's been incredibly useful - genuinely game-changing for keeping code aligned with team standards. But there's a specific frustration that kept coming up. I'd be in Claude Code or Cursor CLI, asking it to implement a feature, and I'd expect it to check our documented standards automatically. Sometimes it would, sometimes it wouldn't - depending on which model I was using and how it interpreted the instructions.
The workaround was explicit: type "use Cont3xt" or "check this against the standards" every other time I wanted feedback. It worked, but it defeated the point of having standards enforcement integrated into the development workflow. I was context-switching to ask for something that should just happen.
The core problem wasn't the MCP server itself - that works brilliantly for planning phase reviews when you're talking through architecture with Cursor. But during actual development? I needed feedback without asking for it. Not just at commit time, but as I wrote code. Real-time feedback during development, not only during planning.
So I built a VS Code extension that brings Cont3xt's knowledge base directly into the editor, providing real-time diagnostics as you save files. It's like having a code reviewer who knows every rule your team has documented, but one that never needs to be explicitly invoked.
What It Does
The Cont3xt VS Code extension analyses your code as you write it, surfacing suggestions based on your team's documented standards, rules, and architectural decisions. This has proven incredibly valuable - instead of discovering standards violations at code review or commit time, you see them immediately in your editor.
The extension operates in three main modes, and I use all three regularly depending on what I'm working on:
Automatic Analysis on Save: This is what I use most frequently. When you save a file, the extension automatically analyses it with configurable debouncing to avoid excessive API calls. Suggestions appear as inline diagnostics - those familiar squiggly lines you see for errors and warnings. The key here is that it's not analysing the entire file every single save; it's smart about only checking what changed.
Manual File Analysis: Sometimes you want a comprehensive review of a file or package. You can trigger analysis on-demand using the command palette, perfect for when you want immediate feedback on something you've been working on or when you need a thorough review of a component.
Diff Analysis: There is a post-commit hook which is used to analyse your staged changes to see how they align with team standards. I find this particularly useful for catching issues that span multiple files or understanding the impact of your changes before pushing.
The difference between using Cont3xt through MCP and having it directly in the editor is substantial. With MCP, I'd get fantastic advice during the planning conversation, but then I'd implement the feature and potentially drift from those standards without realising it. Now the feedback loop is tight - I see issues as they happen.
The Architecture
The extension follows a clean separation of concerns. At its core, several key components work together, and the design decisions here came directly from using earlier versions and hitting friction points.
The Incremental Analysis Problem
Here's a practical problem I hit early on: when I initially built this, the extension analysed the entire file on every save. Within about an hour of using it, I realised I was seeing the same three issues about import organisation at the top of the file every single time I changed a function at the bottom. It was technically correct feedback, but it was noise.
The solution was incremental analysis. The DiagnosticsManager tracks baselines - snapshots of file content when they're opened. When you save, it calculates what changed and only analyses those regions. If you've changed fewer than five lines or modified less than 50% of the file, it sends just the changed regions (with context lines) to the API. This dramatically reduced API payload size and improved response times.
The baseline storage uses an LRU (Least Recently Used) cache with both count and size limits, defaulting to 50 files or 10MB. This ensures the extension doesn't consume excessive memory even in large workspaces. When a file is opened, we capture a snapshot. When you make your next edit, we get the diff and only analyse what changed.
This has been one of the most valuable architectural decisions. Instead of repeatedly analysing stable code, you only get feedback on the code you're actively working on.
API Client and Retry Logic
The ApiClient handles all communication with the Cont3xt backend. One thing I've learned from building production systems is that networks fail, and they fail in annoying ways. The client includes robust retry logic with exponential backoff for transient failures - network hiccups, server errors, temporary unavailability.
The retry strategy is smart about what it retries: connection errors and server errors (5xx) get retried, but client errors like authentication failures (401) or rate limits (429) don't, because retrying wouldn't help. Nothing fancy here, just solid engineering that makes the extension reliable.
The client also handles API key management securely using VS Code's SecretStorage, ensuring credentials are never stored in plain text. This is one of those details that users don't think about, but if you get it wrong, you've created a security problem.
Git Integration
The extension is Git-aware, automatically detecting repository metadata - remote URL, branch, commit hash - and including it in analysis requests. This context helps the Cont3xt backend provide more relevant suggestions based on your project's specific rules and standards.
For diff analysis, the extension uses Git's diff capabilities to extract staged changes, making it easy to review your commits before pushing. This has become part of my workflow: I stage my changes, run the diff analysis, address any issues, then commit. It's saved me from some embarrassing commits.
Debouncing and Smart Scheduling
File saves trigger analysis, but not immediately. The extension waits for a configurable delay - default is two seconds - before analysing. If you save multiple times quickly, it cancels the previous analysis and schedules a new one. This is standard debouncing implementation, but it's necessary. Without it, you'd be hammering the API every time you hit Cmd+S, which happens a lot more than you'd think when you're in flow.
During analysis, the status bar shows a spinning icon so you know something's happening. The extension doesn't block your work - you can continue coding while analysis runs in the background.
Fix Loop Prevention
Here's a subtle issue that would have been annoying: when you apply a fix from the results panel or quick actions, the extension marks that file as "recently fixed" and skips the next automatic analysis. Without this, applying a fix would trigger immediate re-analysis that might flag the same issue again, creating a feedback loop.
This came from anticipation rather than experience - I thought through the flow and realised it could happen. Better to prevent it from the start than discover it through user frustration.
Results Panel and Diagnostics
Beyond inline diagnostics, the extension includes a rich results panel - a webview that aggregates all suggestions across your session. It groups results by file, provides filtering by severity, and offers one-click navigation to issues in your code.
The panel tracks which results you've viewed, showing a badge count in the status bar. You can apply fixes directly from the panel, and it automatically updates when new results arrive. This has been incredibly useful when working across multiple files - you get a consolidated view of all issues rather than hunting through individual files.
Smart Implementation Details
Several implementation details make the extension feel polished rather than prototype-y. These are the kinds of things you discover by using your own tools.
Incremental Analysis Thresholds: The extension intelligently decides when to use incremental versus full-file analysis. Small changes under five lines are skipped entirely - there's just not enough code to warrant an API call. Medium changes use incremental analysis. Large changes where you've modified more than 50% of the file fall back to full-file analysis, because at that point the incremental overhead isn't worth it.
Diagnostic Merging: During incremental analysis, the extension merges new diagnostics with existing ones, only clearing diagnostics in changed regions. This means you don't lose diagnostics for parts of the file you haven't touched. If you're working on a function at the bottom of a file and there's an issue at the top, that top issue remains visible until you either fix it or modify that region.
Context Lines: When analysing changed regions incrementally, the extension adds configurable context lines - default is ten - around each change. This ensures the API has enough surrounding code to make informed suggestions. Without context, you'd get feedback that might miss how your change interacts with nearby code.
Quick Fixes Integration: When diagnostics include fix suggestions, you can apply them directly from VS Code's lightbulb quick-fix menu (Ctrl+. or Cmd+.). The extension extracts code from markdown code fences in fix descriptions, making it easy to apply suggested changes. This integration with VS Code's native UX means users don't need to learn new patterns.
Real Usage Patterns
I've been using this extension daily on several projects, and the workflows have settled into clear patterns.
Daily Coding: As I write code, I save files naturally. The extension analyses in the background, showing diagnostics inline. The key is that I continue working while analysis happens - there's no interruption to flow. When I see a squiggly line appear, I can choose to address it immediately or keep going and come back to it.
Pre-Commit Review: Before committing, I run "Analyse Staged Diff" to see how my changes align with team standards. The results panel shows all suggestions grouped by file, making it easy to review and address issues. This has caught several things I would have missed - patterns that technically work but don't match our documented approach.
Comprehensive Reviews: When I want a thorough review of a package or component, I use the custom command to analyse entire files. This is useful when refactoring or when you inherit code and want to understand how it aligns with current standards. Instead of reviewing code manually against documentation, Cont3xt does the comparison and surfaces specific issues.
Onboarding Context: One unexpected benefit has been using this when working on projects I haven't touched in a while. The extension surfaces relevant standards and patterns specific to that codebase, essentially onboarding me back into the project's conventions. This has been incredibly valuable for context switching between projects.
Use Cases Where This Shines
The extension has proven particularly useful in several scenarios:
Maintaining Consistency: In codebases where different patterns have emerged over time, the extension helps maintain consistency by surfacing documented standards. Instead of code reviews becoming pattern enforcement sessions, developers see suggestions as they write code.
Refactoring Safety: When refactoring, you can analyse the changed regions to ensure your changes align with architectural decisions and don't introduce anti-patterns. I've found this especially useful when modernising older code - the extension helps verify that new code follows current patterns.
Documentation That Actually Works: If your team documents decisions in ADRs (Architecture Decision Records) or maintains coding standards, the extension ensures those documents actually influence code. It's documentation that enforces itself, which is far more effective than hoping people read and remember guidelines.
Learning Team Patterns: New team members get immediate feedback about team conventions and standards. Instead of learning through code review feedback cycles, they see suggestions as they write code. This significantly accelerates onboarding.
Configuration and Flexibility
The extension is highly configurable. You can adjust the API endpoint to point to your own Cont3xt instance or use the hosted service. There's a severity threshold filter so you can choose to only see HIGH or CRITICAL issues, or include everything down to LOW.
The debounce timing is configurable if two seconds doesn't match your workflow. You can set ignore patterns to exclude files or directories from analysis - useful for generated code, dependencies, or anything else you don't want analysed.
The incremental analysis thresholds can be tuned if you want different behaviour for when to use incremental versus full-file analysis. All configuration lives in VS Code's standard settings, making it easy to customise per workspace or globally.
Privacy and Security
The extension is designed with privacy in mind. API keys are stored securely using VS Code's SecretStorage. Only file contents, diffs, and minimal Git metadata are sent to the API - no personal information or file system structure beyond what's necessary.
You can configure ignore patterns to exclude sensitive files from analysis, and the extension respects VS Code's file scheme restrictions. It only analyses actual files, not untitled documents or special schemes.
Looking Forward
The current implementation focuses on single-file and diff analysis, but the architecture supports future enhancements. The incremental analysis system could be extended to support multi-file analysis, understanding how changes in one file affect others.
The results panel could evolve into a more comprehensive code quality dashboard, tracking trends over time or highlighting areas of the codebase that need attention. These are possibilities, not promises - the extension already solves the core problem of bringing Cont3xt's knowledge into the active development workflow.
From Passive to Active
The shift from Cont3xt's MCP integration to this VS Code extension represents a fundamental change in how code standards enforcement works. MCP is brilliant for planning phase reviews and architectural discussions with Claude Code. The extension brings that same knowledge base into the active development workflow.
Instead of discovering standards violations at code review or having to explicitly ask for feedback during implementation, you get real-time suggestions as you write code. The combination of MCP for planning and the extension for implementation creates a comprehensive workflow where team knowledge is accessible at every stage of development.
Cont3xt has been incredibly useful in both forms. The MCP server provides deep, contextual advice during planning and design. The VS Code extension provides immediate, targeted feedback during implementation. Together, they ensure that documented standards actually influence how code gets written, rather than being reference material that developers might or might not consult.
The extension demonstrates how modern IDE tooling can leverage cloud-based knowledge bases to provide contextual, real-time assistance. By combining local file tracking, Git awareness, and intelligent API communication, it creates a seamless experience that feels native to VS Code while bringing powerful external capabilities into the editor.
If you're building tools for developers, the lesson here is clear: meet them where they work. The most powerful knowledge base is useless if accessing it requires context switching. Integration isn't just about APIs and protocols - it's about fitting naturally into existing workflows.
