kingbase-mcp-server
Server Configuration
Describes the environment variables required to run the server.
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Capabilities
Features and capabilities supported by this server
| Capability | Details |
|---|---|
| tools | {
"listChanged": true
} |
| prompts | {
"listChanged": true
} |
| resources | {
"listChanged": true
} |
Tools
Functions exposed to the LLM to take actions
| Name | Description |
|---|---|
| kb_queryA | Execute a read-only SQL query (SELECT/WITH/SHOW) against the KingBase database. Returns query results as a formatted table. Use parameterized queries ($1, $2, ...) for safe value substitution. Only read-only statements are allowed. For INSERT/UPDATE/DELETE use kb_execute; for DDL use kb_execute_ddl. š Auto-schema feature: Unqualified table names (without schema prefix) are automatically qualified with the configured schema (DB_SCHEMA env var). You can optionally override this with the 'schema' parameter. Args:
Returns: Formatted table of query results with row count. Examples:
|
| kb_executeA | Execute a DML statement (INSERT, UPDATE, DELETE) against the KingBase database. Returns the number of affected rows. Use parameterized queries ($1, $2, ...) for safe value substitution. š Auto-schema feature: Unqualified table names (without schema prefix) are automatically qualified with the configured schema (DB_SCHEMA env var). You can optionally override this with the 'schema' parameter. Args:
Returns: Number of rows affected by the operation. Examples:
|
| kb_execute_ddlA | Execute a DDL statement (CREATE, ALTER, DROP, TRUNCATE, etc.) against the KingBase database. WARNING: DDL operations modify database structure and can be destructive. DROP and TRUNCATE operations are irreversible. š Auto-schema feature: Unqualified table names (without schema prefix) are automatically qualified with the configured schema (DB_SCHEMA env var). You can optionally override this with the 'schema' parameter. Args:
Returns: Confirmation message. For dangerous operations (DROP/TRUNCATE/CASCADE), a warning is included. Examples:
|
| kb_list_schemasA | List all schemas in the KingBase database. Returns schema names excluding internal PostgreSQL/KingBase system schemas. Args: None Returns: List of schema names with their owners. |
| kb_list_tablesA | List all tables and/or views in a schema. Args:
Returns: List of tables/views with their type, owner, and estimated row count. |
| kb_describe_tableA | Get detailed structure of a table or view, including columns, types, constraints, and comments. Args:
Returns: Table structure with column names, data types, nullable, defaults, and comments. |
| kb_list_indexesA | List all indexes on a table including columns, uniqueness, and index type. Args:
Returns: List of indexes with name, columns, uniqueness, and method (btree/hash/gin/gist). |
| kb_list_constraintsA | List all constraints (PK, FK, UNIQUE, CHECK) on a table. Args:
Returns: List of constraints with name, type, columns, and referenced table (for FK). |
| kb_explainA | Get the execution plan for a SQL query using EXPLAIN. Use this to analyze query performance, identify full table scans, and optimize queries. Args:
Returns: Query execution plan showing scan types, costs, and join strategies. Examples:
|
| kb_table_dataA | Preview data from a table with optional filtering and pagination. A convenient shortcut for common SELECT operations without writing full SQL. Args:
Returns: Formatted table of row data with total count. Examples:
|
| kb_table_statsA | Get storage and usage statistics for a table, including row count, size, and dead tuples. Args:
Returns: Table size, row count, index size, dead tuples, and last vacuum/analyze times. |
Prompts
Interactive templates invoked by user choice
| Name | Description |
|---|---|
| kb_query_prompt | Help construct a SQL query for KingBase database. Describe what data you want to retrieve and get a properly formatted SQL query. |
| kb_schema_overview | Get a comprehensive overview of the database schema structure including tables, columns, indexes and constraints. |
Resources
Contextual data attached and managed by the client
| Name | Description |
|---|---|
| Database Config | Current KingBase database connection configuration (sensitive values are masked) |
| Server Status | Current KingBase MCP server runtime status |
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/NekoTarou/kingbase-mcp-server'
If you have feedback or need assistance with the MCP directory API, please join our Discord server