Skip to main content
Glama
ETK-MCP

ETK-MCP

by wilhellmina

ETK-MCP

MCP server that gives Claude (or any MCP client) RealOEM-style lookups against a local copy of BMW's ETK parts catalog, so nothing has to be scraped from RealOEM.

You bring your own ETK Lokal installation (copy its BMWgroup folder into this directory); the catalog is exported once into SQLite (data/etk.sqlite, ~3.3 GB) plus the diagram drawings (data/images/, ~1.4 GB). After that the server only reads those files; ETK's Transbase database server is not needed.

Developed against ETK Lokal 3.2.20 with catalog data 01/2020 (Transbase 6.1). Other versions may need changes to table or column names.

Disclaimer. This project is not affiliated with, endorsed by, or connected to BMW AG. It contains no ETK software, catalog data, images or credentials — only code that reads an ETK installation you already have. BMW, MINI, Rolls-Royce and ETK are trademarks of BMW AG. Make sure your use of your ETK copy complies with the terms under which you obtained it, and do not publish the exported data.

Tools

tool

what it does

decode_vin

VIN (17 chars or last 7) → model, mospid, type code, production month, plant

find_models / list_series

find a model's mospid by series / name / type code / engine / body / market

list_groups

main groups of a model, or subgroups + diagrams (btnr) of one main group

get_diagram

parts list of a diagram: callout no., part number, name, qty for the model, dates, conditions, notes

get_diagram_image

the exploded-view drawing (JPG, or TIFF converted to PNG)

part_info

name, weight, orderable/discontinued, supersessions, kit contents, other numbers, usage summary

where_used

models and diagrams that use a part, with callout no. and qty

search_parts

find parts by name (any of the 19 languages), optionally within one model

fluid_capacities

oil / gearbox / axle / coolant / brake fluid capacities

sql_query / describe_schema

read-only SQL over the raw ETK tables

Texts come in 19 languages (lang: ja, en, de, enUS, zh, zhTW, ...). The default is en; set ETK_LANG=ja in the server's environment to change it.

Related MCP server: lego-catalog

Setup

Requirements: Windows (Transbase 6.1 is a Win32 build), Java 11+ (java on PATH), uv, and an ETK Lokal install copied to BMWgroup\ETKLokal in this folder (or set ETK_ROOT). The folder path must not contain spaces.

uv sync
python tools\relocate_transbase.py   # point the copied ETK configs at this folder (backups: *.orig)
uv run etk-build                     # ~15 min: tables -> data\etk.sqlite, drawings -> data\images
uv run python tools\smoke_test.py    # optional: run every query once
claude mcp add etk --scope user -- uv run --directory C:\path\to\ETK-MCP etk-mcp

etk-build starts Transbase itself (tbmux32.exe noservice, port 2024) when nothing is listening and stops it afterwards. To keep it running for ad-hoc queries, use tools\start_transbase.ps1 and tools\tbtool.ps1 query "SELECT ...". The DB password is read from ETK's own classes at runtime and is not stored in this repo.

etk-build is resumable (finished tables are skipped). --tables w_teil ... reloads specific tables, --no-images / --images-only split the two phases.

Layout

exporter/TbTool.java        JDBC bridge to Transbase: tables | schema | query | stream | images
src/etk_mcp/build_db.py     Transbase -> SQLite (+ indexes, + image export)
src/etk_mcp/catalog.py      all queries (usable without MCP)
src/etk_mcp/server.py       MCP tool definitions (stdio)
tools/                      relocation, Transbase launcher, smoke test, MCP client test

