Логотип SingleStore

SingleStore

Організація
singlestore-labs

MCP server for interacting with SingleStore Management API and services

Видавецьsinglestore-labs
Репозиторійmcp-server-singlestore
МоваPython
Форки
17
Зірки
34
Доступні інструменти
16
Тип транспортуstdio
Категорії
ЛіцензіяMIT
Посилання
  • Підключайте інструменти до робочих процесів із ШІ

    SingleStore надає можливості MCP, які можуть використовувати сумісні клієнтські ШІ-застосунки та агенти.

  • Доступні інструменти: 16

    Перегляньте нижче дії, які можна викликати, з назвами й описами, якщо сервер їх надає.

  • Готова конфігурація для копіювання

    Скористайтеся прикладами конфігурації, щоб налаштувати цей сервер у вибраному клієнті MCP.

  • Показники інтересу до відкритого коду

    Зірки: 34, форки: 17 — у пов’язаному репозиторії.

SingleStore MCP Server

MIT Licence PyPI Downloads

Model Context Protocol (MCP) is a standardized protocol designed to manage context between large language models (LLMs) and external systems. This repository provides an installer and an MCP Server for Singlestore, enabling seamless integration.

With MCP, you can use Claude Desktop, Claude Code, Cursor, or any compatible MCP client to interact with SingleStore using natural language, making it easier to perform complex operations effortlessly.

💡 Pro Tip: Not sure what the MCP server can do? Just call the /help prompt in your chat!

Requirements

  • Python >= v3.10.0
  • uvx installed on your python environment
  • VS Code, Cursor, Windsurf, Claude Desktop, Claude Code, Goose or any other MCP client

Getting started

Getting started

First, install the SingleStore MCP server with your client.

Standard config works in most of the tools:

json
{
  "mcpServers": {
    "singlestore-mcp-server": {
      "command": "uvx",
      "args": [
        "singlestore-mcp-server",
        "start"
      ]
    }
  }
}

No API keys, tokens, or environment variables required! The server automatically handles authentication via browser OAuth when started.

Automatic setup:

bash
uvx singlestore-mcp-server init --client=claude-desktop

Manual setup: Follow the MCP install guide, use the standard config above.

Automatic setup:

bash
uvx singlestore-mcp-server init --client=claude-code

This will automatically run the Claude CLI command for you.

Manual setup:

bash
claude mcp add singlestore-mcp-server uvx singlestore-mcp-server start

Automatic setup:

bash
uvx singlestore-mcp-server init --client=cursor

Manual setup: Go to Cursor Settings -> MCP -> Add new MCP Server. Name to your liking, use command type with the command uvx singlestore-mcp-server start. You can also verify config or add command line arguments via clicking Edit.

Automatic setup:

bash
uvx singlestore-mcp-server init --client=vscode

Manual setup: Follow the MCP install guide, use the standard config above. You can also install using the VS Code CLI:

bash
code --add-mcp '{"name":"singlestore-mcp-server","command":"uvx","args":["singlestore-mcp-server","start"]}'

After installation, the SingleStore MCP server will be available for use with your GitHub Copilot agent in VS Code.

Automatic setup:

bash
uvx singlestore-mcp-server init --client=windsurf

Manual setup: Follow Windsurf MCP documentation. Use the standard config above.

Automatic setup:

bash
uvx singlestore-mcp-server init --client=gemini

Manual setup: Follow the MCP install guide, use the standard config above.

Automatic setup:

bash
uvx singlestore-mcp-server init --client=lm-studio

Manual setup: Go to Program in the right sidebar -> Install -> Edit mcp.json. Use the standard config above.

Manual setup only: Go to Advanced settings -> Extensions -> Add custom extension. Name to your liking, use type STDIO, and set the command to uvx singlestore-mcp-server start. Click "Add Extension".

Manual setup only: Open Qodo Gen chat panel in VSCode or IntelliJ → Connect more tools → + Add new MCP → Paste the standard config above.

Click Save.

Using Docker

NOTE: An API key is required when using Docker because the OAuth flow isn't supported for servers running in Docker containers.

