SQLite MCP Server

by MCP-Mirror

368 downloads
Not rated
GitHub

About

A Model Context Protocol (MCP) server that enables database interaction and business intelligence through SQLite. It allows running SQL queries, analyzing data, and automatically generating business insight memos.

Details

Author
MCP-Mirror
Downloads
368
Categories
Database

- Executes SELECT, INSERT, UPDATE, DELETE, and CREATE TABLE queries
- Exposes a dynamic memo://insights resource for business insights
- Provides a guided mcp-demo prompt for analysis workflows
- Lists and describes database tables via dedicated tools
- Appends discovered insights to the memo with append-insight
- Logs timestamps and structured metadata to server.log

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:

  1. Download and install Highlight from highlightai.com/download
  2. Navigate to the plugins tab and select "Add Custom Plugin"
  3. Configure the plugin with the settings below
    Plugin Name SQLite MCP Server
    Command (node, npx, python, etc.)

    Please refer to the README for specific instructions on how to obtain API keys or other required environment variables.

  4. Enable "Start Automatically" if you want the plugin to start when Highlight launches

From the repository

Install Bun, clone the repository, run bun install, then bun run setup to configure the server in Claude Desktop. The server adds tools like read-query, write-query, and create-table for direct SQL operations, plus a memo://insights resource for accumulating insights.

Claude Desktop / Cursor

Paste into your MCP client config file to install this server.

{
    "mcpServers": {
        "sqlite mcp server": {
            "jacksteamdev_mcp-sqlite-bun-server": {
                "command": "bun",
                "args": [
                    "run",
                    "setup"
                ]
            }
        }
    }
}

McpServers

{
    "jacksteamdev_mcp-sqlite-bun-server": {
        "command": "bun",
        "args": [
            "run",
            "setup"
        ]
    }
}

SQLite MCP Server

Overview

A Model Context Protocol (MCP) server implementation that provides database interaction and business intelligence capabilities through SQLite. This server enables running SQL queries, analyzing business data, and automatically generating business insight memos.

Installation

1. Install Bun if you haven't already
2. Clone this repository
3. Install dependencies:

   bun install

4. Run the setup script to configure the server in Claude Desktop:
   bun run setup

The setup script will automatically add the server configuration to your Claude Desktop config file, located at:
- macOS: ~/Library/Application Support/Claude/claude_desktop_config.json

Components

Resources

The server exposes a single dynamic resource: - memo://insights: A continuously updated business insights memo that aggregates discovered insights during analysis - Auto-updates as new insights are discovered via the append-insight tool

Prompts

The server provides a demonstration prompt: - mcp-demo: Interactive prompt that guides users through database operations - Required argument: topic - The business domain to analyze - Generates appropriate database schemas and sample data - Guides users through analysis and insight generation - Integrates with the business insights memo

Tools

The server offers six core tools:

Query Tools

- read-query - Execute SELECT queries to read data from the database - Input: - query (string): The SELECT SQL query to execute - Returns: Query results as array of objects

- write-query
- Execute INSERT, UPDATE, or DELETE queries
- Input:
- query (string): The SQL modification query
- Returns: { affected_rows: number }

- create-table
- Create new tables in the database
- Input:
- query (string): CREATE TABLE SQL statement
- Returns: Confirmation of table creation

Schema Tools

- list-tables - Get a list of all tables in the database - No input required - Returns: Array of table names

- describe-table
- View schema information for a specific table
- Input:
- table_name (string): Name of table to describe
- Returns: Array of column definitions with names and types

Analysis Tools

- append-insight - Add new business insights to the memo resource - Input: - insight (string): Business insight discovered from data analysis - Returns: Confirmation of insight addition - Triggers update of memo://insights resource

Development

Project Structure

- src/index.ts: Main server implementation - src/logger.ts: Logging utility - scripts/setup.ts: Claude Desktop configuration script

Logging

The server maintains detailed logs in: - server.log: Located in the project root directory - Logs include timestamps, log levels (DEBUG, INFO, WARN, ERROR, FATAL), and structured metadata

Database

The SQLite database file is created at: - data.sqlite: Located in the project root directory - Created automatically if it doesn't exist

Available Scripts

- bun run setup: Configure the server in Claude Desktop - bun run lint: Run ESLint checks - bun run lint:fix: Fix ESLint issues automatically - bun run inspect: Run the MCP inspector

License

This MCP server is licensed under the MIT License. See the LICENSE file for details.

No reviews yet — be the first

Sign in to leave a review

Use Google, GitHub, or an email account so ratings stay tied to real people.

Email sign in

No reviews posted yet.