# ESP-IDF FastMCP Server - Project Context
## Library documents
- FastMCP: https://gofastmcp.com/llms-full.txt
## Project Overview
This directory contains a FastMCP server implementation designed to assist with ESP-IDF (Espressif IoT Development Framework) development. It provides tools to interact with ESP-IDF functionalities via an HTTP interface. The main server implementation is in `app.py`, with a simpler test version in `simple_server.py`.
Key features include:
- Getting ESP-IDF version information.
- Listing supported ESP target chips.
- A basic "Hello World" tool example.
## Design documents
### esp-idf install script
@./docs/install-script.md
### MCP Server
@./docs/mcp.md
## Project structures
1. **`app.py`**: The main FastMCP server implementation with tools for ESP-IDF.
2. **`simple_server.py`**: A minimal FastMCP server for testing.
3. **`fastmcp.json`**: Configuration file defining how to run the server using the `fastmcp` CLI.
4. **`requirements.txt`**: Specifies the Python dependencies (`fastmcp`).
5. **`README.md`**: Project documentation with installation and usage instructions.
6. **`docs/`**: Directory for design documents.
## Usage and Commands
### Installation
1. Ensure Python 3.8+ is installed.
2. Install dependencies:
```bash
pip install fastmcp
```
### Running the Server
There are three main ways to start the server:
1. **Direct Python execution:**
```bash
python app.py
```
Starts the server on `http://127.0.0.1:8080`.
2. **Using the `fastmcp` CLI with the Python file:**
```bash
fastmcp run app.py
```
3. **Using the `fastmcp` CLI with the configuration file (Recommended):**
```bash
fastmcp run fastmcp.json
```
This uses the settings defined in `fastmcp.json`.
### Connecting to the Server
Once running, clients can connect to `http://127.0.0.1:8080/mcp` to access the provided tools.