From 24ce19c5595d129d58b900a30eba4204abb4aede Mon Sep 17 00:00:00 2001 From: Daniele Briggi Date: Thu, 24 Apr 2025 17:10:43 +0200 Subject: [PATCH 1/4] feat(mcp): introduce mcp server --- sqlite-cloud/_nav.ts | 3 +- sqlite-cloud/platform/mcp-server.mdx | 147 +++++++++++++++++++++++++++ 2 files changed, 148 insertions(+), 2 deletions(-) create mode 100644 sqlite-cloud/platform/mcp-server.mdx diff --git a/sqlite-cloud/_nav.ts b/sqlite-cloud/_nav.ts index 1c4f14b..57f1c0a 100644 --- a/sqlite-cloud/_nav.ts +++ b/sqlite-cloud/_nav.ts @@ -81,8 +81,7 @@ const sidebarNav: SidebarNavStruct = [ { title: "Query Analyzer", filePath: "analyzer", type: "inner", level: 0 }, { title: "Extensions", filePath: "extensions", type: "inner", level: 0 }, { title: "Weblite", filePath: "weblite", type: "inner", level: 0 }, - // { title: "Storage", type: "inner", level: 0 }, - // { title: "Partitioning", type: "inner", level: 0 }, + { title: "AI - Model Context Protocol (MCP)", filePath: "mcp-server", type: "inner", level: 0 }, { title: "SDKs", type: "secondary", icon: "docs-sdk" }, { title: "C/C++", type: "inner", level: 0 }, diff --git a/sqlite-cloud/platform/mcp-server.mdx b/sqlite-cloud/platform/mcp-server.mdx new file mode 100644 index 0000000..34818b7 --- /dev/null +++ b/sqlite-cloud/platform/mcp-server.mdx @@ -0,0 +1,147 @@ +--- +title: AI - Model Context Protocol (MCP) +description: MCP Server for SQLite Cloud to interact with SQLite Cloud databases using the AI models +category: platform +status: publish +slug: mcp-server +--- + +The [Model Context Protocol (MCP)](https://modelcontextprotocol.io/introduction) is a standard for connecting various data sources (like your SQLite Cloud database) to Large Language Models (LLMs). The MCP Server for SQLite Cloud provides tools for executing queries, managing schemas, and analyzing query performance. + +## Features + +- **Query Execution**: Perform `SELECT`, `INSERT`, `UPDATE`, and `DELETE` SQL operations on SQLite Cloud databases. +- **Schema Management**: Create tables, list existing ones, and retrieve schema details. +- **Command Execution**: Run predefined commands supported by SQLite Cloud. +- **Performance Analysis**: Identify slow queries, analyze query plans, and reset query statistics. + +[Explore the available tools here](https://github.com/sqlitecloud/sqlitecloud-mcp-server). + +## Getting Started + +To use the MCP Server, create a [free account on SQLite Cloud](https://sqlitecloud.io) and obtain your **Connection String**. + +### Requirements + +You need [Node.js](https://nodejs.org) installed on your computer to run the MCP Server. To check if Node.js is installed, open a terminal: + +- **Linux**: Open the terminal from the Applications menu. +- **macOS**: Open the Terminal app from the Applications folder or use Spotlight Search (`Cmd+Space`) and type "Terminal." +- **Windows**: Press `Win + R`, type `cmd`, and press Enter to open the Command Prompt. Alternatively, search for "Command Prompt" in the Start menu. + +Then type the following command and press Enter: + +```bash +node --version +``` + +If the command returns a version number, Node.js is installed. If you see an error like "command not found" or "node is not recognized," download and install Node.js from [nodejs.org](https://nodejs.org). + +## Configure the AI Agent + +This guide explains how to connect the MCP Server for SQLite Cloud to common AI agents that support MCP. +[Find a list of supported tools and IDEs here](https://modelcontextprotocol.io/clients). + +After configuring your AI agent, try asking it questions about your SQLite Cloud database, such as: + +> What’s in my database on SQLite Cloud?" +"What are the three most popular tracks by revenue in my SQLite Cloud database? + +Explore or manipulate your database using natural language queries. + +### Claude Desktop + +Refer to the [official documentation](https://modelcontextprotocol.io/quickstart/user) for detailed instructions. + +1. Open Claude Desktop and navigate to **Settings**. +2. Go to the **Developer** section and click on **Edit Config** to open the configuration file. +3. Add the following configuration: + + ```json + { + "mcpServers": { + "sqlitecloud-mcp-server": { + "type": "stdio", + "command": "npx", + "args": [ + "-y", + "@sqlitecloud/mcp-server", + "--connectionString", + "" + ] + } + } + } + ``` + + Replace `` with your Connection String. + +4. Save the configuration file and restart Claude Desktop. +5. You should see a _Hammer_ icon in the bottom-right corner of the input box. Click the icon to view the list of discovered tools. + +### Cursor + +Refer to the [official documentation](https://docs.cursor.com/context/model-context-protocol#configuring-mcp-servers) for detailed instructions. + +1. In the root of your project, create the file `.cursor/mcp.json`. +2. Add the following configuration: + + ```json + { + "mcpServers": { + "sqlitecloud-mcp-server": { + "type": "stdio", + "command": "npx", + "args": [ + "-y", + "@sqlitecloud/mcp-server", + "--connectionString", + "" + ] + } + } + } + ``` + + Replace `` with your Connection String. + +3. Save the `mcp.json` file. +4. Open the **Settings** page and navigate to the **MCP** section. You should see the MCP server with a green status indicator. +5. In the Chat panel, select the "Agent" mode to interact with the AI model using the MCP Server. + +### VSCode Copilot + +Refer to the [official documentation](https://code.visualstudio.com/docs/copilot/chat/mcp-servers) for detailed instructions. + +1. In the root of your project, create the file `.vscode/mcp.json`. +2. Add the following configuration: + + ```json + { + "mcp": { + "inputs": [ + { + "type": "promptString", + "id": "sqlitecloud-connection-string", + "description": "Set the SQLite Cloud Connection String", + "password": true + } + ], + "servers": { + "sqlitecloud-mcp-server": { + "type": "stdio", + "command": "npx", + "args": [ + "-y", + "@sqlitecloud/mcp-server", + "--connectionString", + "${input:sqlitecloud-connection-string}" + ] + } + } + } + } + ``` + +3. Save the `mcp.json` file. +4. Open Copilot Chat and select the **Agent** mode from the menu near the **Send** button. A tool icon will appear, showing the discovered tools. Before starting the server, VSCode will prompt you to enter your Connection String. From 18feff0dc1b23383437bfa3cf654ce2a48f013da Mon Sep 17 00:00:00 2001 From: Gioele Cantoni <48024736+Gioee@users.noreply.github.com> Date: Thu, 24 Apr 2025 19:16:06 +0200 Subject: [PATCH 2/4] update docsearch action to use new 443 port --- .github/workflows/search.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/search.yml b/.github/workflows/search.yml index 4a9ee05..2f86bbc 100644 --- a/.github/workflows/search.yml +++ b/.github/workflows/search.yml @@ -12,7 +12,7 @@ jobs: environment: ${{ github.ref_name }} steps: - - uses: actions/checkout@v4 + - uses: actions/checkout@v5 - uses: sqlitecloud/docsearch-action@v4 with: project-string: ${{ secrets.PROJECT_STRING }} From 2c1628d3f38b6c44dbea74024054a32216bad26c Mon Sep 17 00:00:00 2001 From: Gioele Cantoni <48024736+Gioee@users.noreply.github.com> Date: Thu, 24 Apr 2025 19:17:43 +0200 Subject: [PATCH 3/4] wrong action version --- .github/workflows/search.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/search.yml b/.github/workflows/search.yml index 2f86bbc..903abdf 100644 --- a/.github/workflows/search.yml +++ b/.github/workflows/search.yml @@ -12,8 +12,8 @@ jobs: environment: ${{ github.ref_name }} steps: - - uses: actions/checkout@v5 - - uses: sqlitecloud/docsearch-action@v4 + - uses: actions/checkout@v4 + - uses: sqlitecloud/docsearch-action@v5 with: project-string: ${{ secrets.PROJECT_STRING }} base-url: ${{ vars.BASE_URL }} From 7525abd4dc87ea54e3aaf3d9d19a806bec3643ab Mon Sep 17 00:00:00 2001 From: Gioele Cantoni Date: Mon, 28 Apr 2025 16:05:11 +0200 Subject: [PATCH 4/4] publish architecture/scaling --- sqlite-cloud/_nav.ts | 2 +- _architecture.mdx => sqlite-cloud/platform/architecture.mdx | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) rename _architecture.mdx => sqlite-cloud/platform/architecture.mdx (99%) diff --git a/sqlite-cloud/_nav.ts b/sqlite-cloud/_nav.ts index 57f1c0a..1932e34 100644 --- a/sqlite-cloud/_nav.ts +++ b/sqlite-cloud/_nav.ts @@ -70,7 +70,7 @@ const sidebarNav: SidebarNavStruct = [ { title: "Webhooks", filePath: "webhooks", type: "inner", level: 0 }, { title: "Pub/Sub", filePath: "pub-sub", type: "inner", level: 0 }, { title: "Vector", filePath: "vector", type: "inner", level: 0 }, - { title: "Scaling", type: "inner", filePath: "scaling", level: 0 }, + { title: "Scaling", type: "inner", filePath: "architecture", level: 0 }, { title: "Security and Access Control", filePath: "security", diff --git a/_architecture.mdx b/sqlite-cloud/platform/architecture.mdx similarity index 99% rename from _architecture.mdx rename to sqlite-cloud/platform/architecture.mdx index 542fa94..ecf444f 100644 --- a/_architecture.mdx +++ b/sqlite-cloud/platform/architecture.mdx @@ -2,7 +2,7 @@ title: Architecture description: SQLite Cloud Architecture category: getting-started -status: draft +status: publish slug: architecture ---