json
{
  "mcpServers": {
    "singlestore-mcp-server": {
      "command": "docker",
      "args": [
        "run", "-i", "--rm", "--init", "--pull=always",
        "-e", "MCP_API_KEY=your_api_key_here",
        "singlestore/mcp-server-singlestore"
      ]
    }
  }
}

You can build the Docker image yourself:

bash
docker build -t singlestore/mcp-server-singlestore .

For better security, we recommend using Docker Desktop to configure the SingleStore MCP server—see this blog post for details on Docker's new MCP Catalog.

Components

Tools

The server implements the following tools:

  • get_user_info: Retrieve details about the current user

    • No arguments required
    • Returns user information and details
  • organization_info: Retrieve details about the user's current organization

    • No arguments required
    • Returns details of the organization
  • choose_organization: Choose from available organizations (only available when API key environment variable is not set)

    • No arguments required
    • Returns a list of available organizations to choose from
  • set_organization: Set the active organization (only available when API key environment variable is not set)

    • Arguments: organization_id (string)
    • Sets the specified organization as active
  • workspace_groups_info: Retrieve details about the workspace groups accessible to the user

    • No arguments required
    • Returns details of the workspace groups
  • workspaces_info: Retrieve details about the workspaces in a specific workspace group

    • Arguments: workspace_group_id (string)
    • Returns details of the workspaces
  • resume_workspace: Resume a suspended workspace

    • Arguments: workspace_id (string)
    • Resumes the specified workspace
  • list_starter_workspaces: List all starter workspaces accessible to the user

    • No arguments required
    • Returns details of available starter workspaces
  • create_starter_workspace: Create a new starter workspace

    • Arguments: workspace configuration parameters
    • Returns details of the created starter workspace
  • terminate_starter_workspace: Terminate an existing starter workspace

    • Arguments: workspace_id (string)
    • Terminates the specified starter workspace
  • list_regions: Retrieve a list of all regions that support workspaces

    • No arguments required
    • Returns a list of available regions
  • list_sharedtier_regions: Retrieve a list of shared tier regions

    • No arguments required
    • Returns a list of shared tier regions
  • run_sql: Execute SQL operations on a connected workspace

    • Arguments: workspace_id, database, sql_query, and connection parameters
    • Returns the results of the SQL query in a structured format
  • create_notebook_file: Create a new notebook file in SingleStore Spaces

    • Arguments: notebook_name, content (optional)
    • Returns details of the created notebook
  • upload_notebook_file: Upload a notebook file to SingleStore Spaces

    • Arguments: file_path, notebook_name
    • Returns details of the uploaded notebook
  • create_job_from_notebook: Create a scheduled job from a notebook

    • Arguments: job configuration including notebook_path, schedule_mode, etc.
    • Returns details of the created job
  • get_job: Retrieve details of an existing job

    • Arguments: job_id (string)
    • Returns details of the specified job
  • delete_job: Delete an existing job

    • Arguments: job_id (string)
    • Deletes the specified job
  • stage_list_files: List files and folders in a Stage deployment's file system

    • Arguments: deployment_id (string), path (string, optional)
    • Returns folder contents including files and subfolders
  • stage_get_file: Get a file from Stage by path

    • Arguments: deployment_id (string), path (string), return_type (string: 'metadata', 'url', or 'content')
    • Returns file metadata, a download URL, or text content
  • stage_create_folder: Create a folder in Stage

    • Arguments: deployment_id (string), path (string)
    • Returns creation status
  • stage_upload_file: Upload a file to Stage with text content

    • Arguments: deployment_id (string), path (string), content (string), local_path (string)
    • Returns upload status
  • stage_move: Move or rename a file or folder in Stage

    • Arguments: deployment_id (string), source_path (string), destination_path (string)
    • Returns move status
  • stage_delete: Delete a file or folder from Stage

    • Arguments: deployment_id (string), path (string)
    • Returns deletion status

Note: Organization management tools (choose_organization and set_organization) are only available when the API key environment variable is not set, allowing for interactive organization selection during OAuth authentication.

Development

Prerequisites

  • Python >= 3.11
  • uv for dependency management

Setup

  1. Clone the repository:
bash
git clone https://github.com/singlestore-labs/mcp-server-singlestore.git
cd mcp-server-singlestore
  1. Install dependencies:
