Content
# MCP Control STM32
## MCP Section
### 1. Download Source Code
```bash
git clone https://github.com/ana52070/MCP_Control_STM32.git
cd MCP_Control_STM32
cd mcp-led_oled
```
### 2. Create and Activate Virtual Environment
To avoid dependency conflicts between different projects, it is recommended to use a virtual environment. Create and activate a virtual environment based on your operating system and Python version:
#### For Python 3.3 and above
```bash
python -m venv .venv
```
#### Activate Virtual Environment on Windows
```bash
.venv\Scripts\activate
```
#### Activate Virtual Environment on Linux or macOS
```bash
source .venv/bin/activate
```
### 3. Install Dependencies
Install dependencies directly using `pip`:
```bash
pip install httpx>=0.28.1 mcp>=1.8.0 openai>=1.78.0 python-dotenv>=1.1.0
```
### 4. Modify Code
Change the `.env` file to use your own large language model, with the default set to ollama:
```
BASE_URL=http://localhost:11434/v1/
MODEL=qwen2.5:1.5b
OPENAI_API_KEY=ollama
```
If you are using the DeepSeek model, you need to write the following content in the `.env` file:
```
BASE_URL=https://api.deepseek.com
MODEL=deepseek-chat
OPENAI_API_KEY="DeepSeek API-Key"
```
Modify the serial port configuration in `server-led.py`:
```
# Serial Port Configuration
SERIAL_PORT = "COM1"
BAUDRATE = 115200
TIMEOUT = 1 # seconds
```
### 5. Run MCP Code
```
python client.py server-led.py
```
## STM32 Section
```
cd MCP_Control_STM32
```
Compile and flash using Keil5, with the model being STM32F103C8T6.
Alternatively, you can manually flash using the hex file:
```
MCP_Control_STM32\STM32_Project\Objects\Project.hex
```
Connection Info
You Might Also Like
markitdown
MarkItDown-MCP is a lightweight server for converting URIs to Markdown.
servers
Model Context Protocol Servers
everything-claude-code
Complete Claude Code configuration collection - agents, skills, hooks,...
Time
A Model Context Protocol server for time and timezone conversions.
Filesystem
Node.js MCP Server for filesystem operations with dynamic access control.
Sequential Thinking
A structured MCP server for dynamic problem-solving and reflective thinking.