home / mcp / freertos mcp server

FreeRTOS MCP Server

专为文心快码设计的嵌入式FreeRTOS开发MCP扩展,支持BK7252等芯片的自动项目生成。提供完整的嵌入式开发工作流,从项目创建到代码生成的一站式解决方案。

Installation
Add the following to your MCP client configuration file.

Configuration

View docs
{
  "mcpServers": {
    "aitersmam888-freertos_mcp": {
      "command": "python",
      "args": [
        "-m",
        "src.embedded_freertos_mcp"
      ]
    }
  }
}

You have a FreeRTOS embedded project MCP that automates project creation, knowledge integration, and code generation for popular chips like BK7252, STM32F4, and ESP32. It streamlines the entire development workflow from initial project setup to generated driver code and validation, helping you move faster from concept to working embedded software.

How to use

Use the MCP server through your MCP client to create, configure, and generate embedded FreeRTOS projects. You can command the server to generate a complete project structure for a selected chip, fetch chip specifications from the integrated knowledge base, and automatically generate peripheral drivers and task templates. The server also validates the generated code against FreeRTOS best practices and stores project configurations for ongoing development.

How to install

# Prerequisites
- Python 3.8 or newer
- pip (latest)

# 1. Quick installation
# Clone the project
git clone https://github.com/aitersmam888/freertos_mcp.git
cd embedded_freertos_mcp

# 2. Install Python dependencies
pip install -r requirements.txt

# 3. Optional development dependencies
pip install -r requirements-dev.txt
# Development environment setup (examples)
# Windows: install MSYS2 if needed and add GCC ARM toolchain to PATH
# Linux: install GCC ARM toolchain and Make
# macOS: install via Homebrew

# Windows (MSYS2 toolchain steps shown in the source)
pacman -S mingw-w64-x86_64-arm-none-eabi-gcc
pacman -S make

# Linux (Debian/Ubuntu)
sudo apt-get install gcc-arm-none-eabi make

# macOS
brew install arm-none-eabi-gcc make
# MCP integration with your client
{
  "mcpServers": {
    "embedded_freertos": {
      "command": "python",
      "args": ["-m", "src.embedded_freertos_mcp"]
    }
  }
}

Additional configuration and notes

After you install, you can verify the environment and the MCP server setup with a few checks that confirm module loading, knowledge base loading, and the project generator readiness.

You will typically run the MCP server as a local process and connect via your MCP client using the stdio configuration shown above. If you need to adjust environment specifics, you can extend the configuration to pass environment variables to the Python process as needed.

Troubleshooting and logs

If you encounter import errors or missing dependencies, ensure you are using a compatible Python version and have installed the requirements. Review any error messages and verify that the knowledge base and project templates are accessible in your working directory.

Common issues include missing toolchains for ARM targets, misconfigured PATH variables, and missing knowledge base data. Revisit the installation steps and confirm all required dependencies are installed and accessible.

API and tools overview

The server exposes components for chip analysis, knowledge loading, and project generation. Core tools include modules that analyze chip capabilities, load chip and SDK data, and generate complete FreeRTOS-based project structures with peripheral drivers and task templates.

Security and access considerations

Keep your dependencies up to date and manage access to your knowledge base and generated project artifacts. Use secure environments for storing project configurations and any sensitive credentials used by your peripheral drivers or network interfaces.

Available tools

ChipAnalysis

Models chip capabilities by family, core, frequency, flash/RAM sizes, and peripherals to guide project generation.

KnowledgeLoader

Loads chip configurations, datasheets, SDK docs, and requirements from the integrated knowledge base.

ProjectGenerator

Generates a complete FreeRTOS project structure, including templates for sources, headers, drivers, and FreeRTOS configuration.

CodeValidator

Automatically validates the generated code against FreeRTOS best practices and project rules.

MemoryManager

Provides memory analysis, stack usage evaluation, and optimization guidance for generated projects.