pallav116/mcp_server_pallav
3.1
If you are the rightful owner of mcp_server_pallav and would like to certify it and/or have it hosted online, please leave a comment on the right or send an email to henry@mcphub.com.
The MCP File Search Server is a high-performance server designed for efficient and context-aware file searches using the Model Context Protocol.
🔍 MCP File Search Server
A fast Model Context Protocol (MCP) server for quick and context-aware file searches.
Features
- Advanced file search with line numbers and context
- Recursive directory scanning
- Context-aware results showing nearby lines
- Case-insensitive matching
- Async/await for better performance
- Configurable limits and context size
Quick Start
Prerequisites
- Python 3.8 or higher
- pip installed
Installation
git clone https://github.com/yourusername/mcp-file-search-server
cd mcp-file-search-server
pip install -r requirements.txt
Run
python main.py
Example
python main.py --query "async def" --path ./src
License
This project is licensed under the MIT License — feel free to use and improve it!
Example Usage
json { "file_path": "example.txt", "keyword": "function", "max_results": 10, "context_lines": 2 }
text
Test File (test_files/example.txt)
# Sample Code File
def calculate_total(items):
"""Calculate total price of items"""
total = 0
for item in items:
total += item.price
return total
def validate_user(user):
"""Validate user data"""
if not user.email:
return False
if len(user.password) < 8:
return False
return True
class UserManager:
def __init__(self):
self.users = []
def add_user(self, user):
"""Add a new user"""
if validate_user(user):
self.users.append(user)
return True
return False
# Utility functions
def format_date(date_string):
"""Format date string"""
# Date formatting logic here
pass