mdfmcp
Integrates with Codeium's Windsurf IDE to enable AI-assisted analysis of automotive measurement data files within the development environment.
Click on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@mdfmcpOpen data.mf4 and list all channels."
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
MDF MCP Server
A Model Context Protocol (MCP) server for analyzing ASAM MDF (Measurement Data Format) files. Enables AI assistants to access and analyze automotive and industrial measurement data.
๐ Quick Start
Using uvx (Recommended)
# Install uv (if not already installed)
curl -LsSf https://astral.sh/uv/install.sh | sh
# Run the server directly
uvx mcp-server-mdfLocal Development
# Clone and setup
git clone https://github.com/Shanko-26/mdfmcp
cd mdfmcp
# Install in virtual environment
python -m venv venv
source venv/bin/activate # On Windows: venv\Scripts\activate
pip install -e .
# Run the server
mcp-server-mdfRelated MCP server: tb-query
๐ Features
MDF File Support: Versions 2.x, 3.x, and 4.x
AI-Native Interface: Designed for LLM integration
Data Analysis: Statistics, plotting, signal processing
Format Export: CSV, HDF5, Parquet, MATLAB
Session Management: Multi-file support
High Performance: Efficient large file handling
๐ง Configuration
Important: This MCP server requires direct file system access to read MDF files. It works best with IDEs that support local file operations.
Compatible IDEs
For VS Code with Continue.dev
Add to your MCP configuration:
{
"mcpServers": {
"mdf": {
"command": "uvx",
"args": ["mcp-server-mdf@latest"]
}
}
}For Cursor IDE
Add to ~/.cursor/mcp.json:
{
"mcpServers": {
"mdf": {
"command": "uvx",
"args": ["mcp-server-mdf@latest"]
}
}
}For Windsurf/Codeium
Follow your IDE's MCP configuration guide with the same uvx command.
Troubleshooting uvx Path Issues
If you get "command not found" errors, find your uvx path:
which uvx # On macOS/Linux
where uvx # On WindowsThen use the full path in your configuration:
{
"mcpServers": {
"mdf": {
"command": "/Users/username/.local/bin/uvx",
"args": ["mcp-server-mdf"]
}
}
}๐ File Organization
Smart Workspace Search: The server automatically finds MDF files in your project:
your-project/
โโโ data.mf4 # โ
Found by filename
โโโ data/
โ โโโ test.mf4 # โ
Found in data/ folder
โโโ measurements/
โ โโโ run1.mf4 # โ
Found in measurements/ folder
โโโ test_data/
โโโ examples/
โโโ samples/Usage Examples:
"data.mf4"โ Searches workspace automatically"./data/test.mf4"โ Relative path from current directory"/absolute/path/file.mf4"โ Full absolute pathCase insensitive:
"DATA.MF4"finds"data.mf4"
๐ Staying Current
Always use latest version by adding @latest to your IDE configuration:
{
"mcpServers": {
"mdf": {
"command": "uvx",
"args": ["mcp-server-mdf@latest"]
}
}
}Check version: uvx mcp-server-mdf@latest --version
๐ Usage Examples
Open and Analyze MDF Files
User: Open the measurement file at /data/test_drive.mf4
Assistant: I'll open that MDF file for you.
[Opens file]
Successfully opened test_drive.mf4:
- Session ID: mdf_a3b2c1d4
- Version: 4.10
- Channels: 847
- Duration: 1823.4 secondsList and Search Channels
User: What temperature channels are available?
Assistant: Let me search for temperature-related channels.
Found 23 temperature channels:
- Engine_Temp (ยฐC) - Engine coolant temperature
- Oil_Temp (ยฐC) - Engine oil temperature
- Ambient_Temp (ยฐC) - Outside air temperatureAnalyze and Plot Signals
User: Show me the engine speed statistics and plot it
Assistant: I'll analyze the engine speed signal.
Engine Speed Analysis:
- Mean: 2,847 RPM
- Max: 6,234 RPM
- Std Dev: 1,123 RPM
[Shows time-series plot of engine speed]๐ ๏ธ Available Tools
Session Management
open_mdf- Open an MDF fileclose_mdf- Close a sessionlist_sessions- Show active sessionsget_file_info- Get file metadata
Data Access
list_channels- List available channelsmdf_get- Extract single channel datamdf_select- Extract multiple channelsmdf_get_master- Get time channel data
Analysis
calculate_statistics- Compute signal statisticsplot_signals- Create visualizationsmdf_to_dataframe- Convert to pandas DataFrame
Data Manipulation
mdf_cut- Extract time slicemdf_filter- Filter specific channelsmdf_resample- Change sampling rate
Export
mdf_export- Export to various formatsmdf_convert- Convert between MDF versionsmdf_save- Save modified file
๐ณ Docker Deployment (Alternative)
Build Image
docker build -t mcp-server-mdf .Run Container
# Basic run
docker run -it --rm mcp-server-mdf
# With volume mount for data
docker run -it --rm -v /path/to/mdf/files:/data mcp-server-mdf
# With custom environment
docker run -it --rm -e MAX_SESSIONS=20 mcp-server-mdfMCP Configuration for Docker
{
"mcpServers": {
"mdf": {
"command": "docker",
"args": ["run", "--rm", "-i", "-v", "/path/to/data:/data", "mcp-server-mdf"]
}
}
}๐งช Testing
# Run tests
pytest tests/
# Test server manually
python tests/manual_test.py๐ Project Structure
mdfmcp/
โโโ src/mdfmcp/
โ โโโ __init__.py
โ โโโ server.py # Main MCP server
โโโ tests/
โ โโโ conftest.py
โ โโโ manual_test.py
โ โโโ test_server.py
โโโ examples/
โ โโโ basic_usage.py
โ โโโ test_data_generator.py
โโโ Dockerfile
โโโ requirements.txt
โโโ pyproject.toml
โโโ README.md๐ง Development
Setup Development Environment
# Create virtual environment
python -m venv venv
source venv/bin/activate # On Windows: venv\Scripts\activate
# Install dependencies
pip install -r requirements.txt
# Install in development mode
pip install -e .Code Quality
# Format code
black src/
# Lint
ruff src/
# Type checking
mypy src/๐จ Troubleshooting
Common Issues
Memory errors with large files
Use
memory="low"when opening filesReduce concurrent sessions
Cannot find channels
Channel names are case-sensitive
Use regex patterns for flexible searching
Docker build fails
Ensure Docker is running
Check Dockerfile syntax
๐ Acknowledgments
Built on asammdf by Daniel Hrisca (LGPL v3+)
Uses the Model Context Protocol by Anthropic
Matplotlib for plotting capabilities
Pandas and NumPy for data processing
๐ License
This project is licensed under the MIT License - see the LICENSE file for details.
Dependencies: This project uses asammdf which is licensed under LGPL v3+. The asammdf library remains a separate component and is not modified by this project.
This server cannot be installed
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Latest Blog Posts
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/Shanko-26/mdfmcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server