SQLite MCP Server
使用 SQLite MCP 服务器进行日志分析
该项目提供从压缩日志文件创建 SQLite 数据库并使用模型上下文协议 (MCP) SQLite 服务器与其交互的工具。
安装说明
python3 -m venv venv
source venv/bin/activate
pip3 install -r requirements.txt将日志文件作为 .gz 文件放在文件夹中,然后运行:
python3 create_log_db.py Related MCP server: SQLite MCP Server
MCP SQLite 服务器
要在 Cursor 中配置 MCP SQLite 服务器,请执行以下操作:
光标设置
微胶囊钙
添加新的 MCP 服务器
名称
SQLlite将类型设置为
command将其放入命令框中
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 installed
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
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 gradedqualityCmaintenanceEnables AI agents to connect to and query an SQLite database through the Model Context Protocol, allowing natural language interaction with database tables and data.
Related MCP Connectors
Explore, query, and inspect SQLite databases with ease. List tables, preview results, and view det…
Query PostgreSQL databases in plain English — LLM-generated, safety-validated SQL.
Analytical memory for AI agents: a real Postgres queried in plain English over MCP. One command.
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/direkt/mcp-test'
If you have feedback or need assistance with the MCP directory API, please join our Discord server