BitBake MCP Server

Local setup required. This server has to be cloned and prepared on your machine before you register it in Claude Code.
1

Set the server up locally

Run this once to clone and prepare the server before adding it to Claude Code.

Run in terminal
npm install github:pkt-lab/mcp-bitbake
2

Register it in Claude Code

After the local setup is done, run this command to point Claude Code at the built server.

Run in terminal
claude mcp add mcp-bitbake -- node "<FULL_PATH_TO_MCP_BITBAKE>/dist/index.js"

Replace <FULL_PATH_TO_MCP_BITBAKE>/dist/index.js with the actual folder you prepared in step 1.

README.md

A deterministic MCP server for BitBake and Yocto recipe inspection.

mcp-bitbake

A deterministic MCP (Model Context Protocol) server for BitBake/Yocto. Inspects recipe metadata without evaluating variables — returns only raw assignments as found in files.

Design rules:

  • Never evaluates variables — only returns raw assignments
  • Only supports .bb and .bbappend files
  • Supported operators: =, :=, ?=, +=, .=
  • Returns structured JSON for all responses
  • Fails closed on unsupported syntax (override syntax warned, not parsed)

Install

From GitHub (no npm publish needed):

npm install github:pkt-lab/mcp-bitbake

Or clone and build manually:

git clone https://github.com/pkt-lab/mcp-bitbake
cd mcp-bitbake
npm install && npm run build

Claude Desktop configuration

If installed via npm (GitHub):

{
  "mcpServers": {
    "mcp-bitbake": {
      "command": "node",
      "args": ["./node_modules/mcp-bitbake/dist/index.js"]
    }
  }
}

If cloned locally:

{
  "mcpServers": {
    "mcp-bitbake": {
      "command": "node",
      "args": ["/absolute/path/to/mcp-bitbake/dist/index.js"]
    }
  }
}

Config file location:

  • macOS: ~/Library/Application Support/Claude/claude_desktop_config.json
  • Windows: %APPDATA%\Claude\claude_desktop_config.json
  • Linux: ~/.config/Claude/claude_desktop_config.json

Restart Claude Desktop after editing.

MCP tools

`find_recipe_files`

Search recursively for .bb/.bbappend files matching a filename pattern:

{ "root_path": "/path/to/poky", "query": "busybox" }

Returns: { ok: true, matches: [{ path, file_type, filename }] }

`scan_layer_recipe_files`

List all .bb/.bbappend files under a layer path:

{ "layer_path": "/path/to/meta-mylayer" }

Returns: { ok: true, files: [{ path, file_type }] }

`parse_recipe_file`

Parse a single .bb or .bbappend file and return all raw variable assignments:

{ "file_path": "/path/to/meta-layer/recipes-core/myapp/myapp_1.0.bb" }

Returns: { ok: true, variables: [{ name, operator, raw_value, line }], warnings?: [...] }

  • Comments and python/shell function blocks are skipped
  • Override syntax (VAR:append, VAR:${PN}, etc.) is warned but not parsed
  • Multi-line values (lines ending with \) are concatenated into raw_value

`get_recipe_var_raw`

Get all assignments for a specific variable in a file:

{ "file_path": "/path/to/recipe.bb", "variable": "SRC_URI" }

Returns: { ok: true, assignments: [{ operator, raw_value, line }] }

Error format

All errors return:

{ "ok": false, "error_code": "...", "message": "..." }

Error codes: FILE_NOT_FOUND, INVALID_PATH, UNSUPPORTED_SYNTAX, INVALID_ARGUMENT

License

MIT

Tools (4)

find_recipe_filesSearch recursively for .bb/.bbappend files matching a filename pattern.
scan_layer_recipe_filesList all .bb/.bbappend files under a layer path.
parse_recipe_fileParse a single .bb or .bbappend file and return all raw variable assignments.
get_recipe_var_rawGet all assignments for a specific variable in a file.

Configuration

claude_desktop_config.json
{"mcpServers": {"mcp-bitbake": {"command": "node", "args": ["./node_modules/mcp-bitbake/dist/index.js"]}}}

Try it

Find all recipe files related to 'busybox' in my poky directory.
List all .bb and .bbappend files located in the meta-mylayer directory.
Parse the recipe file at /path/to/recipe.bb and show me the raw variable assignments.
Get the raw values assigned to the SRC_URI variable in my custom recipe file.

Frequently Asked Questions

What are the key features of BitBake MCP?

Deterministic parsing of .bb and .bbappend files. Extracts raw variable assignments without evaluation. Supports standard BitBake operators like =, :=, ?=, +=, and .=. Returns structured JSON responses for all operations. Recursive file searching and layer scanning capabilities.

What can I use BitBake MCP for?

Auditing Yocto layer configurations for hardcoded paths or variables.. Quickly locating specific recipe files within large build environments.. Extracting metadata from recipes for automated documentation generation.. Debugging variable assignment issues in complex BitBake layers..

How do I install BitBake MCP?

Install BitBake MCP by running: npm install github:pkt-lab/mcp-bitbake

What MCP clients work with BitBake MCP?

BitBake MCP works with any MCP-compatible client including Claude Desktop, Claude Code, Cursor, and other editors with MCP support.

Turn this server into reusable context

Keep BitBake MCP docs, env vars, and workflow notes in Conare so your agent carries them across sessions.

Need the old visual installer? Open Conare IDE.
Open Conare