Skip to main content
Glama

SQLite MCP Server

SQLite MCP 服务器

概述

模型上下文协议 (MCP) 服务器实现,通过 SQLite 提供数据库交互和商业智能功能。该服务器支持运行 SQL 查询、分析业务数据并自动生成业务洞察备忘录。

安装

  1. 如果尚未安装Bun
  2. 克隆此存储库
  3. 安装依赖项:
    bun install
  4. 运行安装脚本以在 Claude Desktop 中配置服务器:
    bun run setup

安装脚本将自动将服务器配置添加到您的 Claude Desktop 配置文件中,该文件位于:

  • macOS: ~/Library/Application Support/Claude/claude_desktop_config.json

成分

资源

服务器公开单个动态资源:

  • memo://insights :持续更新的业务洞察备忘录,汇总分析过程中发现的洞察
    • 通过附加洞察工具发现新见解时自动更新

提示

服务器提供演示提示:

  • mcp-demo :指导用户完成数据库操作的交互式提示
    • 必需参数: topic - 要分析的业务领域
    • 生成适当的数据库模式和示例数据
    • 指导用户进行分析和洞察生成
    • 与业务洞察备忘录集成

工具

该服务器提供六个核心工具:

查询工具
  • read-query
    • 执行 SELECT 查询以从数据库读取数据
    • 输入:
      • query (字符串):要执行的 SELECT SQL 查询
    • 返回:查询结果作为对象数组
  • write-query
    • 执行 INSERT、UPDATE 或 DELETE 查询
    • 输入:
      • query (字符串):SQL 修改查询
    • 返回: { affected_rows: number }
  • create-table
    • 在数据库中创建新表
    • 输入:
      • query (字符串):CREATE TABLE SQL语句
    • 返回:表创建确认
架构工具
  • list-tables
    • 获取数据库中所有表的列表
    • 无需输入
    • 返回:表名称数组
  • describe-table
    • 查看特定表的架构信息
    • 输入:
      • table_name (字符串):要描述的表的名称
    • 返回:具有名称和类型的列定义数组
分析工具
  • append-insight
    • 向备忘录资源添加新的业务见解
    • 输入:
      • insight (字符串):从数据分析中发现的商业洞察
    • 返回:确认洞察力的增加
    • 触发 memo://insights 资源的更新

发展

项目结构

  • src/index.ts :主服务器实现
  • src/logger.ts :日志实用程序
  • scripts/setup.ts :Claude Desktop 配置脚本

日志记录

服务器维护详细日志:

  • server.log :位于项目根目录
  • 日志包括时间戳、日志级别(DEBUG、INFO、WARN、ERROR、FATAL)和结构化元数据

数据库

SQLite 数据库文件创建于:

  • data.sqlite :位于项目根目录
  • 如果不存在则自动创建

可用脚本

  • bun run setup :在 Claude Desktop 中配置服务器
  • bun run lint :运行 ESLint 检查
  • bun run lint:fix :自动修复 ESLint 问题
  • bun run inspect :运行 MCP 检查器

执照

此 MCP 服务器采用 MIT 许可证。详情请参阅许可证文件。

You must be authenticated.

A
security – no known vulnerabilities
A
license - permissive license
A
quality - confirmed to work

local-only server

The server can only run on the client's local machine because it depends on local resources.

模型上下文协议服务器,通过SQLite提供数据库交互能力,让用户能够运行SQL查询,分析业务数据,并自动生成业务洞察备忘录。

  1. 概述
    1. 安装
      1. 成分
        1. 资源
        2. 提示
        3. 工具
      2. 发展
        1. 项目结构
        2. 日志记录
        3. 数据库
        4. 可用脚本
      3. 执照

        Related MCP Servers

        • -
          security
          -
          license
          -
          quality
          A Model Context Protocol server that provides tools for connecting to and interacting with various database systems (SQLite, PostgreSQL, MySQL/MariaDB, SQL Server) through a unified interface.
          Last updated -
          Python
        • -
          security
          A
          license
          -
          quality
          A Model Context Protocol server implementation that enables AI assistants to execute SQL queries and interact with SQLite databases through a structured interface.
          Last updated -
          6
          TypeScript
          MIT License
        • -
          security
          F
          license
          -
          quality
          A Model Context Protocol server that enables SQL operations (SELECT, INSERT, UPDATE, DELETE) and table management through a standardized interface with SQLite databases.
          Last updated -
          JavaScript
        • -
          security
          A
          license
          -
          quality
          A Model Context Protocol server that allows users to store, retrieve, update, and delete memories using SQLite storage.
          Last updated -
          Python
          MIT License

        View all related MCP servers

        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/jacksteamdev/mcp-sqlite-bun-server'

        If you have feedback or need assistance with the MCP directory API, please join our Discord server