Cover image
Análisis de archivos-MCP-server
Public

Análisis de archivos-MCP-server

Try Now
2025-03-11

3 years

Works with Finder

1

Github Watches

1

Github Forks

3

Github Stars

File Analysis MCP Server

This Model Context Protocol (MCP) server provides tools for reading and writing files, analyzing data (especially CSV files), generating visualizations, and reading PDF files - all accessible to any MCP client like Claude Desktop.

Features

File Operations

  • Read and write text files securely
  • List files in directories matching patterns
  • Get detailed file information (size, creation time, etc.)
  • Extract text content from PDF files

Data Analysis

  • Read and sample CSV files
  • Analyze CSV data with detailed statistics
  • Visualize data with various plot types (bar, line, scatter, histogram, boxplot)

Included Prompts

  • Analyze Data File - Comprehensive data analysis
  • Data Cleaning Steps - Identifying and fixing data issues
  • Generate Summary Report - Executive summary for stakeholders
  • Exploratory Data Analysis - Detailed EDA workflow

Installation

Prerequisites

  • Python 3.10 or higher
  • Claude Desktop or another MCP client

Setup

  1. Install dependencies:
pip install "mcp[cli]" pandas numpy matplotlib PyPDF2
  1. Set up safe directories (optional):
# Default directories are ~/Documents and ~/Downloads
# To customize, set this environment variable:
export MCP_FILE_ROOTS="~/Documents:~/Desktop:~/Downloads"
  1. Install in Claude Desktop:
mcp install file_analysis_server.py

Usage with Claude Desktop

Once installed, you can ask Claude questions like:

  • "Can you list the files in my Documents folder?"
  • "Read the content of ~/Documents/example.txt for me"
  • "Extract text from my ~/Documents/report.pdf file"
  • "Read page 5 of my PDF document"
  • "Analyze the data in ~/Downloads/sample.csv"
  • "Create a bar chart of the 'Sales' column from my CSV file"
  • "Write a summary report of my quarterly_sales.csv file"

Security

The server enforces strict path validation to ensure only files within authorized directories can be accessed. By default, these are limited to ~/Documents and ~/Downloads.

Configuration

You can adjust the allowed directories by setting the MCP_FILE_ROOTS environment variable. Multiple directories should be separated by colons, for example:

mcp install file_analysis_server.py -v MCP_FILE_ROOTS="~/Documents:~/Desktop:~/projects/data"

Development

For development and testing:

mcp dev file_analysis_server.py

This will start the server with the MCP Inspector interface for interactive testing.

Examples

Reading a file

Could you read the content of ~/Documents/notes.txt?

Reading a PDF file

Can you extract the text from ~/Documents/report.pdf?

Reading specific pages from a PDF

Please read pages 3 and 5 from ~/Downloads/manual.pdf

Analyzing CSV data

I have a CSV file at ~/Downloads/sales_data.csv. Could you analyze it and tell me about the 'Revenue' column?

Creating a visualization

Using my ~/Documents/monthly_data.csv file, can you create a bar chart showing 'Month' vs 'Profit'?

Using prompts

Can you run an exploratory data analysis on ~/Downloads/customer_data.csv?

相关推荐

  • NiKole Maxwell
  • I craft unique cereal names, stories, and ridiculously cute Cereal Baby images.

  • Joshua Armstrong
  • Confidential guide on numerology and astrology, based of GG33 Public information

  • https://suefel.com
  • Latest advice and best practices for custom GPT development.

  • Callycode Limited
  • A geek-themed horoscope generator blending Bitcoin prices, tech jargon, and astrological whimsy.

  • Emmet Halm
  • Converts Figma frames into front-end code for various mobile frameworks.

  • Beniyam Berhanu
  • Therapist adept at identifying core issues and offering practical advice with images.

  • ANGEL LEON
  • A world class elite tech co-founder entrepreneur, expert in software development, entrepreneurship, marketing, coaching style leadership and aligned with ambition for excellence, global market penetration and worldy perspectives.

  • Elijah Ng Shi Yi
  • Advanced software engineer GPT that excels through nailing the basics.

  • apappascs
  • Descubra la colección más completa y actualizada de servidores MCP en el mercado. Este repositorio sirve como un centro centralizado, que ofrece un extenso catálogo de servidores MCP de código abierto y propietarios, completos con características, enlaces de documentación y colaboradores.

  • ShrimpingIt
  • Manipulación basada en Micrypthon I2C del expansor GPIO de la serie MCP, derivada de AdaFruit_MCP230xx

  • OffchainLabs
  • Implementación de la prueba de estaca Ethereum

  • huahuayu
  • Una puerta de enlace de API unificada para integrar múltiples API de explorador de blockchain similar a Esterscan con soporte de protocolo de contexto modelo (MCP) para asistentes de IA.

  • deemkeen
  • Controle su MBOT2 con un combo de potencia: MQTT+MCP+LLM

  • zhaoyunxing92
  • 本项目是一个钉钉 MCP (Protocolo del conector de mensajes )服务 , 提供了与钉钉企业应用交互的 API 接口。项目基于 Go 语言开发 支持员工信息查询和消息发送等功能。 支持员工信息查询和消息发送等功能。

  • ravitemer
  • Un poderoso complemento Neovim para administrar servidores MCP (protocolo de contexto del modelo)

    Reviews

    5 (1)
    Avatar
    user_BHKiM7P8
    2025-04-16

    I have been using the file-analysis-mcp-server for a while, and it has significantly improved my file handling and analysis tasks. The robust functionalities and smooth performance make it an indispensable tool for any serious data analyst. Kudos to huangyz0918 for creating such a reliable server application! Highly recommend!