SuperAPIAI Directory

telinksdk-builder-mcp

github.com · AI developer platforms

Build Telink and other embedded SDKs (Eclipse headless, Make or generic) via natural language, with automatic build pattern detection.

Open website Alternatives
PricingOpen source开源项目(可免费自部署)
PlatformsmacOS · Windows · Linux · API

About this tool

Purpose

telinksdk-builder-mcp is a general-purpose, SDK-agnostic build orchestration tool whose goal is to let AI coding assistants (Trae / Claude Desktop / Cursor / Cline, etc.) invoke the build scripts of any SDK repository via natural language. It is packaged as a TraeCLI plugin (including skill + slash command + MCP server), and its MCP server is a standard protocol, so any client that supports MCP can connect directly. It can also be used purely from the command line, without relying on any AI tool.

Main capabilities

  • Provides four tools via MCP: build_info, build_presets, build_run, build_list.
  • Place a builder.json at the root of any SDK repository to declare the build script path, parameter list, presets, and artifact directory.
  • trae_build_mcp.py is launched by Trae via stdio and automatically discovers the builder.json of the current workspace.
  • Say the preset name in a Trae conversation, the agent calls the build_run tool, the runner generates the command and executes the build script, and the artifacts are scanned and returned.
  • When switching repositories, as long as the new repository comes with its own builder.json, the same trae_builder toolchain is reused directly without modification.
  • /build-init automatically recognizes common build patterns and generates builder.json.
  • Supports the complete loop of compile -> flash -> view serial port (string together the embedded development workflow with a single sentence in a Trae conversation).

Usage

Using in Trae

Open any Telink SDK repository in Trae, and in the conversation simply say:

  • /build-init: automatically detect and generate the configuration.
  • /build <preset name> (e.g. b80_dongle_flash): real compilation, artifacts returned.
  • /build info: view the configuration.

In addition to MCP, a /build custom prompt command is also provided (it uses the Bash tool to call the runner and does not depend on MCP). The command file is located at ~/.trae/commands/build.md(user-level). Open Trae at the root of any repository containing builder.json, enter /build, and it will automatically use ${workspaceFolder} to locate the current repository, call trae_build_runner.py, and organize the results.

Register the MCP server in ~/.trae/trae_cli.yaml (user-level) or the project root .mcp.json (project-level). After registration, use trae-cli doctor to check the connection status, and in interactive mode use /mcp to view details and the tool list.

Using directly from the command line

It can be used purely from the command line, without relying on any AI client. It has been verified that initialize / tools/list / build_info / build_presets / build_run(dry-run) / build_list / shutdown all return normally.

Connecting to non-Trae clients (Claude Desktop / Cursor / Cline / command line)

The MCP server in this repository (trae_build_mcp.py) is a standard MCP stdio protocol and does not depend on Trae. Any client that supports MCP can connect and likewise obtain the four tools build_info / build_presets / build_run / build_list.

  • First clone the repository (or download it), and note the path (use <BUILDER> to refer to the telinkbuildskill directory after cloning).
  • Claude Desktop configuration path: macOS is ~/Library/Application Support/Claude/claude_desktop_config.json; Windows is %APPDATA%\Claude\claude_desktop_config.json. Restart Claude Desktop, and tools such as build_info will appear in the dialog box.
  • Cursor: create .cursor/mcp.json at the project root.
  • Cline: in its MCP settings (usually ~/.cline/mcp_settings.json or extension settings) to add configuration.
  • stdio startup command: python <BUILDER>/trae_build_mcp.py, with no arguments. The server automatically discovers the builder.json in the current workspace.
  • Note: Non-Trae clients do not have the /build, /build-init commands and build skill (those are Trae-specific formats), but the MCP tools are fully available. To generate builder.json for an SDK repository for the first time, use the command-line method.

Manually writing builder.json

You can also write builder.json by hand; refer to trae_builder_schema.json or the existing tc_ble_lite_sdk-1.2.2_allinone/robin_builder.json. See the repository for a minimal example.

Onboarding a legacy repository

When a legacy repository does not have builder.json, use /build-init to scan and generate it in one step. The command file is at ~/.trae/commands/build-init.md, and it can also be used directly from the command line. After generation, you can use /build info to view it and /build <preset name> to compile. If it is a fallback template, follow the prompts to edit builder.json to complete build.script.path.

Applicable scenarios

  • Compile Telink SDK firmware in Trae via natural language.
  • Connect any embedded SDK repository to an AI programming assistant and reuse the same toolchain.
  • Call the build tools in MCP clients such as Claude Desktop, Cursor, and Cline.
  • Orchestrate SDK builds in a pure command-line environment.
  • Complete an integrated embedded development workflow of compiling, flashing, and serial capture.

Limitations and dependencies

  • The build functionality has zero third-party dependencies (pure Python stdlib).
  • Serial capture optionally depends on pyserial (pip install pyserial); when it is not installed, serial_list / serial_capture will give a friendly prompt.
  • Eclipse headless compilation requires the corresponding platform's Telink IoT Studio / Eclipse CDT.
  • Only Python 3.8+ is required.
  • The runner automatically selects the interpreter: .py → python/python3, .sh → bash, .ps1 → powershell/pwsh, .bat → cmd.exe.
  • Cross-platform support (Windows / Linux / macOS). Type A/B builds use the repository's bundled .bat on Windows (preserving Telink multi-stage orchestration); on Linux/macOS, the generator automatically switches the build script to the cross-platform eclipse_headless_build.py and removes the .exe from the IDE launcher name.
  • Regarding MCP tool visibility: the stdio MCP server is loaded asynchronously; in the init event at session startup, mcp_servers may be empty (the handshake has not yet completed at that point), but usually the handshake completes within 1 second and the tools can then be invoked by the agent. If the first-round prompt occasionally fails when calling MCP tools, retry or wait a moment.
  • Windows terminal note: using trae-cli -p "/build ..." in cmd.exe with space-separated arguments may be truncated; it is recommended to enter /build ... directly in the VSCode integrated terminal (PowerShell), or to quote the whole thing when using trae-cli -p and run it under PowerShell.
  • This toolchain has been tested on tc_ble_lite_sdk-1.2.2_allinone, where both build_info and build_run return normally.

Other

The repository provides trae_builder_schema.json for reference when writing builder.json by hand. Issues / PRs are welcome. It is recommended to add Topics in the GitHub repository Settings: mcp mcp-server trae-plugin embedded firmware eclipse-cdt telink sdk-builder cross-platform ai-coding.

Up/Down to navigate · Enter to open · ESC to closeBrowse all tools