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., "@File Analysis MCP ServerAnalyze the word count and character frequency for /Users/admin/docs/report.txt"
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.
This server is certified by MCP Hub and listed as a trusted MCP server.
File Analysis MCP Server
A custom-built MCP (Model Context Protocol) server for text file analysis, also published as a package to PyPI.
Table of Contents
Introduction
What is MCP?
Model Context Protocol (MCP) is an open protocol that standardizes how applications provide context to Large Language Models (LLMs). It creates a consistent interface for AI models like Claude to interact with external tools, data sources, and services.
MCP follows a client-server architecture:
MCP Hosts: Programs like Claude Desktop that initiate connections
MCP Clients: Protocol clients inside the host application
MCP Servers: Lightweight programs (like this one) that expose capabilities
Local Data Sources: Your computer's files, databases, and services
Why MCP?
MCP helps you build agents and complex workflows with LLMs by providing:
Standardized interfaces to connect AI models to different data sources
The flexibility to switch between LLM providers
Best practices for secure data access
Features
This File Analysis MCP Server provides:
Text analysis tools (word count, character frequency, etc.)
File reading capabilities
Directory listing
File content access via MCP resources
Text Analysis Tool (analyze_text)
File Reader Tool (read_file)
Directory Browsing Tool (list_files)
Installation and Setup from GitHub
Step 1: Clone the Repository
Start by cloning the repository to your local machine:
Step 2: Set Up UV Package Manager
This project uses UV, a fast Python package manager. If you don't have it installed:
For MacOS/Linux:
For Windows:
Remember to restart your terminal after installing UV.
Step 3: Create a Virtual Environment
For MacOS/Linux:
For Windows:
Step 4: Install Dependencies
Testing and Debugging
Running with the MCP Inspector:
Claude Desktop Integration
The real power of your File Analysis server comes when you connect it to Claude Desktop!
Setting Up with Claude Desktop
Make sure Claude Desktop is installed
Download from Claude.ai if you don't have it
Locate the configuration file:
MacOS:
~/Library/Application Support/Claude/claude_desktop_config.jsonWindows:
%AppData%\Claude\claude_desktop_config.json
If the file doesn't exist, create it.
Add your server configuration:
For MacOS/Linux:
{ "mcpServers": { "file-analysis": { "command": "uv", "args": [ "--directory", "/ABSOLUTE/PATH/TO/file-analysis-mcp", "run", "server.py" ] } } }For Windows:
{ "mcpServers": { "file-analysis": { "command": "uv", "args": [ "--directory", "C:\\ABSOLUTE\\PATH\\TO\\file-analysis-mcp", "run", "server.py" ] } } }Important: Replace the path with the actual absolute path to where you cloned the repository. Do not use relative paths.
Restart Claude Desktop
Close and reopen the application completely
Verify the connection
Look for the tools icon (hammer) in the Claude interface
Your tools should appear in the list when clicking this icon
Tips for Using Your Server
File Paths: Always provide absolute file paths for best results
Large Files: Break up analysis of very large files into smaller chunks
Permissions: Ensure Claude has permission to access the files/directories you're analyzing
Installation from Package
From PyPI (Recommended)
The simplest way to install File Analysis MCP Server is from PyPI:
Or using UV (recommended):
Add your server configuration