Get the FREE Ultimate OpenClaw Setup Guide →

mcp -example

An MCP server that reads a CSV file.

Installation
Run this command in your terminal to add the MCP server to Claude Code.
Run in terminal:
Command
claude mcp add --transport stdio hassenamri005-mcp-server-example python /absolute/path/to/mix_server.py \
  --env PYTHONPATH="/absolute/path/to/mcp-server" \
  --env VIRTUAL_ENV="/absolute/path/to/venv"

How to use

This MCP server runs a lightweight Python-based MCP service named mix_server. It exposes tools for reading local data formats (CSV and Parquet) and makes them accessible to Claude for Desktop through the MCP protocol. After starting the server, Claude can send natural language queries like asking to summarize a dataset or extract specific statistics from your local data files, and the server routes these requests to the csv_reader and parquet_reader tools registered in mix_server.

Once configured in Claude, you’ll interact with the server by pointing Claude to the mix_server entry (as defined in your mcp configuration). Claude will then leverage the registered tools to load local data, perform operations such as summaries, filters, or column-based calculations, and return results directly in the chat interface.

How to install

Prerequisites:

  • Python 3.8+ installed on the host machine
  • Access to install Python dependencies (pip or uv as described below)

Step 1: Clone the repository

Step 2: Set up the Python environment (recommended via uv)

  • uv venv
  • source .venv/bin/activate # On Windows: .venv\Scripts\activate
  • uv pip install -r requirements.txt
  • uv pip install mcp[cli] pandas pyarrow

If you’re not using uv, you can create a virtual environment with venv and install dependencies:

  • python -m venv .venv
  • source .venv/bin/activate # or .\venv\Scripts\activate on Windows
  • pip install -r requirements.txt
  • pip install mcp[cli] pandas pyarrow

Step 3: Run the MCP server

  • python mix_server.py # or with uv: uv run path/to/mix_server.py

Step 4: Configure Claude integration

  • In Claude for Desktop, add an MCP server entry pointing to your local mix_server as described in the README configuration section.

Additional notes

Tips and common issues:

  • Ensure the paths in your mcp_config match your actual virtual environment and mix_server.py location.
  • If using a virtual environment, activate it before starting the server so the correct Python and dependencies are used.
  • pandas and pyarrow are required for CSV and Parquet readers; verify file permissions and file paths when loading data.
  • If Claude cannot reach the server, check firewall rules or port configurations if you customize networking; the default MCP setup here uses local execution, so ensure the process is running.
  • Keep dependencies in sync with your Python version to avoid import errors when loading data formats.

Related MCP Servers

Sponsor this space

Reach thousands of developers