File Analysis MCP Server
by huangyz0918
This MCP server provides tools for file reading/writing, data analysis (especially CSV), visualization, and PDF reading, accessible via MCP clients like Claude Desktop. It enables users to interact with files and data through natural language prompts.
Last updated: N/A
What is File Analysis MCP Server?
The File Analysis MCP Server is a tool designed to allow MCP clients like Claude Desktop to interact with files and data. It provides functionalities for reading, writing, analyzing, and visualizing data, particularly CSV files, and extracting text from PDF documents.
How to use File Analysis MCP Server?
To use the server, first install the required dependencies (Python 3.10+, mcp[cli], pandas, numpy, matplotlib, PyPDF2). Then, install the server in Claude Desktop using mcp install file_analysis_server.py
. You can then interact with the server through Claude Desktop using natural language prompts to perform file operations, data analysis, and visualization tasks.
Key features of File Analysis MCP Server
Secure file reading and writing
CSV data analysis with statistics
Data visualization (bar, line, scatter, histogram, boxplot)
PDF text extraction
Directory listing and file information retrieval
Use cases of File Analysis MCP Server
Analyzing sales data from a CSV file
Extracting text from a PDF report
Generating a bar chart of monthly profits
Listing files in a specific directory
Creating a summary report of a data file
FAQ from File Analysis MCP Server
How do I specify which directories the server can access?
How do I specify which directories the server can access?
You can set the MCP_FILE_ROOTS
environment variable to a colon-separated list of directories. For example: MCP_FILE_ROOTS="~/Documents:~/Desktop:~/projects/data"
What file types are supported for analysis?
What file types are supported for analysis?
The server primarily focuses on CSV files for data analysis, but it also supports reading and writing generic text files and extracting text from PDF files.
Can I create different types of visualizations?
Can I create different types of visualizations?
Yes, the server supports various plot types including bar charts, line charts, scatter plots, histograms, and boxplots.
How do I install the server in Claude Desktop?
How do I install the server in Claude Desktop?
Use the command mcp install file_analysis_server.py
in your terminal.
What security measures are in place?
What security measures are in place?
The server enforces strict path validation to ensure only files within authorized directories can be accessed, preventing unauthorized file access.