The SQLite MCP Server provides database interaction and business intelligence capabilities through SQLite, allowing you to run SQL queries, analyze business data, and automatically generate business insight memos.
# Add the server to your claude_desktop_config.json
"mcpServers": {
"sqlite": {
"command": "uv",
"args": [
"--directory",
"parent_of_servers_repo/servers/src/sqlite",
"run",
"mcp-server-sqlite",
"--db-path",
"~/test.db"
]
}
}
# Add the server to your claude_desktop_config.json
"mcpServers": {
"sqlite": {
"command": "docker",
"args": [
"run",
"--rm",
"-i",
"-v",
"mcp-test:/mcp",
"mcp/sqlite",
"--db-path",
"/mcp/test.db"
]
}
}
Add the following JSON block to your User Settings (JSON) file in VS Code (press Ctrl + Shift + P
and type Preferences: Open Settings (JSON)
):
{
"mcp": {
"inputs": [
{
"type": "promptString",
"id": "db_path",
"description": "SQLite Database Path",
"default": "${workspaceFolder}/db.sqlite"
}
],
"servers": {
"sqlite": {
"command": "uvx",
"args": [
"mcp-server-sqlite",
"--db-path",
"${input:db_path}"
]
}
}
}
}
{
"mcp": {
"inputs": [
{
"type": "promptString",
"id": "db_path",
"description": "SQLite Database Path (within container)",
"default": "/mcp/db.sqlite"
}
],
"servers": {
"sqlite": {
"command": "docker",
"args": [
"run",
"-i",
"--rm",
"-v",
"mcp-sqlite:/mcp",
"mcp/sqlite",
"--db-path",
"${input:db_path}"
]
}
}
}
}
Alternatively, you can add either configuration to a file called .vscode/mcp.json
in your workspace to share the configuration with others.
The server exposes a dynamic resource called memo://insights
, which maintains a continuously updated business insights memo that aggregates discovered insights during analysis.
The server provides an interactive demonstration prompt called mcp-demo
:
# Example usage of the demo prompt
# You would use this in a conversation with Claude
Use the mcp-demo prompt to analyze retail sales data
The prompt requires a topic
argument specifying the business domain to analyze. It will:
Reading Data
# Use read_query to execute SELECT queries
read_query('SELECT * FROM customers LIMIT 10')
Writing Data
# Use write_query for INSERT, UPDATE, DELETE operations
write_query('INSERT INTO customers (name, email) VALUES ("John Doe", "[email protected]")')
# Update existing records
write_query('UPDATE customers SET email = "[email protected]" WHERE name = "John Doe"')
Creating Tables
# Create a new table in the database
create_table('CREATE TABLE products (id INTEGER PRIMARY KEY, name TEXT, price REAL)')
Listing Tables
# Get a list of all tables in the database
list_tables()
Describing Tables
# View schema information for a specific table
describe_table('customers')
Adding Business Insights
# Add a new insight to the memo resource
append_insight('Sales of premium products increased by 15% in Q4 compared to Q3')
This will update the memo://insights
resource with the new insight.
If you need to test the server locally:
uv add "mcp[cli]"
mcp dev src/mcp_server_sqlite/server.py:wrapper
There are two ways to add an MCP server to Cursor. The most common way is to add the server globally in the ~/.cursor/mcp.json
file so that it is available in all of your projects.
If you only need the server in a single project, you can add it to the project instead by creating or adding it to the .cursor/mcp.json
file.
To add a global MCP server go to Cursor Settings > MCP and click "Add new global MCP server".
When you click that button the ~/.cursor/mcp.json
file will be opened and you can add your server like this:
{
"mcpServers": {
"cursor-rules-mcp": {
"command": "npx",
"args": [
"-y",
"cursor-rules-mcp"
]
}
}
}
To add an MCP server to a project you can create a new .cursor/mcp.json
file or add it to the existing one. This will look exactly the same as the global MCP server example above.
Once the server is installed, you might need to head back to Settings > MCP and click the refresh button.
The Cursor agent will then be able to see the available tools the added MCP server has available and will call them when it needs to.
You can also explictly ask the agent to use the tool by mentioning the tool name and describing what the function does.