bash
uv sync --dev
  1. Set up pre-commit hooks (optional but recommended):
bash
uv run pre-commit install

Development Workflow

bash
# Quick quality checks (fast feedback)
./scripts/check.sh

# Run tests independently
./scripts/test.sh

# Comprehensive validation (before PRs)
./scripts/check-all.sh

# Create and publish releases
./scripts/release.sh

Running Tests

bash
# Run test suite with coverage
./scripts/test.sh

# Or use pytest directly
uv run pytest
uv run pytest --cov=src --cov-report=html

Code Quality

We use Ruff for both linting and formatting:

bash
# Format code
uv run ruff format src/ tests/

# Lint code
uv run ruff check src/ tests/

# Lint and fix issues automatically
uv run ruff check --fix src/ tests/

Release Process

Releases are managed through git tags and automated PyPI publication:

  1. Create release: ./scripts/release.sh (interactive tool)
  2. Automatic publication: Triggered by pushing version tags
  3. No manual PyPI uploads - fully automated pipeline

See scripts/dev-workflow.md for detailed workflow documentation.

Встановлення

TypingMind
Передумови:

Node.js 18+

{
  "mcpServers": {
    "singlestore-mcp-server": {
      "command": "uvx",
      "args": [
        "singlestore-mcp-server",
        "start"
      ]
    }
  }
}

