关于 🧠 MCP Server: Local AI Tooling with Python
这是一个读取本地 CSV 和 Parquet 文件的 Python MCP 服务,面向 Claude 等 AI 助手,可通过自然语言查询表格数据,并采用便于扩展工具的模块化结构。
主要功能
- 01读取 CSV 文件
- 02读取 Parquet 文件
- 03模块化工具结构
适用场景
- 01通过 Claude 汇总本地数据集
- 02从表格文件中检索特定信息
MCP 相关
该服务注册工具,使 MCP 客户端能够访问本地 CSV 和 Parquet 数据。README 介绍了与 Claude for Desktop 的集成。
配置
本地服务的配置在各客户端中通用,复制后粘贴到客户端的 MCP 配置文件即可。
暂未收录安装方式
我们还没有获取到这个服务的安装包或远程地址,请按项目 README 中的说明安装。
工具
还没有获取到工具列表
本地服务需要在你的电脑上运行后才能读取工具,维护者暂未提供工具列表。
详细介绍
🧠 MCP 服务:使用 Python 构建本地 AI 工具
本项目使用 Python 搭建轻量级 Model Context Protocol(MCP)服务,让 Claude 等 AI 助手能够与 CSV 和 Parquet 等本地数据文件交互。与 Claude for Desktop 集成后,你可以通过自然语言查询执行汇总数据集或检索特定信息等任务。
🚀 功能
本地 MCP 服务(mix_server):实现 Claude 与本地工具之间的通信。
CSV 和 Parquet 读取器:用于加载和处理数据分析中常见表格数据格式的工具。
模块化结构:代码库简洁,便于扩展更多工具。
与 Claude 无缝集成:直接连接 Claude for Desktop,让你可以通过自然语言与数据交互。
🛠️ 安装
1. 克隆代码库
git clone https://github.com/yourusername/mcp-server.git
cd mcp-server
``
### 2. Set Up the Environment Using `uv
[uv](https://github.com/astral-sh/uv) is a fast Python package and project manager written in Rut It serves as a drop-in replacement for tools like `pip`, `pip-tools`, and `virtualenv`, offering significant speed improvements and a unified interfae.
#### Install `uv
You can install `uv` using one of the following methos:
- **Using `curl` (macOS and Linux):**
```bash
curl -LsSf https://astral.sh/uv/install.sh | sh
``
- **Using `pip`:**
```bash
pip install uv
``
- **Using `pipx`:**
```bash
pipx install uv
``
For more installation options and details, refer to the [official uv documentation](https://docs.astral.sh/uv).
#### Create a Virtual Environment and Install Dependencie
```bash
uv venv
source .venv/bin/activate # On Windows: .venv\Scripts\activate
uv pip install mcp[cli] pandas pyarrow
``
This will create a virtual environment and install the necessary dependencies using `u`.
## 📁 Project Structue
```bash
mcp-server/
├── tools/
│ ├── csv_reader.py
│ └── parquet_reader.py
├── mix_server.py
├── README.md
└── requirements.txt
``
- `tools/`: Contains individual tool scripts for data processng.
- `mix_server.py`: Initializes and runs the MCP server, registering available tols.
## ⚙️ Configuration for Claude Desktp
To integrate with Claude for Desktop, add the following configuration to your Claude settigs:
```json
{
"mcpServers": {
"mix_server": {
"command": "/absolute/path/to/.venv/bin/python",
"args": ["/absolute/path/to/mix_server.py"]
}
}
}
``
Ensure that the paths to your Python interpreter and `mix_server.py` are corrct.
## 🧪 Usge
Once set up, you can interact with your data through Claude using natural language prompts. For exaple:
- "Summarize the contents of `data.cv`."
- "How many rows and columns are in `dataset.parqut`?
Claude will utilize the registered tools to process your request and provide the desired informaion.
## 📚 Refereces
This project is based on the tutorial: [Building a Basic MCP Server with Python](https://medium.com/data-engineering-with-dremio/building-a-basic-mcp-server-with-python-4c34c4101ed).
## 📝 Liense
This project is licensed under the [MIT License](LIENSE).
评论
支持 Markdown
一个开放协议,规定了 AI 应用如何以统一方式连接外部工具与数据源。客户端负责与模型对话,MCP 服务负责提供工具、资源和提示模板,两者通过标准消息通信,同一个服务可以被不同客户端复用。