ShardingSphere-MCP can run from the standalone distribution built from source or from the official OCI image.
Build the distribution:
./mvnw -pl distribution/mcp -am -DskipTests package
The distribution directory contains:
bin/: startup scripts.conf/: default configuration and logging configuration.lib/: MCP Server dependencies and built-in MCP feature plugins.plugins/: external JDBC drivers or extra MCP feature plugin jars.logs/: runtime logs.Official MCP Registry metadata lives in mcp/server.json.
The published server name is io.github.apache/shardingsphere-mcp.
The OCI image shape is:
ghcr.io/apache/shardingsphere-mcp:<version>
Run in HTTP mode:
docker run --rm -p 18088:18088 ghcr.io/apache/shardingsphere-mcp:${latest.release.version}
Run in STDIO mode:
docker run --rm -i \
-e SHARDINGSPHERE_MCP_TRANSPORT=stdio \
ghcr.io/apache/shardingsphere-mcp:${latest.release.version}
Use a custom configuration file:
docker run --rm -p 18088:18088 \
-e SHARDINGSPHERE_MCP_CONFIG=/opt/shardingsphere-mcp/conf/custom-mcp-http.yaml \
-v /path/to/mcp-http.yaml:/opt/shardingsphere-mcp/conf/custom-mcp-http.yaml:ro \
-v /path/to/plugins:/opt/shardingsphere-mcp/plugins:ro \
ghcr.io/apache/shardingsphere-mcp:${latest.release.version}
runtimeDatabases in the configuration file must point to a ShardingSphere-Proxy logical database prepared by the user.
The built-in HTTP Server does not provide authentication or authorization. For remote access, place it in a trusted network or behind a reverse proxy or gateway that handles:
HTTP binding recommendations:
127.0.0.1 for local debugging.logs/mcp.log.logs/mcp.log for diagnostics.