# SQLite (MCP Server)

> Archived reference server for SQLite queries and BI insights

- Type: MCP server
- Publisher: Model Context Protocol (official)
- Categories: Data & Analytics
- Website: https://github.com/modelcontextprotocol/servers-archived/tree/main/src/sqlite
- Source: https://github.com/modelcontextprotocol/servers-archived
- Transport: stdio
- Launch command: uvx mcp-server-sqlite --db-path /path/to/db.sqlite
- Sign-in: none
- Listed: 2024-11-25

## About

Archived reference MCP server (no longer maintained, now in servers-archived) for querying and modifying a SQLite database. Includes schema tools and an insights memo resource for business analysis.

## Install

1. **Add the server to Codex**

   Codex CLI:

   ```bash
   codex mcp add sqlite -- uvx mcp-server-sqlite --db-path /path/to/db.sqlite
   ```

   config.toml:

   ```toml
   [mcp_servers.sqlite]
   command = "uvx"
   args = ["mcp-server-sqlite", "--db-path", "/path/to/db.sqlite"]
   ```

   Agents SDK:

   ```python
   from agents import Agent, Runner
   from agents.mcp import MCPServerStdio
   
   async with MCPServerStdio(
       name="SQLite",
       params={"command": "uvx", "args": ["mcp-server-sqlite", "--db-path", "/path/to/db.sqlite"]},
   ) as server:
       agent = Agent(name="Assistant", mcp_servers=[server])
       result = await Runner.run(agent, "List all tables in my database")
       print(result.final_output)
   ```

## Tools

- `read_query`
- `write_query`
- `create_table`
- `list_tables`
- `describe-table`
- `append_insight`

## Example prompts

- "List all tables in my database"
- "Create a table for tracking expenses"
- "What were total sales by month?"
- "Record an insight about churn trends"

## Related

- [Supabase](https://chatgptplugins.directory/mcp/supabase.md): Manage Supabase databases, migrations, edge functions and logs
- [Graphiti MCP](https://chatgptplugins.directory/mcp/graphiti.md): Temporal knowledge graph memory for agents, by Zep
- [MCP Toolbox for Databases](https://chatgptplugins.directory/mcp/mcp-toolbox-databases.md): Google's open-source MCP server for 20+ databases
- [PostHog](https://chatgptplugins.directory/mcp/posthog.md): Query product analytics, feature flags, experiments and errors in PostHog
- [Apify](https://chatgptplugins.directory/mcp/apify.md): Run thousands of Apify Actors for scraping and automation from your agent
- [Firecrawl](https://chatgptplugins.directory/mcp/firecrawl.md): Scrape, search, crawl and interact with live web pages for LLMs

---
Source: https://chatgptplugins.directory/mcp/sqlite · Index: https://chatgptplugins.directory/llms.txt · Independent and community-run. Not affiliated with or endorsed by OpenAI. ChatGPT is a trademark of OpenAI.
