# Examples

The following examples demonstrate how to use the SingleStore MCP Server with the Claude Desktop. This requires an initial setup. Perform the following tasks to initiate the MCP client:

1. Run the following command in the terminal:
   ```shell
   uvx singlestore-mcp-server init
   ```

2. Restart Claude Desktop.

> **📝 Note**: When using third-party tools such as Claude with the SingleStore MCP server, a permission prompt appears requesting access to run actions like `run_sql`. Review each action carefully before granting access. These tools operate independently, and Claude cannot guarantee the security or privacy practices of third-party integrations.You can choose one of the following options:- **Allow once**: Approves the action for a single use.
> - **Allow always**: Grants persistent access for future requests.
> - **Decline**: Denies the request.For improved security, SingleStore recommends selecting **Allow once** during initial setup or testing.![](https://images.contentstack.io/v3/assets/bltac01ee6daa3a1e14/bltcec6d63237882a10/6a44f24b715a26d0d1bb6da7/Screenshot_2025-07-31_at_7_59_54_PM-p3OtZZ.png)

## Create a Notebook in Personal Space

This example creates a notebook in personal space. Open Claude Desktop, and enter the following prompt:

```shell
Create a notebook named myrag in personal space. In this notebook, write a python code to create a RAG application. The RAG application will use arxiv papers as data source, SingleStore as vector database, Gemma model as the LLM, and use LangChain orchestration framework.

```

Once the prompt is submitted, the following tools will run to perform the relative task:

* `choose_organization`: Selects the organization.
* `set_organization`: Sets the organization.
* `create_notebook_file`: Creates a notebook with a comprehensive RAG application that uses ArXiv papers, SingleStore as the vector database, Gemma as the LLM, and LangChain orchestration framework.
* `upload_notebook_file`: Uploads the notebook to your personal space with the name **myrag**.

![](https://images.contentstack.io/v3/assets/bltac01ee6daa3a1e14/blt7fb48f9fe8745de0/6a44f248d4b0b12bb9cb1814/Screenshot_2025-07-31_at_5_55_25_PM-USw98E.png)

The notebook is created with the MCP integration. You can view the notebook in your personal space in the [Cloud Portal](http://portal.singlestore.com).

![](https://images.contentstack.io/v3/assets/bltac01ee6daa3a1e14/bltf8cc1dcdfe4d7596/6a44f249667cb1694a999645/Screenshot_2025-07-31_at_5_57_52_PM-kEugvt.png)

## Query a Database

This example creates a table, ingests data into the table, and queries the inserted data.Before proceeding with this example, create a database named `sales` and an associated table. Open Claude Desktop, and update your workspace, workspace group, and organization details in the following prompt:

```shell
Create a new database named sales in <your_workspace> under <your_workspace_group> of <your_organization>,  and then create a table called SalesData with the following columns:
- Date: Text
- Store_ID: Big integer (20), nullable
- ProductID: Text
- Product_Name: Text,
- Product_Category: Text
- Quantity_Sold: Big integer (20), nullable
- Price: Float, nullable
- Total_Sales: Float, nullable

```

Once the prompt is submitted, the following tools will run to perform the relative task:

* `choose_organization`: Checks the organization information.
* `set_organization`: Sets the organization to the specified organization.
* `workspace_groups_info`: Checks and finds information on the specified workspace group.
* `workspaces_info`: Checks and finds information on the specified workspace.
* `run_sql`: Creates the specified database.
* `run_sql`: Creates the specified tables.

![](https://images.contentstack.io/v3/assets/bltac01ee6daa3a1e14/bltf69ddddf4bed3514/6a44f242c510f02429ed56ff/Screenshot_2025-07-31_at_4_44_57_PM-KJ43M9.png)

To ingest data using a pipeline, enter the following prompt:

```shell
Create a pipeline SalesData_pipeline using 's3://singlestoreloaddata/SalesData/*.csv'
```

Once the prompt is submitted, the following tool will run to perform the relative task:

* `run_sql`: Creates the pipeline in the `sales` database.

![](https://images.contentstack.io/v3/assets/bltac01ee6daa3a1e14/blt69de16f786efe8a8/6a44f244477436bd70d3cf38/Screenshot_2025-07-31_at_4_50_10_PM-FW78y6.png)

To start the pipeline, enter the following prompt:

```shell
Start the pipeline
```

Once the prompt is submitted, the following tool will run to perform the relative task:

* `run_sql`: Starts the pipeline.

![](https://images.contentstack.io/v3/assets/bltac01ee6daa3a1e14/bltec561dd86a81c966/6a44f2450efc346c8e9abd5b/Screenshot_2025-07-31_at_4_52_57_PM-O8r7JM.png)

To query the data in the table, enter the following prompt:

```shell
Identify the top three stores with the highest sales in the Electronics category.
```

Once the prompt is submitted, the following tool will run to perform the relative task:

* `run_sql`: Queries the `SalesData` table to find the top three stores with the highest sales in the Electronics category.

![](https://images.contentstack.io/v3/assets/bltac01ee6daa3a1e14/bltd200fe1f89674f17/6a44f1f8a4fb1f58e27e6d13/Screenshot_2025-07-31_at_5_01_25_PM-80Ucw1.png)

## Create a Scheduled Job

This example creates a notebook in shared space and schedules the job. Open Claude Desktop, and update your workspace, workspace group, and organization details in the following prompt:

```
Create a notebook named SalesData in the shared space. In the notebook, use the SalesData table from the sales database in <your_workspace> under <your_workspace_group> of <your_organization>, to generate appropriate visualizations based on the data.

```

Once the prompt is submitted, the following tools will run to perform the relative task:

* `choose_organization`: Checks the organization information.
* `set_organization`: Sets the organization to the specified organization.
* `workspace_groups_info`: Checks and finds information on the specified workspace group.
* `workspaces_info`: Checks and finds information on the specified workspace.
* `run_sql`: Explores SalesData table structure.
* `run_sql`: Understands the sample data of the table.
* `run_sql`: Understands the aggregate information of the table.
* `run_sql`: Explores the distinct product categories.
* `create_notebook_file`: Creates the **SalesData** notebook file.
* `upload_notebook_file`: Uploads the **SalesData** notebook file in shared space.

![](https://images.contentstack.io/v3/assets/bltac01ee6daa3a1e14/blt28f396ae4f103140/6a44f1f37dad69c5e003a7e8/Screenshot_2025-08-08_at_5_37_31_PM-ZSbu4I.png)

The notebook is created in the shared space in the Cloud Portal.

![](https://images.contentstack.io/v3/assets/bltac01ee6daa3a1e14/blt9e6c064a19aec494/6a44f24ed6089ab872d8488f/Screenshot_2025-08-08_at_5_43_13_PM-T8dCkk.png)

To schedule the notebook, enter the following prompt:

```shell
Create a schedule job using the SalesData notebook, with the name of job as SalesJob, start executions "Now", with "Weekly" "Recurring" schedule mode. Save all the execution results.
```

Once the prompt is submitted, the following tool will run to perform the relative task:

* `create_job_from_notebook`: Creates a scheduled job using SalesData notebook in weekly recurring schedule mode.

![](https://images.contentstack.io/v3/assets/bltac01ee6daa3a1e14/blt20f8bb8287d70ac5/6a44f24d0efc341d8e9abd5d/Screenshot_2025-08-08_at_5_38_03_PM-Y2Jri5.png)

***

Modified at: May 13, 2026

Source: [/cloud/ai/singlestore-mcp-server/examples/](https://docs.singlestore.com/cloud/ai/singlestore-mcp-server/examples/)

(An index of the documentation is available at /llms.txt)
