SingleStore MCP Server
Servidor MCP de SingleStore
El Protocolo de Contexto de Modelo (MCP) es un protocolo estandarizado diseñado para gestionar el contexto entre modelos de lenguaje grandes (LLMs) y sistemas externos. Este repositorio proporciona un instalador y un servidor MCP para SingleStore, permitiendo una integración fluida.
Con MCP, puedes usar Claude Desktop, Claude Code, Cursor o cualquier cliente MCP compatible para interactuar con SingleStore usando lenguaje natural, facilitando la realización de operaciones complejas sin esfuerzo.
💡 Consejo profesional: ¿No estás seguro de lo que puede hacer el servidor MCP? ¡Solo llama al prompt /help en tu chat!
Requisitos
Python >= v3.10.0
uvx instalado en tu entorno de Python
VS Code, Cursor, Windsurf, Claude Desktop, Claude Code, Goose o cualquier otro cliente MCP
Related MCP server: ExecuteAutomation Database Server
Primeros pasos
Primero, instala el servidor MCP de SingleStore con tu cliente.
La configuración estándar funciona en la mayoría de las herramientas:
{
"mcpServers": {
"singlestore-mcp-server": {
"command": "uvx",
"args": [
"singlestore-mcp-server",
"start"
]
}
}
}¡No se requieren claves API, tokens ni variables de entorno! El servidor gestiona automáticamente la autenticación mediante OAuth del navegador cuando se inicia.
Configuración automática:
uvx singlestore-mcp-server init --client=claude-desktopConfiguración manual: Sigue la guía de instalación de MCP, usa la configuración estándar anterior.
Configuración automática:
uvx singlestore-mcp-server init --client=claude-codeEsto ejecutará automáticamente el comando CLI de Claude por ti.
Configuración manual:
claude mcp add singlestore-mcp-server uvx singlestore-mcp-server startConfiguración automática:
uvx singlestore-mcp-server init --client=cursorConfiguración manual:
Ve a Cursor Settings -> MCP -> Add new MCP Server. Ponle el nombre que prefieras, usa el tipo command con el comando uvx singlestore-mcp-server start. También puedes verificar la configuración o añadir argumentos de línea de comandos haciendo clic en Edit.
Configuración automática:
uvx singlestore-mcp-server init --client=vscodeConfiguración manual: Sigue la guía de instalación de MCP, usa la configuración estándar anterior. También puedes instalar usando la CLI de VS Code:
code --add-mcp '{"name":"singlestore-mcp-server","command":"uvx","args":["singlestore-mcp-server","start"]}'Después de la instalación, el servidor MCP de SingleStore estará disponible para su uso con tu agente de GitHub Copilot en VS Code.
Configuración automática:
uvx singlestore-mcp-server init --client=windsurfConfiguración manual: Sigue la documentación de MCP de Windsurf. Usa la configuración estándar anterior.
Configuración automática:
uvx singlestore-mcp-server init --client=geminiConfiguración manual: Sigue la guía de instalación de MCP, usa la configuración estándar anterior.
Configuración automática:
uvx singlestore-mcp-server init --client=lm-studioConfiguración manual:
Ve a Program en la barra lateral derecha -> Install -> Edit mcp.json. Usa la configuración estándar anterior.
Solo configuración manual:
Ve a Advanced settings -> Extensions -> Add custom extension. Ponle el nombre que prefieras, usa el tipo STDIO y establece el command en uvx singlestore-mcp-server start. Haz clic en "Add Extension".
Solo configuración manual: Abre el panel de chat de Qodo Gen en VSCode o IntelliJ → Connect more tools → + Add new MCP → Pega la configuración estándar anterior.
Haz clic en Save.
Uso de Docker
NOTA: Se requiere una clave API al usar Docker porque el flujo de OAuth no es compatible con servidores que se ejecutan en contenedores Docker.
{
"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"
]
}
}
}Puedes construir la imagen de Docker tú mismo:
docker build -t singlestore/mcp-server-singlestore .Para una mayor seguridad, recomendamos usar Docker Desktop para configurar el servidor MCP de SingleStore; consulta esta entrada de blog para obtener detalles sobre el nuevo Catálogo MCP de Docker.
Componentes
Herramientas
El servidor implementa las siguientes herramientas:
get_user_info: Recupera detalles sobre el usuario actual
No requiere argumentos
Devuelve información y detalles del usuario
organization_info: Recupera detalles sobre la organización actual del usuario
No requiere argumentos
Devuelve detalles de la organización
choose_organization: Elige entre las organizaciones disponibles (solo disponible cuando no se ha establecido la variable de entorno de la clave API)
No requiere argumentos
Devuelve una lista de organizaciones disponibles para elegir
set_organization: Establece la organización activa (solo disponible cuando no se ha establecido la variable de entorno de la clave API)
Argumentos:
organization_id(cadena)Establece la organización especificada como activa
workspace_groups_info: Recupera detalles sobre los grupos de espacios de trabajo accesibles para el usuario
No requiere argumentos
Devuelve detalles de los grupos de espacios de trabajo
workspaces_info: Recupera detalles sobre los espacios de trabajo en un grupo de espacios de trabajo específico
Argumentos:
workspace_group_id(cadena)Devuelve detalles de los espacios de trabajo
resume_workspace: Reanuda un espacio de trabajo suspendido
Argumentos:
workspace_id(cadena)Reanuda el espacio de trabajo especificado
list_starter_workspaces: Lista todos los espacios de trabajo de inicio accesibles para el usuario
No requiere argumentos
Devuelve detalles de los espacios de trabajo de inicio disponibles
create_starter_workspace: Crea un nuevo espacio de trabajo de inicio
Argumentos: parámetros de configuración del espacio de trabajo
Devuelve detalles del espacio de trabajo de inicio creado
terminate_starter_workspace: Termina un espacio de trabajo de inicio existente
Argumentos:
workspace_id(cadena)Termina el espacio de trabajo de inicio especificado
list_regions: Recupera una lista de todas las regiones que admiten espacios de trabajo
No requiere argumentos
Devuelve una lista de regiones disponibles
list_sharedtier_regions: Recupera una lista de regiones de nivel compartido
No requiere argumentos
Devuelve una lista de regiones de nivel compartido
run_sql: Ejecuta operaciones SQL en un espacio de trabajo conectado
Argumentos:
workspace_id,database,sql_queryy parámetros de conexiónDevuelve los resultados de la consulta SQL en un formato estructurado
create_notebook_file: Crea un nuevo archivo de cuaderno en SingleStore Spaces
Argumentos:
notebook_name,content(opcional)Devuelve detalles del cuaderno creado
upload_notebook_file: Sube un archivo de cuaderno a SingleStore Spaces
Argumentos:
file_path,notebook_nameDevuelve detalles del cuaderno subido
create_job_from_notebook: Crea un trabajo programado a partir de un cuaderno
Argumentos: configuración del trabajo incluyendo
notebook_path,schedule_mode, etc.Devuelve detalles del trabajo creado
get_job: Recupera detalles de un trabajo existente
Argumentos:
job_id(cadena)Devuelve detalles del trabajo especificado
delete_job: Elimina un trabajo existente
Argumentos:
job_id(cadena)Elimina el trabajo especificado
stage_list_files: Lista archivos y carpetas en el sistema de archivos de un despliegue de Stage
Argumentos:
deployment_id(cadena),path(cadena, opcional)Devuelve el contenido de la carpeta incluyendo archivos y subcarpetas
stage_get_file: Obtiene un archivo de Stage por ruta
Argumentos:
deployment_id(cadena),path(cadena),return_type(cadena: 'metadata', 'url' o 'content')Devuelve metadatos del archivo, una URL de descarga o contenido de texto
stage_create_folder: Crea una carpeta en Stage
Argumentos:
deployment_id(cadena),path(cadena)Devuelve el estado de creación
stage_upload_file: Sube un archivo a Stage con contenido de texto
Argumentos:
deployment_id(cadena),path(cadena),content(cadena),local_path(cadena)Devuelve el estado de subida
stage_move: Mueve o renombra un archivo o carpeta en Stage
Argumentos:
deployment_id(cadena),source_path(cadena),destination_path(cadena)Devuelve el estado del movimiento
stage_delete: Elimina un archivo o carpeta de Stage
Argumentos:
deployment_id(cadena),path(cadena)Devuelve el estado de eliminación
Nota: Las herramientas de gestión de la organización (choose_organization y set_organization) solo están disponibles cuando no se ha establecido la variable de entorno de la clave API, lo que permite la selección interactiva de la organización durante la autenticación OAuth.
Desarrollo
Requisitos previos
Python >= 3.11
uv para la gestión de dependencias
Configuración
Clona el repositorio:
git clone https://github.com/singlestore-labs/mcp-server-singlestore.git
cd mcp-server-singlestoreInstala las dependencias:
uv sync --devConfigura los hooks de pre-commit (opcional pero recomendado):
uv run pre-commit installFlujo de trabajo de desarrollo
# 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.shEjecución de pruebas
# Run test suite with coverage
./scripts/test.sh
# Or use pytest directly
uv run pytest
uv run pytest --cov=src --cov-report=htmlCalidad del código
Usamos Ruff tanto para linting como para formateo:
# 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/Proceso de lanzamiento
Los lanzamientos se gestionan a través de etiquetas de git y publicación automatizada en PyPI:
Crear lanzamiento:
./scripts/release.sh(herramienta interactiva)Publicación automática: Activada al enviar etiquetas de versión
Sin subidas manuales a PyPI: tubería totalmente automatizada
Consulta scripts/dev-workflow.md para obtener documentación detallada del flujo de trabajo.
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