To see every ETK table with its row count, primary key and columns, start Transbase (tools\start_transbase.ps1) and run tools\tbtool.ps1 schema 'w_%' > docs\etk_publ_schema.tsv (git-ignored, since it describes BMW's database).

Notes on the data

  • mospid = model id (series + model + body + market). One mospid has several 4-char type codes (VIN positions 4–7), typically LHD/RHD variants.

  • Diagram numbers (btnr) look like 11_2166; the first two digits are the main group.

  • Per-model rows and quantities come from w_btzeilen_verbauung; conditions (if L807 National version Japan) from w_bte_bed*; production-date limits from the diagram rows (from / up to).

  • BMWgroup/ and data/ hold BMW's catalog data and are git-ignored; keep them private.

Available Tools

12 tools
decode_vinA
Read-only

Identify a vehicle from its VIN: model, mospid, type code, production month and plant.

Inputs: vin (required), lang.

describe_schemaB
Read-only

Catalog data version, table list, or one table's columns/primary key/indexes.

Inputs: table.

find_modelsA
Read-only

Find models and their mospid (model id used by the other tools).

Inputs: lang, limit, query, series.

fluid_capacitiesC
Read-only

Fluid capacities (engine oil, gearbox, rear axle, coolant, brake fluid) by model.

Inputs: series (required), lang, query.

get_diagramB
Read-only

Parts list of one diagram: callout no., part number, description, quantity, production dates, conditions, notes.

Inputs: btnr (required), lang, mospid.

get_diagram_imageA
Read-only

The exploded-view drawing of a diagram; callout numbers on it match the 'no' column of get_diagram.

Inputs: btnr (required).

list_groupsA
Read-only

Browse a model's catalog: main groups, or the subgroups and diagrams of one main group.

Inputs: mospid (required), hg, lang.

list_seriesB
Read-only

List vehicle series (Baureihen) in the catalog with their names and number of models.

Inputs: lang, query, product.

part_infoB
Read-only

Details of one part: name, weight, orderable/discontinued, supersessions, kit contents, other numbers, usage summary.

Inputs: part_number (required), lang.

search_partsA
Read-only

Find parts by name. With mospid, results include diagram, callout no. and quantity for that model.

Inputs: text (required), lang, limit, mospid, +1 more.

sql_queryA
Read-only

Run read-only SQL against the catalog for anything the other tools don't cover. Texts: JOIN w_ben_gk ON ben_textcode = _textcode AND ben_iso = 'en' AND ben_regiso = ''. Use describe_schema first; big tables: w_btzeilen_verbauung (59M rows, key mospid, btnr, pos), w_ben_gk (2.8M), w_komm (3.3M), w_btzeilen (3M), w_bildtaf_suche (2.4M).

Inputs: query (required), max_rows.

where_usedB
Read-only

Which models and diagrams use a part, with callout no. and quantity.

Inputs: part_number (required), lang, limit, series.

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    TDQS

    A3.7/5.0

    Scored across 12 tools

    Disambiguation5/5

    Each tool targets a distinct resource+action: series listing, model lookup, VIN decode, catalog browsing, diagram content, diagram image, part details, usage lookup, name search, fluid capacities, schema introspection, and ad-hoc SQL. The nearest overlaps (find_models vs decode_vin, search_parts vs part_info, list_groups vs get_diagram) are clearly differentiated by the descriptions' stated inputs and outputs. An agent should reliably pick the right tool.

    Naming Consistency4/5

    Names are uniformly snake_case and mostly follow verb_noun (list_series, find_models, decode_vin, get_diagram, search_parts, describe_schema). A few deviate to noun phrases (part_info, fluid_capacities, sql_query) and get_diagram_image nests a noun, but the overall convention is readable and predictable.

    Tool Count5/5

    Twelve tools is well within the sweet spot and each maps to a real step in the parts-catalog workflow (identify vehicle → browse groups → diagram → part lookup → usage). The two generic SQL tools act as a deliberate escape hatch rather than bloat.

    Completeness4/5

    The surface covers the full lifecycle from series/VIN identification through diagrams, part details, supersessions, and where-used, plus a SQL fallback for anything missed. Minor gaps remain—no dedicated part-number-first lookup distinct from part_info, no explicit diagram search by name, and no structured filtering by production date outside of SQL—but these are workable.

    Related MCP Connectors

    Related MCP Servers

    • A
      license
      Not graded
      quality
      D
      maintenance
      Enables AI agents to query a local SQLite catalog of installed macOS GUI apps and CLI tools, searching by capability, retrieving tool details, and checking machine statistics over MCP.
      MIT
    • A
      license
      Not graded
      quality
      C
      maintenance
      Read-only remote MCP server that exposes a Rebrickable LEGO catalog snapshot, enabling agents to search parts, inspect a part's colors and element records, list the color palette, retrieve a set's part inventory, resolve element IDs, and report snapshot freshness. This lets agents verify real part numbers and colors instead of inventing them.
      MIT
    • A
      license
      Not graded
      quality
      D
      maintenance
      Enables MCP clients like Claude, Cursor, and Windsurf to search a local document knowledge base using four-layer retrieval fusion (vector similarity, BM25 keywords, knowledge graph traversal, and metadata filtering) with cross-encoder reranking. Also lets agents index documents, add single documents, list indexed sources, and run health diagnostics, with models kept warm between queries so no GPU, PyTorch, or API keys are needed.
      42 PyPI
      12
      MIT
    • A
      license
      Not graded
      quality
      C
      maintenance
      Offline MCP server that exposes a searchable knowledge base of Apache Camel components, EIPs, languages, data formats, options, and documentation, built from the official camel-catalog jar into a SQLite FTS5 index. It enables full-text search, browsing, and detailed metadata/doc retrieval so AI models can answer Camel integration questions without a running Camel context.
      Apache 2.0