The public surface of ShardingSphere-MCP is defined by descriptors under META-INF/shardingsphere-mcp/mcp-descriptors.
The MCP runtime uses these descriptors to publish tools, resources, resource templates, prompts, and completions.
ShardingSphere-MCP targets MCP protocol revision 2025-11-25.
Enabled:
resources/listresources/templates/listresources/readtools/listtools/callprompts/listprompts/getcompletion/completeNot implemented or future scope:
notifications/message.progress.notifications/cancelled.icons and Tool.execution fields until the MCP Java SDK boundary exposes them.roots and sampling are client capabilities.
ShardingSphere-MCP does not require roots and does not send sampling/createMessage requests.
database_gateway_search_metadata
database, schema, query, and object_types.object_types supports database, schema, table, view, column, index, and sequence.database_gateway_execute_query
SELECT or EXPLAIN ANALYZE.max_rows range is 0..5000; omitted or 0 uses the server default 100.timeout_ms range is 0..300000; 0 means no explicit timeout.database_gateway_execute_update
execution_mode=preview only classifies the SQL and previews the side-effect scope.execution_mode=execute executes the SQL after review.database_gateway_apply_workflow
execution_mode supports preview, review-then-execute, and manual-only.approved_steps must use approval steps returned by preview.database_gateway_validate_workflow
Feature plugin planning tools:
database_gateway_plan_encrypt_ruledatabase_gateway_plan_mask_ruleRuntime and capability:
shardingsphere://capabilitiesshardingsphere://runtimeshardingsphere://databasesshardingsphere://databases/{database}shardingsphere://databases/{database}/capabilitiesMetadata:
shardingsphere://databases/{database}/schemasshardingsphere://databases/{database}/schemas/{schema}shardingsphere://databases/{database}/schemas/{schema}/tablesshardingsphere://databases/{database}/schemas/{schema}/tables/{table}shardingsphere://databases/{database}/schemas/{schema}/tables/{table}/columnsshardingsphere://databases/{database}/schemas/{schema}/tables/{table}/columns/{column}shardingsphere://databases/{database}/schemas/{schema}/tables/{table}/indexesshardingsphere://databases/{database}/schemas/{schema}/tables/{table}/indexes/{index}shardingsphere://databases/{database}/schemas/{schema}/viewsshardingsphere://databases/{database}/schemas/{schema}/views/{view}shardingsphere://databases/{database}/schemas/{schema}/views/{view}/columnsshardingsphere://databases/{database}/schemas/{schema}/views/{view}/columns/{column}shardingsphere://databases/{database}/schemas/{schema}/sequencesshardingsphere://databases/{database}/schemas/{schema}/sequences/{sequence}Workflow:
shardingsphere://workflows/{plan_id}Feature resources:
shardingsphere://features/encrypt/algorithmsshardingsphere://features/encrypt/databases/{database}/rulesshardingsphere://features/encrypt/databases/{database}/tables/{table}/rulesshardingsphere://features/mask/algorithmsshardingsphere://features/mask/databases/{database}/rulesshardingsphere://features/mask/databases/{database}/tables/{table}/rulesinspect_metadata: guides the model to read metadata and avoid SQL execution when the user only asks for metadata.safe_sql_execution: guides the model to distinguish read-only query from side-effecting SQL.recover_workflow: guides recovery from failed or stale workflows.plan_encrypt_rule: guides Encrypt feature workflow planning.plan_mask_rule: guides Mask feature workflow planning.Completions suggest runtime names, metadata identifiers, algorithms, and workflow plan_id values in the current session.
Before choosing uncertain database, schema, table, column, algorithm, or plan_id values, clients should call completion/complete or read the nearest MCP resource.
List-shaped business payloads usually contain:
itemscounthas_morecontinuation_modeLarge-result payloads use:
truncatedtotal_countreturned_countlarge_result_guidanceRecoverable error payloads keep message and add recovery hints.
Common recovery cases include missing arguments, unsupported tools or resources, invalid enum values, workflow state errors, and unsafe SQL tool selection.
JSON-RPC numeric error codes are the MCP protocol error contract.
