KernelMind MCP
Enables inspection of kernel git history, including commit details, file history, and blame line ranges for tracing file evolution.
Provides evidence-based Linux kernel engineering tools, enabling search of kernel C source code, commit history, mailing list discussions, patches, and documentation, with ranked evidence sources and risk analysis.
Click on "Deploy 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., "@KernelMind MCP Trace the history of sock_alloc and show related LKML discussions."
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.
KernelMind MCP
Evidence-based Linux kernel engineering for AI agents — citations, not hallucinations.
KernelMind MCP is a Model Context Protocol server
that turns the public corpus of Linux kernel knowledge — git history, LKML /
lore.kernel.org, Patchwork, and Documentation/ — into a queryable, evidence-ranked
knowledge platform for AI coding and planning agents.
Every tool response carries an explicit evidence chain: which commit, which
mailing-list thread, which patch state transition supports the conclusion — plus
explicit assumptions and contradictions when the evidence is incomplete.
Performance claims are never fabricated; the system flags them
hardware_validation_required instead.
Why
LLMs hallucinate kernel facts — invented signatures, misremembered locking rules, APIs removed years ago cited as current. KernelMind's contract:
Index primary sources, kept current by incremental sync (never full rebuild)
Fuse dense vectors + BM25 + PostgreSQL full-text via Reciprocal Rank Fusion (k=60)
Rank by a fixed evidence hierarchy: commit messages > LKML consensus > Documentation/ > maintainer comments > accepted patches > LWN > source code > rejected RFCs > vendor trees
Return
evidence_sources,assumptions,contradictions, andhardware_validation_requiredon every engineering conclusion
Subsystem-agnostic by design: works identically on mainline, stable, linux-next, and vendor trees.
Related MCP server: context-atlas
Features & Registered Tools
KernelMind MCP provides 16 specialized, evidence-first engineering tools across 5 categories:
Category | Available MCP Tools | Description |
Source Code |
| Search kernel C source code and lookup symbol definitions with AST tree-sitter chunking |
Git Intelligence |
| Inspect commit history, blame line ranges, and trace file evolution |
Patchwork & LKML |
| Query patch discussions, LKML thread consensus, and patch state transitions |
Research & Risk |
| Evaluate stability ratings, race/locking risk factors, and hardware validation requirements |
Documentation & LWN |
| Search kernel |
MCP prompts implement a 9-stage agent workflow: Knowledge Gathering → Subsystem Understanding → Architecture Modeling → Maintainer Review → Hypothesis Generation → Experiment Design → Implementation Planning → Patch Review → Self-Critique.
Architecture
AI Agent (Opencode / Claude Code / any MCP host)
│ JSON-RPC 2.0 — stdio (default) or Streamable HTTP
▼
MCP Gateway (validation, auth, audit)
▼
Tools → Hybrid Search (Qdrant + BM25 + PG FTS, RRF)
→ EvidenceCorrelator (priority tiers, assumptions, contradictions)
▼
PostgreSQL · Qdrant · Neo4j · Redis · MinIO
▲
Incremental Sync (Celery): git delta · LKML/lore · Patchwork
(state-transition tracking across all 12 patch states) · Documentation/Indexing is kernel-aware: tree-sitter C grammar chunks at function/struct/macro
granularity without splitting function bodies; subsystem attribution is parsed
from MAINTAINERS (longest-prefix match) — no hardcoded maps.
Details: docs/ARCHITECTURE.md
Quick Start
git clone https://github.com/Reinazhard/kernelmind-mcp.git
cd kernelmind-mcp
cp .env.example .env # set EMBEDDING_* and any overrides
docker compose up -d --build
curl http://localhost:8080/healthOpencode (opencode.json)
{
"mcp": {
"kernelmind": {
"type": "local",
"command": ["docker", "compose", "exec", "-T", "kernelmind-mcp",
".venv/bin/python", "-m", "kernelmind.server", "--stdio"],
"enabled": true
}
}
}Any stdio MCP client uses the same command. For remote hosts, set
KERNELMIND_TRANSPORT=streamable-http and connect to http://<host>:8080/mcp.
See docs/OPENCODE.md and docs/DEPLOYMENT.md.
Configuration
All config via environment variables (Pydantic, fail-fast at startup) —
see .env.example.
Variable | Default | Purpose |
|
|
|
| — | Embedding provider (required) |
| compose defaults | Storage backends |
|
| HTTP Server Bind Address |
Project Status
Phase completion and known limitations: docs/PROGRESS.md. Available tool reference: docs/TOOLS.md. Deployment guide: docs/DEPLOYMENT.md.
License
GPL-2.0 — see LICENSE.
Available Tools
16 toolsanalyze_patch_seriesA
Analyze a series of kernel patches for risks, subsystems, and evidence.
Args: patches: Sequence of patch dictionaries containing name/diff_content. subsystem_hint: Optional initial subsystem assumption.
Returns: Dictionary with analysis summary, risk flags, and evidence sources.
Inputs: patches (required), subsystem_hint. Returns: object
analyze_subsystem_riskA
Analyze overall engineering risk and stability for a kernel subsystem.
Args: subsystem: Kernel subsystem identifier (e.g. 'mm', 'sched', 'net'). time_range: Time period for analysis (default: '30d').
Returns: Dictionary containing risk_score, stability_rating, risk_factors, hardware_validation_required, summary, and evidence_sources.
Inputs: subsystem (required), time_range. Returns: object
blame_line_rangeA
Get commit attribution for a specific line range in a file.
Args: file_path: Relative file path in kernel tree. start_line: Starting line number (1-indexed). end_line: Ending line number. repo: Optional repository filter.
Returns: Dictionary with line range attributions and evidence sources.
Inputs: end_line (required), file_path (required), start_line (required), repo. Returns: object
get_commit_detailsA
Retrieve detailed metadata for a specific kernel commit SHA.
Args: sha: Complete or prefix commit SHA. repo: Optional repository name filter.
Returns: Dictionary with commit metadata and evidence sources.
Inputs: sha (required), repo. Returns: object
get_doc_detailsA
Retrieve full content and section headings for a kernel document.
Args: doc_id: Document file path (e.g. Documentation/net/core.rst).
Returns: Dictionary containing document title, sections, and evidence_sources.
Inputs: doc_id (required). Returns: object
get_file_historyA
Get commit history and symbol evolution for a kernel file path.
Args: file_path: Relative file path in kernel tree. repo: Optional repository filter. limit: Max commits to return.
Returns: Dictionary with file commit history and evidence sources.
Inputs: file_path (required), repo, limit. Returns: object
get_lwn_articleA
Retrieve full details and symbol references for an LWN article.
Args: article_id: Unique LWN article ID (e.g. LWN-900100).
Returns: Dictionary containing article title, author, body, and evidence_sources.
Inputs: article_id (required). Returns: object
get_patch_detailsA
Retrieve full metadata and state transition history for a patch.
Args: patch_id: Patchwork message/patch ID.
Returns: Dictionary with patch details, history, and evidence sources.
Inputs: patch_id (required). Returns: object
get_thread_detailsB
Retrieve full details and body excerpt for an LKML thread.
Args: message_id: Email message ID of the thread.
Returns: Dictionary with thread metadata and evidence sources.
Inputs: message_id (required). Returns: object
lookup_symbolA
Look up a specific symbol (function, struct, macro) in kernel source.
Args: name: The name of the symbol to look up. kind: Optional kind of symbol (e.g., 'function', 'struct'). repo: Optional repository to filter by.
Returns: Dictionary containing location, definition, and evidence sources.
Inputs: name (required), kind, repo. Returns: object
search_commitsA
Search kernel git commits by message, author, or subsystem.
Args: query: Keywords to search in commit messages. author: Optional author filter. file_path: Optional file path filter. subsystem: Optional subsystem filter. limit: Max number of commits to return.
Returns: Dictionary with matching commits and evidence sources.
Inputs: query (required), limit, author, file_path, +1 more. Returns: object
search_docsA
Search kernel documentation files by query or subsystem.
Args: query: Keywords to search in document titles and headings. subsystem: Optional subsystem filter (e.g. 'net', 'mm'). limit: Maximum number of documentation results to return.
Returns: Dictionary containing matching 'docs' list and 'evidence_sources'.
Inputs: query (required), limit, subsystem. Returns: object
search_kernel_codeA
Search for kernel code using hybrid search across all indexed data.
Args: query: The search query string. repo: Optional repository to filter by. subsystem: Optional subsystem to filter by. limit: Maximum number of results to return.
Returns: Dictionary containing results and correlated evidence sources.
Inputs: query (required), repo, limit, subsystem. Returns: object
search_lkmlA
Search Linux Kernel Mailing List threads by subject or excerpt.
Args: query: Search keywords. subsystem: Optional subsystem filter. author: Optional from_addr filter. limit: Max results.
Returns: Dictionary with matching threads and evidence sources.
Inputs: query (required), limit, author, subsystem. Returns: object
search_lwnA
Search Linux Weekly News (LWN) articles on kernel development.
Args: query: Keywords to search in article titles and body. subsystem: Optional subsystem filter (e.g. 'mm', 'sched'). limit: Maximum number of articles to return.
Returns: Dictionary containing 'articles' list and 'evidence_sources'.
Inputs: query (required), limit, subsystem. Returns: object
search_patchesA
Search submitted kernel patches by query, submitter, or state.
Args: query: Search terms for patch name. submitter: Optional submitter filter. state: Optional patch state filter. subsystem: Optional subsystem filter. limit: Max results.
Returns: Dictionary of matching patches and evidence sources.
Inputs: query (required), limit, state, submitter, +1 more. Returns: object
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 16 tools
Every tool targets a distinct resource type and action. Search tools are differentiated by target (code, commits, patches, LKML, docs, LWN), and detail tools map one-to-one to those search targets. Even similar tools like search_kernel_code and lookup_symbol are clearly separated by broad search vs. exact symbol lookup.
All tool names follow a consistent lowercase snake_case verb_noun pattern (search_*, get_*, lookup_symbol, blame_line_range, analyze_*). No mixed conventions or ambiguous verbs; the naming scheme is uniform and predictable.
At 16 tools, the set is slightly above the typical 3-15 ideal range, but the breadth of the domain (code, commits, patches, LKML, docs, LWN, risk analysis) justifies each tool's existence. No redundant or trivial tools are present.
The tool surface provides full lifecycle coverage for kernel intelligence: search and retrieve operations for each data type (code, commits, patches, LKML, docs, LWN), plus specialized analysis (patch series, subsystem risk, file history, blame). No obvious gaps prevent an agent from answering kernel-related questions or performing deep investigations.
Related MCP Connectors
Persistent memory and knowledge management for AI agents with semantic search and 50+ tools.
Retrieve citation-ready technical context and coordinate evidence-backed work between AI agents.
Your company's brain for AI agents. Cited, permission-aware knowledge across every system.
The context platform for AI agents: code search, team decisions, and grounded project context.
Related MCP Servers
- FlicenseNot gradedqualityDmaintenanceEnables LLMs to query a local commitment ledger and knowledge base extracted from email, calendar, and meeting transcripts, allowing natural language search for facts, people, and open commitments, and suggesting closures with evidence.-
- AlicenseNot gradedqualityCmaintenanceEnables coding agents to query a local, versioned knowledge graph of a software project, retrieving overviews, context packs, evidence, and explanations to make informed changes.MIT
- FlicenseNot gradedqualityBmaintenanceEnables AI coding agents to interrogate a local repository deterministically for symbols, dependencies, call paths, routes, tests, and Git impact, returning verified structured evidence with exact line citations instead of requiring the whole codebase to be read.45 PyPI5-
- AlicenseNot gradedqualityBmaintenanceEnables AI coding agents to query repository structure, symbols, dependencies, Git history, architecture, memory, impact, and guarded edits through a stable MCP interface, returning ranked task-specific evidence within a context budget.49 PyPI8Apache 2.0