eBPF MCP

by sameehj

Not rated
GitHub

About

A secure MCP server for eBPF, designed for AI integration, kernel introspection, and automation.

Details

Author
sameehj
Categories
Developer Tools, Infrastructure, Security

Setup

Install eBPF MCP in your MCP client (Claude Desktop, Cursor, Windsurf, and others).

Repository: https://github.com/sameehj/ebpf-mcp

Follow the installation instructions in the repository README, then restart your MCP client.

🐝 ebpf-mcp: AI-Compatible eBPF Control via Model Context Protocol

A secure, minimal, and schema-enforced MCP server for eBPF β€” purpose-built for AI integration, kernel introspection, and automation.

ebpf-mcpis a secureModel Context Protocol (MCP)server that exposesa minimal set of structured toolsto interact with eBPF β€” optimized for safe AI control, automation agents, and human operators.

It enablesloading, attaching, introspecting, and streamingeBPF programs β€” all through strict JSON Schema contracts validated at runtime. No REST APIs, no shell escapes, and no bpftool wrappers.

# Install ebpf-mcp server curl -fsSL https://raw.githubusercontent.com/sameehj/ebpf-mcp/main/install.sh | sudo bash # Start the service (runs on port 8080 by default) sudo systemctl start ebpf-mcp sudo systemctl enable ebpf-mcp # Get your auth token cat /etc/ebpf-mcp-token # Check service status sudo systemctl status ebpf-mcp # View logs if needed sudo journalctl -u ebpf-mcp -f

For air-gapped or development environments:

git clone https://github.com/sameehj/ebpf-mcp.git cd ebpf-mcp sudo ./install.sh v1.0.2
# Run the complete test suite cd scripts/ chmod +x test-ebpf-mcp-server.sh ./test-ebpf-mcp-server.sh <your-token>

If no token is provided, the script will prompt for it interactively.

Once installed, connect Claude to your eBPF server (runs on port 8080):

# Add MCP server to Claude CLI claude mcp add ebpf http://localhost:8080/mcp \ -t http \ -H "Authorization: Bearer $(cat /etc/ebpf-mcp-token)" # Start Claude with eBPF tools claude --debug # Optional: Test with MCP Inspector (requires Node.js) npx @modelcontextprotocol/inspector http://localhost:8080/mcp

Looking to get started in specific environments or with Cursor IDE?

Learn how to configure and run ebpf-mcp inside a VirtualBox VM, with port forwarding, SSH access, and practical tips.

Step-by-step guide for running the eBPF MCP server with Cursor IDE for AI-driven observability.

- > Get system info and kernel version
- > Load and attach a kprobe program to monitor sys_execve
- > Show me all active eBPF programs and their types
- > Stream events from ringbuffer maps for 10 seconds
- > Trace kernel errors for the next 5 seconds

Each tool is designed to be schema-validatable, AI-orchestrable, and safe-by-default. They cover 80%+ of real-world observability and control workflows.

All tools return structured JSON outputβ€” AI-ready, streaming-compatible, and schema-validated.

πŸ” Seedocs/TOOL_SPECS.mdfor full schema definitions.

- βœ… Query kernel version, architecture, and BTF availability
- βœ… Load programs from disk or inline base64 with optional BTF
- βœ… Attach to live systems with type-safe constraints
- βœ… Inspect pinned objects, kernel version, verifier state
- βœ… Stream real-time events with filtering by pid/comm/cpu
- βœ… Trace kernel errors and system anomalies
- βœ… Discover available tools and their schemas
- βœ… Integrate with Claude, Ollama, or MCP-compatible clients

🧼 All resources are automatically cleaned up when a client disconnects (no manual unload/detach required unless pinned).

. β”œβ”€β”€ cmd/ # MCP server + CLI client β”œβ”€β”€ internal/ # Core logic: eBPF, tools, kernel adapters β”œβ”€β”€ pkg/types/ # JSON schema bindings + shared types β”œβ”€β”€ docs/ # Tool specs, design notes, schemas β”œβ”€β”€ scripts/ # Install script + test suite └── schemas/ # JSON Schema files for each tool

- πŸ”’No manual detach: Links are closed automatically unless pinned
- 🧹Auto cleanup: FDs and memory are released on disconnect
- πŸ“ŽPinning: Optional pin paths (/sys/fs/bpf/...) for maps/programs/links

- All tools arestrictly typedwith published schemas and returnstructured JSON output
- AI-ready: No parsing required β€” direct integration with language models
- Streaming-compatible: Real-time data flows for observability workflows
- Responses include:

- tool_version
- verifier_log(for debugging)
- Structurederrorwithcontext

- pin_object/unpin_object
- detach_link
- map_batch_op

These are omitted from the default for security and simplicity.

- Linux Kernel eBPF Docs
-
Model Context Protocol
-
MCP Inspector Tool
-
JSON Schema Spec (2020-12)
-
eBPF Security Best Practices
-
Cilium for Kubernetes Observability

πŸ§ͺ Seescripts/test-ebpf-mcp-server.shfor full validation suite.

Claude / Ollama / AI Client ↓ MCP JSON-RPC ↓ ebpf-mcp server ↓ Kernel APIs

πŸ“¬GitHub – sameehj/ebpf-mcpπŸ›  Contributions, issues, and PRs welcome!

Structured. Safe. Schema-native.ebpf-mcpbrings eBPF to the age of AI.

This is a web browser that enables your coding agent, such as Claude Code, to visit websites on your behalf and assist you in identifying bugs or creating UI test cases.

Enable AI Agents to fix build failures from CircleCI.

Boost security in your dev lifecycle via SAST, SCA, Secrets & IaC scanning with Cycode.

Enable AI agents to secure code with Semgrep.

An engineering governance and safety control plane for AI coding agents to enforce strict SDLC discipline, quality gates, and security branch protections.

AI-powered security scanning. Scans code, files, and git diffs for vulnerabilities in real-time using the Armis scanning API.

MCP server that vets LLM-emitted shell commands BEFORE execution. 30 detection rules across destructive file ops, package managers, system, database, git, network, exfiltration, privilege escalation. Sub-second, local, free.

Give your coding agent the dependency graph it is about to change: scan a source tree, SBOM, Git ref, or container image; explain why a package is present; diff two graphs; check findings against policy.

BoostSecurity MCP acts as a safeguard preventing agents from adding vulnerable packages into projects. It analyzes every package an AI agent introduces, flags unsafe dependencies, and recommends secure, maintained alternatives to keep projects protected.

Breaking Change Alerts for Humans and AI Agents.

Paid remote MCP for CLI tool MCP, structured receipts, usage logs, and audit-ready evidence for agent and CI workflows.

No reviews yet β€” be the first

Sign in to leave a review

Use Google, GitHub, or an email account so ratings stay tied to real people.

Email sign in

No reviews posted yet.