CIP Kernel MCP Server
Enables querying CIP git repositories to locate kernel branches, fixing commits, and patches across mainline, stable, and CIP branches for security patch implementation.
Provides tools for collecting read-only inventory from a local Linux system, including kernel version, kernel config, loaded modules, and distribution details, to support dependency discovery and CVE triage.
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., "@CIP Kernel MCP Server Is CVE-2024-1234 applicable to my CIP 5.10 kernel?"
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.
CIP Kernel MCP Server
An open-source MCP (Model Context Protocol) server engine for Linux system administrators managing systems on CIP super-long-term-support (SLTS) kernels (5.10.x) — built to accelerate dependency discovery and security patch implementation.
1. Motivation
The Civil Infrastructure Platform (CIP) maintains SLTS Linux kernels (currently 5.10.x, supported 10+ years) that power bridges, tunnels, railways, power plants, and other industrial systems. Administrators of these systems face a specific set of hard problems:
Dependency opacity. A production CIP image combines a pinned kernel, distro packages, out-of-tree drivers, firmware blobs, and custom daemons. Answering "what depends on this kernel symbol / library / driver version?" currently requires slow, manual cross-referencing.
Slow CVE triage. A CVE arrives in
kernel-5.10.x. The admin must determine whether the affected subsystem is even enabled in the deployed kernel config, whether a fix is already in a CIP branch, and what backport a custom kernel requires.Fragmented tooling.
cve-trackerdata, NVD, kernel configs,modinfo, SBOM scanners, and patch sets live in disconnected silos.10-year maintenance windows. Long-lived deployments mean patches must be backported, not upgraded — which makes every change riskier and every dependency fact more valuable.
CIP Kernel MCP Server closes this gap by exposing these silos as structured, queryable MCP tools so that any MCP-capable LLM agent (Claude Code, IDE assistants, chat agents) can assist the admin with accurate, machine-verified facts.
Related MCP server: Aegis-Sovereign MCP Server
2. Goals
Give LLM agents fast, structured access to dependency information for systems running CIP 5.10.x kernels.
Help administrators triage CVEs and implement security patches faster and more safely.
Remain fully open source (MIT), community-driven, and vendor-neutral.
Be read-only by default — analysis first; any mutating action is explicit, audited, and gated.
Non-goals
Replacing a package manager, build system, or patch pipeline.
Auto-applying patches to production without human approval.
Supporting non-LTS or non-CIP kernel branches (initially; other SLTS kernels may follow).
3. Core Capabilities (MCP Tools)
Tool | Purpose | Phase |
| Collect a read-only machine inventory: kernel version, config ( | P0 |
| Look up a CVE: kernel.org cve records first (commit-keyed), NVD fallback. Normalized record with affected files, version ranges, and fixing commits. | P0 |
| Two gates: version range (fix already present / not introduced) and config mapping → applicable / not applicable / unknown, always with an evidence chain. | P0 |
| Locate existing fixes: mainline → stable → CIP branches; live linux-cip mirror queries resolve the CIP backports (commit, first tagged CIP release). | P0 |
| Build and query a dependency graph: kernel symbols ↔ modules ↔ drivers ↔ packages ↔ services. | P1 |
| Draft a kernel-rule-compliant backport into a staging directory; conflict report. | P1 |
| Per installed CIP release: fixed vs outstanding CVEs, update recommendation. | P1 |
| Audit kernel config against hardening baselines (CIP hardening guide / IEC 62443). | P2 |
| Emit a CycloneDX/SPDX SBOM of the scanned system, including kernel and module inventory. | P2 |
4. Architecture
Modular engine in five layers, from the MCP runtime to the product surface. Full module catalog, governing rules (R1–R8), and implementation priorities: docs/ARCHITECTURE.md.
flowchart LR
A["MCP Client<br/>Claude Code / IDE / Chat"] -->|MCP stdio / HTTP| B["CIP Kernel MCP Server"]
B --> C["Tool Layer<br/>scan · graph · CVE · patch"]
C --> D[("Local Sysfs / Procfs<br/>Kernel Info & Config")]
C --> E[("Local Cache + Integrity<br/>CVE DB, vulns.git mirror")]
C --> F[("Remote Sources<br/>kernel.org vulns.git,<br/>NVD, cip-kernel git")]
H["Administrator<br/>approves mutating actions"] --> BTransport: stdio (local admin workstation); streamable HTTP team server in P3.
Safety model: tools are read-only by default; no tool touches a running system.
Safety & security model: docs/THREAT-MODEL.md.
5. Security Principles
Read-only by default — inventory and analysis require no privileges beyond reading.
Least privilege — no root requirement for scanning; agents run as a dedicated user.
Explicit approval — every state-changing operation requires a human confirmation step.
Full audit trail — every tool invocation is logged with hash-chained digests of inputs and outputs.
Deterministic outputs — verdicts never guess and always include their evidence chain.
6. Status
Phase P0 (MCP Foundation) — engine implemented:
Engine core: MCP runtime (stdio), hash-chained audit trail, offline-first cache, source-integrity hooks, tool registry.
System inventory: kernel-config fallback chain —
/proc/config.gz→ distro/boot/config-<release>→ IKCONFIG blob extracted from the kernel image (CONFIG_IKCONFIG); disabled options (# CONFIG_X is not set) are normalized to=nso the applicability config gate can rule subsystems out; the resolved source is reported asconfigSource(limitation: compressed bzImage payloads are not unwrapped — such hosts should ship/boot/config-*or enableCONFIG_IKCONFIG_PROC).CVE chain: kernel.org cve records via vulns.git (CVE JSON 5.0: affected files, per-series version ranges from
cpeApplicability, commit-keyed fixing commits) with NVD fallback; a provider that is unavailable (no git CLI, air-gapped host) is skipped.Patch provenance: live linux-cip mirror queries — metadata-only cached clone of the CIP kernel repo; backports matched via the upstream fixing sha (
commit <sha> upstream./Fixes:lines, Rule R4), each reported with the first tagged CIP release containing it (e.g.v5.10.163-cip35) and a browsable commit URL; branches without a backport get an explicit negative signal; degrades to record-derived candidates when offline.Analysis: CVE applicability engine with two evidence-backed gates — version range (fix already present / not introduced) and config/module mapping; patch locator per stable series with CIP backport resolution.
MCP tools:
scan_system,query_cve,find_patches,cve_applicability.CI (Node 20/22: type-check, tests, build), vitest coverage for engine and analysis modules; reproducible installs via package-lock.json,
npm auditclean.
Phase P1 (Security Workflow) — partially implemented:
Dependency Graph (Module A3, Rule R6): New tools
build_dependency_graphandquery_dependency_graphenable impact analysis and dependency chain discovery. The graph is built from kernel config, loaded modules, and known subsystem mappings, with nodes for subsystems, modules, drivers, and symbols. Query types include:impact-analysis(what depends on these nodes?),dependency-chain(what do these nodes depend on?),subgraph(extract subgraph), andpath(find paths between nodes). All results include evidence chains for auditability.Patch Builder (Module W1, Rules R1/R4/R5): New tool
draft_backportcreates kernel-rule-compliant backports into a staging directory. Generates draft patches with proper backport headers (commit <sha> upstream, Rule R4), detects conflicts (version mismatches, refactoring, API changes), and produces conflict reports. Never applies to running system (Rule R1/R5).
Requires the git CLI on the host (for the vulns.git and linux-cip mirrors); the NVD fallback needs no git.
7. Tech Stack
Language: TypeScript (Node.js ≥ 20) — chosen at kickoff; the official MCP SDK is TypeScript-first, giving a single-language engine + provider SDK. Python provider examples may follow in P3.
MCP SDK: official Model Context Protocol SDK (server side, stdio transport).
Data: kernel.org vulns.git mirror + linux-cip mirror (git CLI) + NVD API, behind the offline-first JSON cache.
CI: GitHub Actions on Node 20/22 with vitest.
8. Development
git clone https://github.com/0x00000109/cip-kernel-mcp-server.git
cd cip-kernel-mcp-server
npm install
npm run lint # type-check (tsc --noEmit)
npm test # vitest
npm run build # compile to dist/
npm start # run the MCP server over stdioEnvironment overrides:
CIP_MCP_CACHE_DIR— cache directory (default.cip-mcp-cache)CIP_MCP_AUDIT_LOG— audit log path (default.cip-mcp-audit.log)CIP_MCP_VULNS_DIR— kernel.org vulns.git mirror location (default<cache>/vulns)CIP_MCP_MIRROR_DIR— linux-cip mirror location (default<cache>/linux-cip)CIP_MCP_MIRROR_URL— linux-cip mirror URL override (defaultgit.kernel.org)
8.1 Connecting an MCP client
Build once, then point any MCP-capable client at the server:
npm run build
npx @modelcontextprotocol/inspector node dist/index.jsThe MCP Inspector gives an interactive test harness: connect, list tools, and call scan_system, query_cve, find_patches, cve_applicability directly.
Claude Desktop — add to claude_desktop_config.json (Settings → Developer → Edit Config):
{
"mcpServers": {
"cip-kernel": {
"command": "node",
"args": ["/home/admin/cip-kernel-mcp-server/dist/index.js"],
"env": {
"CIP_MCP_CACHE_DIR": "/var/cache/cip-mcp"
}
}
}
}Cursor / other stdio clients — the same mcpServers shape goes in .cursor/mcp.json (project scope) or your client's equivalent.
First queries to try:
scan_system— read-only inventory of the host (kernel, config with resolved source, modules, distro)query_cvewith e.g.CVE-2024-26581— normalized record: affected files, version ranges, fixing commitscve_applicabilitywith the same CVE — verdict + evidence chain against this hostfind_patches— provenance chain: stable fix → CIP backport commit + first tagged CIP release
Note: the server is read-only; cache and audit files are the only things it writes. First calls that hit kernel.org sources clone the mirrors (a few hundred MB of metadata, once) — see the env overrides above to relocate the cache.
Contribution rules: CONTRIBUTING.md.
9. License & Contribution
MIT licensed. Contributions welcome: kernel triage expertise, MCP tool ideas, CVE data quality, and docs for industrial deployment scenarios are the most valuable first contributions.
10. Repository Layout
.
├── README.md
├── CONTRIBUTING.md
├── docs/
│ ├── ARCHITECTURE.md # modular architecture, rules R1-R8, priorities P0-P3
│ └── THREAT-MODEL.md # safety & security model
├── src/
│ ├── index.ts # MCP server entry (stdio)
│ ├── engine/ # L0: types, runtime, audit, cache, integrity, registry
│ ├── providers/ # L1: system inventory, kernel.org cve, NVD, CIP git, cve-service
│ ├── analysis/ # L2: CVE applicability, version ranges, patch locator
│ └── tools/ # L3: MCP tool wiring
├── tests/
└── .github/ # CI workflow, issue templatesAvailable Tools
7 toolsbuild_dependency_graphBuild dependency graphB
Build a dependency graph from the system inventory: kernel config, loaded modules, and known subsystem mappings. Nodes include subsystems, modules, drivers, symbols. Edges represent dependencies, hierarchy, and usage relationships (Module A3, Rule R6).
Inputs: no named parameters.
cve_applicabilityAssess CVE applicabilityB
Cross-reference a CVE against this system version + config + modules. Two gates: version range (fix already present / not introduced) and config mapping. Verdict always carries an evidence chain (R3).
Inputs: cveId (required).
draft_backportDraft backport patchA
Draft a kernel-rule-compliant backport into a staging directory. Creates draft patches with proper backport headers (commit upstream, Rule R4). Never applies to running system (Rule R1/R5). Returns conflict report and evidence chain.
Inputs: cveId (required), upstreamSha (required), outputDir, targetBranch.
find_patchesFind patches for a CVEB
Locate existing fixes along the provenance chain: mainline -> stable -> CIP branches. Live linux-cip mirror queries resolve the CIP backports (backport commit, first tagged CIP release, e.g. v5.10.163-cip35); degrades to record-derived candidates when the mirror is unavailable (R1/R2/R4).
Inputs: cveId (required).
query_cveQuery CVE recordB
Look up a CVE by id (kernel.org cve records first, NVD fallback). Returns a normalized record with affected files, version ranges, and fixing commits (R1/R3).
Inputs: cveId (required).
query_dependency_graphQuery dependency graphA
Query a dependency graph for impact analysis, dependency chains, or paths. Query types: impact-analysis (what depends on these nodes?), dependency-chain (what do these nodes depend on?), subgraph, path (find paths between nodes). Built from system inventory (Module A3, Rule R6).
Inputs: queryType (required), endId, nodeIds, startId, +1 more.
scan_systemScan system inventoryB
Collect a read-only kernel inventory: version, config, loaded modules, distro. Read-only, least privilege (R2/R3).
Inputs: no named parameters.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 7 tools
Each tool maps to a distinct step or resource: inventory (scan_system), CVE lookup (query_cve), fix discovery (find_patches), applicability assessment (cve_applicability), graph build vs. graph query, and drafting (draft_backport). The build/query dependency graph pair is cleanly split by verb, and find_patches vs. cve_applicability are separated by purpose (locate fixes vs. decide applicability). No meaningful overlap remains.
Six of seven tools use a consistent verb_noun pattern (scan_system, query_cve, find_patches, build_dependency_graph, query_dependency_graph, draft_backport). The lone exception, cve_applicability, is noun-only and breaks the verb-first convention, but it is still readable and unambiguous.
Seven tools is well-scoped for a CVE assessment and backport drafting workflow, with each tool earning its place. Nothing feels padded or missing at the count level.
The surface covers the core lifecycle: scan inventory, look up a CVE, find fixes, assess applicability, explore dependencies, and draft a backport. Minor gaps exist around CVE discovery (no way to list/enumerate CVEs affecting a version) and post-draft verification of the staged patches, but agents can work around these.
Maintenance
Related MCP Connectors
The main MCP server has 10 tools, including six public, read-only CVE tools, site search and page reading. CVE results include source software/version evidence and available CISA KEV and dated FIRST EPSS data. The separate request_security_test action requires an agent key, consent and authorization. A no-account, read-only CVE-only endpoint is https://excessionlabs.ai/mcp/cve. Docs: https://excessionlabs.ai/cve-intelligence/.
The Cortex MCP server provides read-only access to real-time engineering context from the Cortex developer portal, allowing AI coding assistants to answer natural language questions about your organization's catalog (microservices, libraries, domains, teams, infrastructure), scorecards (engineering standards and best practices), initiatives (goals and deadlines), and Engineering Intelligence metrics. It includes tools for querying documentation, tracking personal entities, and accessing AI-assisted insights across the entire Cortex ecosystem.
Read-only MCP access to a documented IT fleet: state, changes, posture. 15 tools.
CVE lookups (NVD) and dependency-manifest audits (OSV) for AI agents. No API keys.
Related MCP Servers
- AlicenseAqualityDmaintenanceEnables LLM agents to query Patchwork kernel patches, series, CI checks, and comments via natural language through a read-only MCP server.8MIT
- FlicenseBqualityBmaintenanceEnables AI agents to query an air-gapped enterprise knowledge vault via seven MCP tools for deterministic and hybrid retrieval, entity graph traversal, context compression, archive inspection, onboarding scans, and node status.7-
- AlicenseAqualityCmaintenanceEnables MCP-compatible AI clients to collect read-only confidentiality evidence from registered Linux, WSL, and Docker targets, walk through ten ISO-aligned hardening steps, and generate professional audit reports. It also builds reviewable remediation plans and verifies supported changes with rollback and after-evidence when writes are explicitly enabled.9MIT
- AlicenseNot gradedqualityBmaintenanceEnables AI agents to query a repository's living, versioned knowledge graph through 11 MCP tools, so they can search code, inspect node, file and community context, trace paths between routes and tables, run impact analysis, and review what changed between versions.3MIT