Skip to main content
Glama
ChenZaoD

OceanBase Oracle MCP Server

by ChenZaoD

Server Configuration

Describes the environment variables required to run the server.

NameRequiredDescriptionDefault
OB_HOSTYes数据库 IP 地址127.0.0.1
OB_PASSYes密码password
OB_PORTYes数据库端口2883
OB_USERYes连接用户(格式:用户名@租户名#集群名)user
OB_BACKUP_DIRNoPL/SQL 源码导出备份目录

Capabilities

Features and capabilities supported by this server

CapabilityDetails
tools
{
  "listChanged": false
}
experimental
{}

Tools

Functions exposed to the LLM to take actions

NameDescription
query_dbA

执行只读 SELECT 查询,自动限制结果集大小(最多 1000 行)。生成 SQL 时请使用 Oracle 方言(NVL, TO_CHAR, SYSDATE, ROWNUM 等)。当前连接的是 OceanBase Oracle 模式,不支持 MySQL 语法。

list_tablesA

列出当前用户可访问的所有表和视图(缓存 5 分钟)。传 refresh=true 强制刷新缓存。

get_table_schemaA

获取指定表的列信息(列名、数据类型、长度、是否可空)。table_name 为大写表名。

search_tablesA

按关键词搜索表和视图名称,返回匹配的结果列表。

get_table_indexesA

获取指定表的索引信息(索引名、类型、唯一性、包含列)。

export_sourceA

导出 PL/SQL 源码(存储过程、函数、包等)并保存到文件。不传 name 则列出所有源码对象。

explain_planC

查看 SQL 的执行计划(EXPLAIN),帮助分析查询性能。

get_table_statsB

获取表的统计信息:实时行数、统计信息行数、平均行长度、块数、列数、最后分析时间。

preview_writeA

【两阶段确认 - 第一步】预览写操作(INSERT/UPDATE/DELETE/CREATE/ALTER/DROP/TRUNCATE)的影响,返回预览信息和一次性确认令牌 token。此工具不执行实际写入。LLM 必须在执行 confirm_write 之前将预览结果展示给用户,获得用户确认后才能继续。

confirm_writeA

【两阶段确认 - 第二步】确认并执行写操作。需要传入 preview_write 返回的 token。执行后 token 立即失效,不可重复使用。

Prompts

Interactive templates invoked by user choice

NameDescription

No prompts

Resources

Contextual data attached and managed by the client

NameDescription

No resources

Latest Blog Posts

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/ChenZaoD/OceanBaseMcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server