SQLite MCP Server
SQLite MCP 서버를 사용한 로그 분석
이 프로젝트는 압축된 로그 파일에서 SQLite 데이터베이스를 생성하고 MCP(Model Context Protocol) SQLite 서버를 사용하여 해당 데이터베이스와 상호 작용하는 도구를 제공합니다.
설치 지침
지엑스피1
로그 파일을 .gz 파일로 폴더에 넣은 다음, 다음을 실행합니다.
python3 create_log_db.py Related MCP server: SQLite MCP Server
MCP SQLite 서버
커서에서 MCP SQLite 서버를 구성하려면
커서 설정
엠씨피
새로운 MCP 서버 추가
이름
SQLlitecommand유형을 설정하세요이것을 명령 상자에 넣으세요
npx -y @smithery/cli@latest run mcp-server-sqlite-npx --config "{\"databasePath\":\"/path/to/thedatbase/logs.db\"}"내용물
create_log_db.py: 로그 파일을 추출하여 SQLite 데이터베이스로 구문 분석하는 스크립트query_logs.py: SQLite 데이터베이스를 직접 쿼리하는 스크립트logs.db: 구문 분석된 로그 데이터를 포함하는 SQLite 데이터베이스
데이터베이스 구조
데이터베이스에는 다음과 같은 테이블이 포함되어 있습니다.
logs 테이블
id: 각 로그 항목에 대한 고유 식별자timestamp: 로그 항목의 타임스탬프thread: 로그를 생성한 스레드level: 로그 레벨(INFO, WARN, ERROR, DEBUG)module: 로그를 생성한 모듈message: 로그 메시지 내용source_file: 소스 로그 파일raw_log: 원시 로그 항목
stack_traces 테이블
id: 각 스택 추적에 대한 고유 식별자log_id: 이 스택 추적이 속한 로그 항목에 대한 참조stack_trace: 전체 스택 추적 텍스트
parsing_errors 테이블
id: 각 구문 분석 오류에 대한 고유 식별자line: 구문 분석할 수 없는 줄source_file: 소스 로그 파일error_message: 구문 분석에 실패한 이유를 설명하는 오류 메시지timestamp: 구문 분석 오류가 발생한 시간
query_logs.py 스크립트를 사용하여 데이터베이스를 직접 쿼리할 수 있습니다.
This server cannot be deployed
Maintenance
Related MCP Connectors
Ask data questions in natural language. Get SQL, insights, and charts from your databases.
Ingest and search LogsLoom logs from coding agents.
Query application logs, traces, and metrics from your AI coding assistant via Foam's MCP server.
Query 40 databases from Claude, ChatGPT, or Cursor — on any device. Read-only, encrypted, audited.
Related MCP Servers
- AlicenseNot gradedqualityDmaintenanceImplements a Model Context Protocol server that enables natural language interactions with SQLite databases, providing tools to list tables, retrieve schemas, count rows, and execute read-only SQL queries.MIT
- AlicenseNot gradedqualityDmaintenanceEnables AI assistants to interact with SQLite databases by executing read and write queries, listing tables, and inspecting schemas. It provides a secure, local interface for database management and data retrieval through the Model Context Protocol.2MIT
- FlicenseNot gradedqualityDmaintenanceEnables AI agents to query databases via natural language using the Model Context Protocol, with automatic schema discovery, SQL query execution, and read-only safety checks.-
- FlicenseNot gradedqualityDmaintenanceEnables AI agents to connect to and query an SQLite database through the Model Context Protocol, allowing natural language interaction with database tables and data.-