allumbra/log-grep-mcp
If you are the rightful owner of log-grep-mcp 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 Log Grep MCP Server is a tool designed to assist with searching and monitoring log files, providing real-time log analysis capabilities.
grep_log
Search for patterns in log files
monitor_log
Monitor a log file for changes
stop_monitor
Stop monitoring a log file
Log Grep MCP Server
A Model Context Protocol (MCP) server that provides tools for searching and monitoring log files. This server enables Claude to grep through log files, monitor them for changes in real-time, and help with log analysis tasks.
Installation
npm install
npm run build
Configuration
Add to your Claude Desktop config file (~/Library/Application Support/Claude/claude_desktop_config.json
on macOS):
{
"mcpServers": {
"log-grep": {
"command": "node",
"args": ["/path/to/log-grep-mcp/dist/index.js"]
}
}
}
Or if you want to run directly with tsx during development:
{
"mcpServers": {
"log-grep": {
"command": "npx",
"args": ["tsx", "/path/to/log-grep-mcp/src/index.ts"]
}
}
}
Available Tools
grep_log
- Search for patterns in log filesmonitor_log
- Monitor a log file for changesstop_monitor
- Stop monitoring a log file
Usage Examples
Once configured, you can ask Claude to help with log analysis:
- "Search for error messages in /var/log/app.log"
- "Monitor my application log for new entries"
- "Find all instances of 'failed login' in the auth logs"
- "Stop monitoring the current log file"
Development
Prerequisites
- Node.js 18+
- npm
Setup
- Clone the repository
- Install dependencies:
npm install
- Build the project:
npm run build
- Run in development mode:
npm run dev
Project Structure
src/index.ts
- Main MCP server implementationdist/
- Compiled JavaScript outputmcp-config-example.json
- Example MCP configuration
Contributing
- Fork the repository
- Create a feature branch
- Make your changes
- Test thoroughly
- Submit a pull request
License
MIT License - see file for details.