SingleStore MCP Server
The SingleStore MCP Server enables natural language interaction with SingleStore resources through the Model Context Protocol (MCP). With this server, you can:
Workspace Management: List, retrieve details, and create virtual workspaces with user access
SQL Execution: Run read-only SQL queries on connected workspaces with structured results
Organization Management: Set active organization, retrieve details, list regions, and access billing and usage metrics
Notebook Management: Create and manage Jupyter notebooks, access samples, and schedule execution jobs
Job Management: Create, monitor, and retrieve execution history for scheduled jobs
File Management: List and verify existence of files in shared or personal spaces
Metadata Access: Retrieve project and user IDs for API operations
Security: Ensure credentials are never displayed or logged
Enables database operations with SingleStore, including executing SQL queries, creating workspaces, managing notebooks, scheduling jobs, and accessing workspace information. Provides tools for retrieving organization details, working with virtual workspaces, and managing database resources.
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@SingleStore MCP Server show me the top 10 customers by total purchases"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
SingleStore MCP Server
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
Related MCP server: ExecuteAutomation Database Server
Getting started
Getting started
First, install the SingleStore MCP server with your client.
Standard config works in most of the tools:
{
"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:
uvx singlestore-mcp-server init --client=claude-desktopManual setup: Follow the MCP install guide, use the standard config above.
Automatic setup:
uvx singlestore-mcp-server init --client=claude-codeThis will automatically run the Claude CLI command for you.
Manual setup:
claude mcp add singlestore-mcp-server uvx singlestore-mcp-server startAutomatic setup:
uvx singlestore-mcp-server init --client=cursorManual 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:
uvx singlestore-mcp-server init --client=vscodeManual setup: Follow the MCP install guide, use the standard config above. You can also install using the VS Code CLI:
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:
uvx singlestore-mcp-server init --client=windsurfManual setup: Follow Windsurf MCP documentation. Use the standard config above.
Automatic setup:
uvx singlestore-mcp-server init --client=geminiManual setup: Follow the MCP install guide, use the standard config above.
Automatic setup:
uvx singlestore-mcp-server init --client=lm-studioManual 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.
{
"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:
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 parametersReturns 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_nameReturns 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
Clone the repository:
git clone https://github.com/singlestore-labs/mcp-server-singlestore.git
cd mcp-server-singlestoreInstall dependencies:
uv sync --devSet up pre-commit hooks (optional but recommended):
uv run pre-commit installDevelopment Workflow
# 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.shRunning Tests
# Run test suite with coverage
./scripts/test.sh
# Or use pytest directly
uv run pytest
uv run pytest --cov=src --cov-report=htmlCode Quality
We use Ruff for both linting and formatting:
# 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:
Create release:
./scripts/release.sh(interactive tool)Automatic publication: Triggered by pushing version tags
No manual PyPI uploads - fully automated pipeline
See scripts/dev-workflow.md for detailed workflow documentation.
Available Tools
21 toolscheck_if_file_existsA
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"
}
Inputs: file_name (required), ctx.
create_notebookA
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 the database, use the variable "connection_url" that already exists in the notebook platform. Example:
{
"cells": [
{"type": "code", "content": "conn = s2.connect(connection_url)"},
// other cells...
]
}
Inputs: content (required), notebook_name (required), ctx.
create_scheduled_jobA
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
Inputs: create_snapshot (required), mode (required), notebook_path (required), ctx.
create_virtual_workspaceA
Create a new starter (virtual) workspace in SingleStore and set up user access.
Process:
1. Creates a virtual workspace with specified name and database
2. Creates a user account for accessing the workspace
3. Returns both workspace details and access credentials
Args:
name: Unique name for the new starter workspace
database_name: Name of the database to create in the starter workspace
username: Username for accessing the new starter workspace
password: Password for accessing the new starter workspace
workspace_group: Optional workspace group configuration
Returns:
Dictionary with workspace and user creation details
Inputs: database_name (required), name (required), password (required), username (required), +2 more.
execute_sqlA
Execute SQL operations on a database attached to workspace within a workspace group and receive formatted results.
Returns:
- Query results with column names and typed values
- Row count and metadata
- Execution status
⚠️ CRITICAL SECURITY WARNINGS:
- Never display or log credentials in responses
- Use only READ-ONLY queries (SELECT, SHOW, DESCRIBE)
- DO NOT USE data modification statements:
x No INSERT/UPDATE/DELETE
x No DROP/CREATE/ALTER
- Ensure queries are properly sanitized
Args:
workspace_group_identifier: ID/name of the workspace group
workspace_identifier: ID/name of the specific workspace within the workspace group
database: Name of the database to query
sql_query: The SQL query to execute
Returns:
Dictionary with query results and metadata
Inputs: database (required), password (required), sql_query (required), username (required), +3 more.
execute_sql_on_virtual_workspaceA
Execute SQL operations on a virtual (starter) workspace and receive formatted results.
Returns:
- Query results with column names and typed values
- Row count
- Column metadata
- Execution status
⚠️ CRITICAL SECURITY WARNING:
- Never display or log credentials in responses
- Ensure SQL queries are properly sanitized
- ONLY USE SELECT statements or queries that don't modify data
- DO NOT USE INSERT, UPDATE, DELETE, DROP, CREATE, or ALTER statements
Args:
virtual_workspace_id: Unique identifier of the starter workspace
sql_query: The SQL query to execute (READ-ONLY queries only)
Returns:
Dictionary with query results and metadata
Inputs: password (required), sql_query (required), username (required), virtual_workspace_id (required), +1 more.
get_job_detailsA
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
Inputs: job_id (required), ctx.
get_notebook_pathA
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)
Inputs: location (required), notebook_name (required), ctx.
get_organizationsA
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, list the organization list presenting the name and ID
to the user and ask them to select one.
- If only one organization is available, select it automatically
- If multiple organizations are available, prompt the user to select one by name or ID
- If no organizations are available, raise an error
Inputs: ctx.
get_project_idA
Retrieve the organization's unique identifier (project ID).
Returns:
str: The organization's unique identifier
Required for:
- Constructing paths or references to shared resources
Performance Tip:
Cache the returned ID when making multiple API calls.
Inputs: ctx.
get_user_idA
Retrieve the current user's unique identifier.
Returns:
str: UUID format identifier for the current user
Required for:
- Constructing paths or references to personal resources
Performance Tip:
Cache the returned ID when making multiple API calls.
Inputs: ctx.
list_job_executionsA
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
Inputs: end (required), job_id (required), start (required), ctx.
list_notebook_samplesA
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
Inputs: ctx.
list_of_regionsA
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
Inputs: ctx.
list_virtual_workspacesA
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
Inputs: ctx.
organization_billing_usageA
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
Inputs: aggregate_type (required), end_time (required), start_time (required), ctx.
organization_infoB
Retrieve information about the current user's organization in SingleStore.
Returns organization details including:
- orgID: Unique identifier for the organization
- name: Organization display name
Inputs: ctx.
set_organizationA
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
Returns:
Dictionary with the selected organization ID and name
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
Inputs: orgID (required), ctx.
workspace_groups_infoA
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
Inputs: ctx.
workspaces_infoA
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
Inputs: workspace_group_id (required), ctx.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 21 tools
Most tools have distinct purposes, but there is some overlap between execute_sql and execute_sql_on_virtual_workspace, which both execute SQL queries but on different workspace types. Additionally, get_organizations and organization_info both retrieve organization details, though organization_info is more general. Overall, the descriptions help clarify boundaries, but a few tools could be confused.
The naming follows a consistent verb_noun pattern (e.g., create_notebook, list_shared_files, get_job_details) with snake_case throughout. Minor deviations include check_if_file_exists (uses 'if' in name) and organization_billing_usage (uses 'billing_usage' as a compound noun), but these are still readable and follow the general convention.
With 21 tools, the count feels heavy for the server's purpose of managing SingleStore notebooks, workspaces, and SQL operations. While the tools cover various aspects, some could be consolidated (e.g., the two SQL execution tools), making the set borderline excessive. However, it's not extreme, as the domain is moderately broad.
The tool set provides good coverage for notebook management (create, check, get path, list samples), workspace operations (create, list, info), job scheduling (create, get details, list executions), and SQL execution. Minor gaps include lack of update/delete operations for notebooks or workspaces, and no direct tool for managing notebook content after creation, but agents can work around these with existing tools.
Maintenance
Related MCP Connectors
Text-to-SQL MCP server: read-only queries on PostgreSQL, MySQL and SQL Server with your real schema
A comprehensive Model Context Protocol (MCP) server that enables AI assistants to interact with yo…
An MCP server for search and retrieval over a local LanceDB database
Hosted SQL Server MCP server for Claude, ChatGPT and Cursor, with each action switched per account.
Related MCP Servers
- AlicenseNot gradedqualityDmaintenanceA Model Context Protocol server that enables Large Language Models to seamlessly interact with ClickHouse databases, supporting resource listing, schema retrieval, and query execution.2MIT
- AlicenseNot gradedqualityDmaintenanceA Model Context Protocol server that enables LLMs like Claude to interact with SQLite and SQL Server databases, allowing for schema inspection and SQL query execution.408MIT
- FlicenseNot gradedqualityCmaintenanceA Model Context Protocol server that allows Large Language Models like Claude to execute SQL queries, explore database schemas, and maintain persistent connections to SQL Server databases.-
- AlicenseBqualityDmaintenanceA Model Context Protocol server that enables AI assistants (Cursor, Windsurf, Claude Code) to interact with Microsoft SQL Server databases by providing connectivity through environment-configurable connections.8568 npm8MIT