8agana/warp-sqlite-mcp
If you are the rightful owner of warp-sqlite-mcp and would like to certify it and/or have it hosted online, please leave a comment on the right or send an email to henry@mcphub.com.
The Warp SQLite MCP Server is a Rust-based server that facilitates SQLite database access for Warp terminal, allowing AI agents to interact with conversation history and manage data.
Warp SQLite MCP Server
A Rust-based MCP (Model Context Protocol) server that provides SQLite access to Warp terminal's database, enabling AI agents to query conversation history, manage notebooks, and interact with Warp's data.
Features
- SQLite CRUD Operations: Generic insert, select, update, and delete operations
- Notebook Management: Create, read, update, delete, and list Warp notebooks
- MCP Server Management: Register/unregister MCP servers and manage their environment variables
- Conversation History Access: Query AI conversations, commands, and agent interactions
Prerequisites
- Rust (latest stable version)
- Warp terminal installed
- Access to Warp's SQLite database
Installation
- Clone the repository:
git clone https://github.com/samuelatagana/warp-sqlite-mcp.git
cd warp-sqlite-mcp
- Build the project:
cargo build --release
The binary will be available at target/release/warp-sqlite-mcp
Configuration
The server can be configured in three ways (in order of precedence):
- Environment Variable:
export DATABASE_URL="sqlite:///Users/samuelatagana/Library/Application Support/dev.warp.Warp-Stable/warp.sqlite"
- Config File (
config.toml
in the project directory):
[database]
url = "sqlite:///Users/samuelatagana/Library/Application Support/dev.warp.Warp-Stable/warp.sqlite"
- Default: Falls back to
sqlite://./app.sqlite
if no configuration is provided
Usage
Running the Server
# Using environment variable
DATABASE_URL="sqlite:///path/to/warp.sqlite" ./target/release/warp-sqlite-mcp
# Using config file
./target/release/warp-sqlite-mcp
Available Tools
Generic SQLite Operations
sqlite_insert
- Insert a row into any tablesqlite_select
- Query rows from any tablesqlite_update
- Update rows in any tablesqlite_delete
- Delete rows from any table
Notebook Management
notebook_create
- Create a new notebooknotebook_list
- List notebooks with optional searchnotebook_get
- Get a specific notebook by IDnotebook_append
- Append text to an existing notebooknotebook_delete
- Delete a notebook
MCP Server Management
mcp_register_server
- Register an MCP servermcp_unregister_server
- Unregister an MCP servermcp_set_env
- Set environment variables for an MCP servermcp_get_env
- Get environment variables for an MCP server
Known Issues
-
Type Conversion Bug: Currently, there's an issue where JSON numbers are being deserialized as floats instead of integers, causing errors with tools that expect
i64
parameters. This affects:- Tools with
limit
oroffset
parameters - Tools with
id
parameters (notebook_get, notebook_append, notebook_delete)
Workaround: Use SQL queries directly via
sqlite_select
without numeric parameters. - Tools with
Database Schema
The Warp database contains numerous tables including:
ai_queries
- AI conversation queriesagent_conversations
- Agent mode conversationsnotebooks
- Warp notebooksactive_mcp_servers
- Registered MCP serverscommands
- Command history- And many more...
Development
Running Tests
cargo test
Building for Development
cargo build
Code Structure
src/main.rs
- Main server implementation- Uses
rmcp
v0.5.0 for MCP protocol implementation - Uses
sqlx
for SQLite database access - Async runtime powered by
tokio
Contributing
Issues and pull requests are welcome! Please ensure:
- Code follows Rust conventions
- All tests pass
- New features include appropriate documentation
License
[Add your license here]
Author
Samuel Atagana