Log Analysis SQLite
About
Transforms compressed log files into a queryable SQLite database with tables for logs, stack traces, and errors, enabling efficient analysis and troubleshooting of application issues by timestamp, log level, and module.
Details
- Author
- direkt
- Repository
- direkt/mcp-test
- Categories
- AI, Developer Tools, File Management, Search, Infrastructure, Database
Jump to
Setting up with Highlight
This MCP is not yet compatible with Highlight’s one-click setup. However, you can still use it with Highlight by following these steps:
- Download and install Highlight from highlightai.com/download
- Navigate to the plugins tab and select "Add Custom Plugin"
-
Configure the plugin with the settings below
Plugin Name
Log Analysis SQLiteCommand (node, npx, python, etc.)npxArguments-
Argument 1
-y -
Argument 2
@smithery/cli@latest -
Argument 3
run -
Argument 4
mcp-server-sqlite-npx -
Argument 5
--config -
Argument 6
{"databasePath":"/path/to/thedatbase/logs.db"}
Please refer to the README for specific instructions on how to obtain API keys or other required environment variables.
-
Argument 1
- Enable "Start Automatically" if you want the plugin to start when Highlight launches
From the repository
python3 -m venv venv
source venv/bin/activate
pip3 install -r requirements.txt
Place log files in the folder as .gz files, then run:
python3 create_log_db.py
Claude Desktop / Cursor
Paste into your MCP client config file to install this server.
{
"mcpServers": {
"log analysis sqlite": {
"env": {},
"args": [
"-y",
"@smithery/cli@latest",
"run",
"mcp-server-sqlite-npx",
"--config",
"{\"databasePath\":\"/path/to/thedatbase/logs.db\"}"
],
"shell": true,
"command": "npx"
}
}
}
Linux
{
"env": [],
"args": [
"-y",
"@smithery/cli@latest",
"run",
"mcp-server-sqlite-npx",
"--config",
"{\"databasePath\":\"/path/to/thedatbase/logs.db\"}"
],
"shell": true,
"command": "npx"
}
Macos
{
"env": [],
"args": [
"-y",
"@smithery/cli@latest",
"run",
"mcp-server-sqlite-npx",
"--config",
"{\"databasePath\":\"/path/to/thedatbase/logs.db\"}"
],
"shell": true,
"command": "npx"
}
Windows
{
"env": [],
"args": [
"/c",
"npx",
"-y",
"@smithery/cli@latest",
"run",
"mcp-server-sqlite-npx",
"--config",
"{\"databasePath\":\"/path/to/thedatbase/logs.db\"}"
],
"command": "cmd"
}
Log Analysis with SQLite MCP Server
This project provides tools to create an SQLite database from compressed log files and interact with it using the Model Context Protocol (MCP) SQLite server.
Install instructions
python3 -m venv venv
source venv/bin/activate
pip3 install -r requirements.txt
Place log files in the folder as .gz files, then run:
python3 create_log_db.py
MCP SQLite Server
To configure the MCP SQLite server in Cursor-
- Cursor Settings
- MCP
- Add New MCP Server
- Name SQLlite
- Set the type to command
- Put this in the command box
npx -y @smithery/cli@latest run mcp-server-sqlite-npx --config "{\"databasePath\":\"/path/to/thedatbase/logs.db\"}"
Contents
- create_log_db.py: Script to extract and parse log files into an SQLite database
- query_logs.py: Script to directly query the SQLite database
- logs.db: SQLite database containing parsed log data
Database Structure
The database contains the following tables:
logs Table
- id: Unique identifier for each log entry
- timestamp: Timestamp of the log entry
- thread: Thread that generated the log
- level: Log level (INFO, WARN, ERROR, DEBUG)
- module: Module that generated the log
- message: Log message content
- source_file: Source log file
- raw_log: Raw log entry
stack_traces Table
- id: Unique identifier for each stack trace
- log_id: Reference to the log entry this stack trace belongs to
- stack_trace: Full stack trace text
parsing_errors Table
- id: Unique identifier for each parsing error
- line: The line that couldn't be parsed
- source_file: Source log file
- error_message: Error message explaining why parsing failed
- timestamp: When the parsing error occurred
You can query the database directly using the query_logs.py script:
Sign in to leave a review
Use Google, GitHub, or an email account so ratings stay tied to real people.
No reviews posted yet.




