infoLABSCO SUMMARY
The capability each tool needs is documented next to the tool.
That table is the most useful thing on the page: it tells you in advance which half of the toolset works without privilege escalation, so a read-only observability setup is a deliberate configuration rather than a hope. The automatic cleanup on disconnect matters just as much — an agent that drops mid-session does not leave attached programs behind unless something was explicitly pinned. Extra tools like detach and pinning are named in the README as deliberately left out.
What it is
An MCP server for eBPF on Linux. Every tool has a JSON Schema validated at runtime, and the server talks to the kernel directly rather than shelling out, which is what makes it safe to hand to an agent.
What you get
- info reports kernel version, architecture and BTF availability, read-only and requiring no special capability
- load_program loads and validates .o files with CO-RE support, from disk or inline base64
- attach_program attaches to XDP, kprobe and tracepoint hooks with type-safe constraints
- inspect_state lists programs, maps, links and tool metadata, read-only
- stream_events streams from ringbuf and perfbuf maps with filtering by pid, comm or cpu
- trace_errors watches kernel tracepoints for error conditions
- Every tool returns structured JSON including tool_version, the verifier log for debugging, and a structured error with context
- Links close and file descriptors release automatically when a client disconnects, unless the object was pinned
Requirements
Linux 5.8 or newer, installed with the project's install script and run as a systemd service on port 8080. Authentication is a bearer token written to /etc/ebpf-mcp-token at install time. Capabilities depend on the tool: read-only introspection needs CAP_BPF, loading needs CAP_BPF or CAP_SYS_ADMIN, and attaching depends on the hook — XDP needs CAP_NET_ADMIN.
Setup effort
One command — curl -fsSL https://raw.githubusercontent.com/sameehj/ebpf-mcp/main/install.sh | sudo bash
USE CASES
Finding out what the kernel supports before trying anything
Version, architecture and BTF availability come back read-only.
Getting a probe onto a running system
Load the object file, then attach it with the constraints checked for that hook type.
Watching events as they happen
Ring buffer streaming with filtering by pid, comm or cpu.
Seeing what is already loaded
Programs, maps and links enumerated without needing write capability.
Chasing an intermittent kernel error
Tracepoint monitoring for error conditions over a window of time.
6 tools
Listed in project docs. Your client may show a different list.
load_programattach_programinspect_statestream_eventstrace_errorsBEFORE YOU INSTALL
What to know first
Tools you get
6 tools named in the project's documentation. pin_object, unpin_object, detach_link and map_batch_op are planned, not available. Names in docs/COVERAGE_ANALYSIS.md, such as deploy or ebpf_load, are not registered tools.
INSTALLATION
Connect your client
Server setup
Install: curl -fsSL https://raw.githubusercontent.com/sameehj/ebpf-mcp/main/install.sh | sudo bash (air-gapped/dev alternative: git clone https://github.com/sameehj/ebpf-mcp.git && cd ebpf-mcp && sudo ./install.sh v1.0.2)
Start the service (runs on port 8080 by default):
sudo systemctl start ebpf-mcp && sudo systemctl enable ebpf-mcpGet your auth token:
cat /etc/ebpf-mcp-tokenCheck it came up: sudo systemctl status ebpf-mcp (logs: sudo journalctl -u ebpf-mcp -f)
Claude CLI: claude mcp add ebpf http://localhost:8080/mcp -t http -H "Authorization: Bearer $(cat /etc/ebpf-mcp-token)"
Cursor IDE alternative: Settings -> Tools & Integration -> MCP Tools, add the url+headers mcpServers block with your token
MCP Clients
Claude Code
claude mcp add ebpf http://localhost:8080/mcp \
-t http \
-H "Authorization: Bearer $(cat /etc/ebpf-mcp-token)"Cursor
{
"mcpServers": {
"ebpf-mcp": {
"url": "http://localhost:8080/mcp",
"headers": {
"Authorization": "Bearer <YOUR_TOKEN>"
}
}
}
}MCP Inspector
npx @modelcontextprotocol/inspector http://localhost:8080/mcp