Доступні інструменти

  • workspace_groups_info

    List all workspace groups accessible to the user in SingleStore.

    Returns detailed information for each group:

    • name: Display name of the workspace group
    • deploymentType: Type of deployment (e.g., 'PRODUCTION')
    • state: Current status (e.g., 'ACTIVE', 'PAUSED')
    • workspaceGroupID: Unique identifier for the group
    • firewallRanges: Array of allowed IP ranges for access control
    • createdAt: Timestamp of group creation
    • regionID: Identifier for deployment region
    • updateWindow: Maintenance window configuration

    Use this tool to:

    1. Get workspace group IDs for other operations
    2. Plan maintenance windows

    Related operations:

    • Use workspaces_info to list workspaces within a group
    • Use execute_sql to run queries on workspaces in a group
  • workspaces_info

    List all workspaces within a specified workspace group in SingleStore.

    Returns detailed information for each workspace:

    • createdAt: Timestamp of workspace creation
    • deploymentType: Type of deployment (e.g., 'PRODUCTION')
    • endpoint: Connection URL for database access
    • name: Display name of the workspace
    • size: Compute and storage configuration
    • state: Current status (e.g., 'ACTIVE', 'PAUSED')
    • terminatedAt: End timestamp if applicable
    • workspaceGroupID: Workspacegroup identifier
    • workspaceID: Unique workspace identifier

    Args: workspace_group_id: Unique identifier of the workspace group

    Returns: List of workspace information dictionaries

  • organization_info

    Retrieve information about the current user's organization in SingleStore.

    Returns organization details including:

    • orgID: Unique identifier for the organization
    • name: Organization display name
  • list_of_regions

    List all available deployment regions where SingleStore workspaces can be deployed for the user.

    Returns region information including:

    • regionID: Unique identifier for the region
    • provider: Cloud provider (AWS, GCP, or Azure)
    • name: Human-readable region name (e.g., Europe West 2 (London), US West 2 (Oregon))

    Use this tool to:

    1. Select optimal deployment regions based on:
      • Geographic proximity to users
      • Compliance requirements
      • Cost considerations
      • Available cloud providers
    2. Plan multi-region deployments
  • list_virtual_workspaces

    List all starter (virtual) workspaces available to the user in SingleStore.

    Returns detailed information about each starter workspace:

    • virtualWorkspaceID: Unique identifier for the workspace
    • name: Display name of the workspace
    • endpoint: Connection endpoint URL
    • databaseName: Name of the primary database
    • mysqlDmlPort: Port for MySQL protocol connections
    • webSocketPort: Port for WebSocket connections
    • state: Current status of the workspace

    Use this tool to:

    1. Get virtual workspace IDs for other operations
    2. Check starter workspace availability and status
    3. Obtain connection details for database access
  • organization_billing_usage

    Retrieve detailed billing and usage metrics for your organization over a specified time period.

    Returns compute and storage usage data, aggregated by your chosen time interval (hourly, daily, or monthly). This tool is essential for:

    1. Monitoring resource consumption patterns
    2. Analyzing cost trends

    Args: start_time: Beginning of the usage period (UTC ISO 8601 format, e.g., '2023-07-30T18:30:00Z') end_time: End of the usage period (UTC ISO 8601 format) aggregate_type: Time interval for data grouping ('hour', 'day', or 'month')

    Returns: Usage metrics and billing information

  • list_notebook_samples

    Retrieve a catalog of pre-built notebook templates available in SingleStore Spaces.

    Returns for each notebook:

    • name: Template name and title
    • description: Detailed explanation of the notebook's purpose
    • contentURL: Direct download link for the notebook
    • likes: Number of user endorsements
    • views: Number of times viewed
    • downloads: Number of times downloaded
    • tags: List of Notebook tags

    Common template categories include:

    1. Getting Started guides
    2. Data loading and ETL patterns
    3. Query optimization examples
    4. Machine learning integrations
    5. Performance monitoring
    6. Best practices demonstrations
  • list_shared_files

    List all files and notebooks in your shared SingleStore space.

    Returns file object meta data for each file:

    • name: Name of the file (e.g., 'analysis.ipynb')
    • path: Full path in shared space (e.g., 'folder/analysis.ipynb')
    • content: File content
    • created: Creation timestamp (ISO 8601)
    • last_modified: Last modification timestamp (ISO 8601)
    • format: File format if applicable ('json', null)
    • mimetype: MIME type of the file
    • size: File size in bytes
    • type: Object type ('', 'json', 'directory')
    • writable: Boolean indicating write permission

    Use this tool to:

    1. List workspace contents and structure
    2. Verify file existence before operations
    3. Check file timestamps and sizes
    4. Determine file permissions
  • create_notebook

    Create a new Jupyter notebook in your personal space. Only supports python and markdown.

    Parameters:

    • notebook_name (required): Name for the new notebook

      • Can include or omit .ipynb extension
      • Must be unique in your personal space
    • content (optional): JSON object with the following structure: { "cells": [ {"type": "markdown", "content": "Markdown content here"}, {"type": "code", "content": "Python code here"} ] }

      • 'type' must be either 'markdown' or 'code'
      • 'content' is the text content of the cell IMPORTANT: The content must be valid JSON.

    How to use: - Before creating the notebook, call check_if_file_exists tool to verify if the notebook already exists. - Always install the dependencies on the first cell. Example: { "cells": [ {"type": "code", "content": "!pip install singlestoredb --quiet"}, // other cells... ] } - To connect to

  • check_if_file_exists

    Check if a file (notebook) exists in the user's shared space.

    Args: file_name: Name of the file to check (with or without .ipynb extension)

    Returns: JSON object with the file existence status { "exists": True/False, "message": "File exists" or "File does not exist" }

  • create_scheduled_job

    Create an automated job to execute a SingleStore notebook on a schedule.

    Parameters:

    • notebook_path: Complete path to the notebook
    • mode: 'Once' for single execution or 'Recurring' for repeated runs
    • create_snapshot: Enable notebook backup before execution (default: True)

    Returns Job info with:

    • jobID: UUID of created job
    • status: Current state (SUCCESS, RUNNING, etc.)
    • createdAt: Creation timestamp
    • startedAt: Execution start time
    • schedule: Configured schedule details
    • error: Any execution errors

    Common Use Cases:

    1. Automated Data Processing:

      • ETL workflows
      • Data aggregation
      • Database maintenance
    2. Scheduled Reporting:

      • Performance metrics
      • Business analytics
      • Usage statistics
    3. Maintenance Tasks:

      • Health checks
      • Backup operations
      • Clean-up routines

    Related Operations:

    • get_job_details: Monitor job
    • list_job_executions: View job execution history
  • get_job_details

    Retrieve comprehensive information about a scheduled notebook job.

    Returns:

    • jobID: Unique identifier (UUID format)
    • name: Display name of the job
    • description: Human-readable job description
    • createdAt: Creation timestamp (ISO 8601)
    • terminatedAt: End timestamp if completed
    • completedExecutionsCount: Number of successful runs
    • enqueuedBy: User ID who created the job
    • executionConfig: Notebook path and runtime settings
    • schedule: Mode, interval, and start time
    • targetConfig: Database and workspace settings
    • jobMetadata: Execution statistics and status

    Args: job_id: UUID of the scheduled job to retrieve details for

    Returns: Dictionary with job details

  • list_job_executions

    Retrieve execution history and performance metrics for a scheduled notebook job.

    Returns:

    • executions: Array of execution records containing:
      • executionID: Unique identifier for the execution
      • executionNumber: Sequential number of the run
      • jobID: Parent job identifier
      • status: Current state (Scheduled, Running, Completed, Failed)
      • startedAt: Execution start time (ISO 8601)
      • finishedAt: Execution end time (ISO 8601)
      • scheduledStartTime: Planned start time
      • snapshotNotebookPath: Backup notebook path if enabled

    Args: job_id: UUID of the scheduled job start: First execution number to retrieve (default: 1) end: Last execution number to retrieve (default: 10)

    Returns: Dictionary with execution records

  • get_notebook_path

    Find the complete path of a notebook by its name and generate the properly formatted path for API operations.

    Args: notebook_name: The name of the notebook to find (with or without .ipynb extension) location: Where to look for the notebook - 'personal' or 'shared'

    Returns: Properly formatted path including project ID and user ID where needed

    Required for:

    • Creating scheduled jobs (use returned path as notebook_path parameter)
  • get_organizations

    List all available SingleStore organizations your account has access to.

    After logging in, this tool must be called first to identify which organization your queries should run against. Returns a list of organizations with:

    • orgID: Unique identifier for the organization
    • name: Display name of the organization

    Use this tool when:

    1. Starting a new session to see available organizations
    2. To verify permissions across multiple organizations
    3. Before switching context to a different organization

    After viewing the list, the tool will prompt you to select an organization:

    • If only one organization is available, it will be selected automatically
    • If multiple organizations are available, you'll be prompted to select one by name or ID
    • You can change your organization selection anytime using the set_organization tool
    • If no organizations are available, an error will be returned
  • set_organization

    Select which SingleStore organization to use for all subsequent API calls.

    This tool must be called after logging in and before making other API requests. Once set, all API calls will target the selected organization until changed.

    Args: orgID: Name or ID of the organization to select (use get_organizations to see available options)

    Returns: Success message with the selected organization details

    Usage:

    • Call get_organizations first to see available options
    • Then call this tool with either the organization's name or ID
    • All subsequent API calls will use the selected organization
    • You can call this tool anytime to switch to a different organization

Використовуйте MCP SingleStore з різними моделями ШІ

TypingMind підключає інструменти MCP на рівні робочого простору, тож після підключення SingleStore ви можете використовувати їх із різними моделями ШІ в TypingMind, а не налаштовувати окремо для кожної моделі. Ця інтеграція MCP працює локально через конектор MCP TypingMind на вашому пристрої.

Інструкція з налаштування локального конектора

Виберіть цей варіант, якщо серверу MCP потрібен доступ до локальних файлів, програм або приватних ресурсів на вашому комп’ютері.

1

Відкрийте налаштування MCP

У TypingMind перейдіть до розділу «Налаштування», відкрийте «Розширені налаштування», потім «Протокол контексту моделі» й виберіть «Параметри конектора».

  1. Відкрийте TypingMind у браузері.
  2. Натисніть значок налаштувань.
  3. Перейдіть до розділу «Розширені налаштування».
  4. Відкрийте розділ «Протокол контексту моделі».
  5. Натисніть «Параметри конектора» й виберіть «Цей пристрій».
Екран налаштування конектора MCP у TypingMind з вибраним варіантом «Цей пристрій»
2

Виконайте команду конектора

Виберіть «Цей пристрій», скопіюйте команду з TypingMind і виконайте її в терміналі. Не зупиняйте процес, поки користуєтеся MCP.

  1. Скопіюйте команду налаштування, показану в TypingMind.
  2. Відкрийте «Термінал» у macOS або Windows Terminal у Windows.
  3. Вставте й виконайте команду.
  4. Підтвердьте встановлення пакета, якщо термінал запитає дозволу продовжити.
  5. Не закривайте вікно термінала й не зупиняйте процес, поки користуєтеся інструментами MCP.
3

Додайте SingleStore як сервер

Коли статус конектора зміниться на «Готово», натисніть «Змінити сервери» та вставте конфігурацію сервера MCP.

  1. Зачекайте, доки статус конектора зміниться на «Готово».
  2. Натисніть «Змінити сервери».
  3. Вставте конфігурацію сервера MCP SingleStore.
  4. Збережіть список серверів.
  5. Оновіть дані, щоб переконатися, що конектор досі готовий до роботи.
Налаштування MCP у TypingMind з активним сервером і кнопкою «Змінити сервери»
{
  "mcpServers": {
    "singlestore": {
      "command": "npx",
      "args": [
        "-y",
        "singlestore-mcp-server"
      ]
    }
  }
}
4

Використовуйте підключення з різними моделями

Збережіть список серверів, відкрийте «Плагіни», увімкніть інструменти MCP для SingleStore, а потім виберіть будь-яку підтримувану модель ШІ в TypingMind і використовуйте інструменти в чаті або призначте їх агенту ШІ.

  1. Відкрийте сторінку «Плагіни» в TypingMind.
  2. Увімкніть інструменти MCP для SingleStore.
  3. Почніть чат і виберіть модель ШІ, яку хочете використовувати.
  4. Використовуйте інструменти MCP у чаті або призначте їх агенту ШІ.
  5. За потреби перемикайтеся на іншу модель ШІ без повторного підключення MCP.
Чат TypingMind із використанням увімкнених інструментів MCP і вибраної моделі ШІ
Допоможете з цим завданням через SingleStore?
SingleStore
Звісно. Я це прочитав.
Ось що я знайшов за допомогою SingleStore.

Поширені запитання

Для чого використовується сервер MCP SingleStore?

SingleStore — це сервер MCP, який дає змогу сумісним клієнтам ШІ підключатися до зовнішніх інструментів і контексту. У TypingMind ви можете додати цей сервер MCP один раз і зробити його інструменти доступними у своєму робочому просторі ШІ.

Чи можу я використовувати MCP SingleStore з кількома моделями ШІ в TypingMind?

Так. TypingMind підключає інструменти MCP на рівні робочого простору, тому ви можете використовувати SingleStore з різними моделями ШІ, як-от Claude, ChatGPT, Gemini або іншими моделями, які ви налаштували в TypingMind, без окремого налаштування сервера MCP для кожної моделі.

Навіщо використовувати MCP SingleStore із TypingMind?

TypingMind — один із найкращих інтерфейсів для чату з великими мовними моделями, адже він об’єднує різні моделі ШІ, промпти, плагіни, агентів ШІ, ключі API та інструменти MCP в одному робочому просторі. Підключивши SingleStore, ви зможете використовувати його інструменти MCP з вибраними моделями та впорядковано працювати з чатами в TypingMind.

Як підключити MCP SingleStore до TypingMind?

SingleStore працює через локальний конектор MCP TypingMind. Це найкращий варіант, коли серверу MCP потрібен доступ до локальних файлів, настільних застосунків, інструментів командного рядка або приватних ресурсів на вашому комп’ютері.

Які інструменти надає MCP SingleStore у TypingMind?

SingleStore надає інструменти MCP (16), які можна ввімкнути на сторінці «Плагіни» в TypingMind і використовувати в чаті або призначати агентам ШІ.

Чи потрібно передавати свої ключі API в TypingMind, щоб використовувати MCP SingleStore?

Ні. TypingMind орієнтований насамперед на локальну роботу й дає змогу зберігати контроль над постачальниками моделей, ключами API, промптами та конфігурацією MCP. Якщо SingleStore потребує автентифікації, під час створення підключення додайте потрібні заголовки, налаштування OAuth або локальну конфігурацію для цього сервера MCP.

Схожі сервери MCP

Усі

Створіть власний ШІ-простір уже зараз

Підпишіться на нашу розсилку, щоб дізнаватися про нові функції та майбутні розіграші 👇