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
链接
  • 将工具接入 AI 工作流

    SingleStore 提供 MCP 功能,可供兼容的 AI 客户端和智能体使用。

  • 16 个可用工具

    浏览下方可调用的操作;如果服务器提供了名称和描述,也会一并显示。

  • 可直接复制的配置

    使用安装配置片段,在您首选的 MCP 客户端中配置此服务器。

  • 开源社区热度

    关联的代码仓库有 34 个 Star 和 17 个 Fork。

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

将 SingleStore MCP 与多个 AI 模型配合使用

TypingMind 在工作区级别连接 MCP 工具,因此连接 SingleStore 后,您就可以在 TypingMind 中搭配不同的 AI 模型使用,无需为每个模型单独设置。 此 MCP 通过您设备上的 TypingMind MCP 连接器在本地运行。

本地连接器设置指南

如果 MCP 服务器需要访问您电脑上的本地文件、应用或私有资源,请选择此方式。

1

打开 MCP 设置

在 TypingMind 中,依次前往“设置”、“高级设置”和“模型上下文协议”,然后选择“设置连接器”。

  1. 在您的浏览器中打开 TypingMind。
  2. 点击“设置”图标。
  3. 进入“高级设置”。
  4. 打开“模型上下文协议”部分。
  5. 点击“设置连接器”,然后选择“此设备”。
TypingMind MCP 连接器设置界面,已选择“此设备”
2

运行连接器命令

选择“此设备”,从 TypingMind 复制命令并在终端中运行。使用 MCP 时,请保持该进程运行。

  1. 复制 TypingMind 显示的设置命令。
  2. 在 macOS 上打开“终端”,或在 Windows 上打开 Windows Terminal。
  3. 粘贴并运行命令。
  4. 如果终端询问您是否继续,请确认安装软件包。
  5. 使用 MCP 工具时,请保持终端窗口及其中的进程运行。
3

将 SingleStore 添加为服务器

当连接器状态为“就绪”时,点击“编辑服务器”,然后粘贴 MCP 服务器配置。

  1. 等待连接器状态显示为“就绪”。
  2. 点击“编辑服务器”。
  3. 粘贴 SingleStore MCP 服务器配置。
  4. 保存服务器列表。
  5. 如需确认连接器是否仍处于就绪状态,请刷新。
TypingMind MCP 设置界面,显示正在运行的服务器和“编辑服务器”按钮
{
  "mcpServers": {
    "singlestore": {
      "command": "npx",
      "args": [
        "-y",
        "singlestore-mcp-server"
      ]
    }
  }
}
4

在不同模型中使用同一连接

保存服务器列表,打开“插件”,启用 SingleStore MCP 工具,然后在 TypingMind 中选择任意受支持的 AI 模型,即可在聊天中使用这些工具,或将其分配给智能体。

  1. 在 TypingMind 中打开“插件”页面。
  2. 启用 SingleStore MCP 工具。
  3. 开始聊天并选择您想使用的 AI 模型。
  4. 在聊天中使用 MCP 工具,或将其分配给 AI 智能体。
  5. 根据需要随时切换到其他 AI 模型,无需重新连接 MCP。
在 TypingMind 聊天中使用已启用的 MCP 工具和选定的 AI 模型
您能使用 SingleStore 帮我完成这项任务吗?
SingleStore
当然。我已阅读。
以下是我使用 SingleStore 得到的结果。

常见问题

SingleStore MCP 服务器有什么用途?

SingleStore 是一个 MCP 服务器,可让兼容的 AI 客户端连接外部工具并获取上下文。在 TypingMind 中,只需添加一次此 MCP 服务器,即可在您的 AI 工作区中使用其工具。

可以在 TypingMind 中让多个 AI 模型使用 SingleStore MCP 吗?

可以。TypingMind 在工作区层面连接 MCP 工具,因此您可以让 Claude、ChatGPT、Gemini 等不同 AI 模型,或您在 TypingMind 中配置的其他模型使用 SingleStore,而无需为每个模型单独配置 MCP 服务器。

为什么在 TypingMind 中使用 SingleStore MCP?

TypingMind 将多个 AI 模型、提示词、插件、AI 智能体、API 密钥和 MCP 工具整合到同一个工作区中,是优秀的大语言模型聊天前端之一。连接 SingleStore 后,您可以在偏好的不同模型中使用其 MCP 工具,同时在 TypingMind 中井然有序地管理聊天工作流程。

如何将 SingleStore MCP 连接到 TypingMind?

SingleStore 通过 TypingMind 本地 MCP 连接器运行。当 MCP 服务器需要访问您计算机上的本地文件、桌面应用、命令行工具或私有资源时,这种方式最合适。

SingleStore MCP 在 TypingMind 中提供哪些工具?

SingleStore 提供 16 个 MCP 工具,您可以在 TypingMind 的插件页面启用这些工具,然后在聊天中使用,或将其分配给 AI 智能体。

使用 SingleStore MCP 需要向 TypingMind 提供我的 API 密钥吗?

不需要。TypingMind 采用本地优先的设计,让您自行掌控模型提供商、API 密钥、提示词和 MCP 配置。如果 SingleStore 需要身份验证,请在创建连接时,为该 MCP 服务器添加所需的请求头、OAuth 设置或本地配置。

相关 MCP 服务器

查看全部

立即创建您自己的 AI 工作区

订阅我们的电子简报,获取新功能和后续赠奖活动的通知 👇