Skip to main content
Glama
yangfeng20

dmc-mcp-server

by yangfeng20

Server Configuration

Describes the environment variables required to run the server.

NameRequiredDescriptionDefault
DMC_COOKIEYes腾讯云控制台Cookie,从浏览器复制
DMC_MC_GTKNocsrfCode,用于实例搜索,可选

Capabilities

Features and capabilities supported by this server

CapabilityDetails
tools
{
  "listChanged": false
}
prompts
{
  "listChanged": false
}
resources
{
  "subscribe": false,
  "listChanged": false
}
experimental
{}

Tools

Functions exposed to the LLM to take actions

NameDescription
set_cookieA

Set or update the Tencent Cloud console cookie. AI can obtain this from the browser via Chrome DevTools MCP: document.cookie Then pass the full cookie string here.

The mc_gtk (csrfCode) value is required for cluster search (DescribeClusters API). AI can extract it from the browser's performance API: performance.getEntriesByType('resource') .find(e => e.name.includes('csrfCode=')) ?.name.match(/csrfCode=(\d+)/)?.[1] If not provided, DMC login/SQL tools will still work (they don't require mc_gtk to be valid), but find_instance_by_ip will fail.

Args: cookie: Full cookie string from the Tencent Cloud console browser tab. mc_gtk: Optional csrfCode value from the browser. Required for cluster search.

login_instanceA

Login to a database instance via Tencent Cloud DMC. Supports both TDSQL-C (CynosDB) and TDSQL (DCDB) instances. The session is cached - subsequent calls reuse the same token without re-login, unless the token expires.

Use find_instance_by_ip to discover the instance_id and db_type, then pass the db_type value from the search results here.

Args: instance_id: Instance ID, e.g. "cynosdbmysql-xxx" or "tdsqlshard-xxx" user: Database account name, e.g. "db_user" password: Database account password (plain text) db_type: Database type - "cynosdbmysql" (TDSQL-C) or "tdsql" (TDSQL) region_id: Region ID, default 4 (Shanghai)

Returns: Login status message.

execute_selectA

Execute a SELECT query on a logged-in database instance. Only SELECT statements are allowed (enforced by SQL validation).

Args: instance_id: Instance ID (must be logged in via login_instance first) sql: SELECT SQL statement to execute db_name: Target database name within the instance page_size: Max rows to return, default 50

Returns: Query results as formatted text.

list_databasesA

List all databases accessible by the current logged-in account on the specified instance.

Args: instance_id: Instance ID (must be logged in)

Returns: List of database names.

list_tablesC

List tables in a database, optionally filtered by name pattern.

Args: instance_id: Instance ID (must be logged in) db_name: Database name search: Optional table name filter (fuzzy match)

Returns: Table list with row counts and sizes.

get_table_detailA

Get detailed schema of a table: columns and DDL (CREATE TABLE statement).

Args: instance_id: Instance ID (must be logged in) db_name: Database name table_name: Table name

Returns: Column details and CREATE TABLE DDL.

list_active_sessionsA

List all currently active (logged-in) database instance sessions. Useful to check which instances are ready for querying.

Returns: List of active instance IDs and their session status.

find_instance_by_ipA

Find a database instance by its internal Vip (proxy IP). Searches both TDSQL-C (CynosDB) and TDSQL (DCDB) instances.

Typical workflow:

  1. Read the JDBC URL from your config file (e.g. 10.0.0.1:3306)

  2. Call find_instance_by_ip("10.0.0.1", region="ap-guangzhou") to get the InstanceId

  3. Call login_instance with the InstanceId (use the DbType from results, and match region_id)

  4. Call execute_select

Args: ip: Internal Vip address, e.g. "10.0.0.1" region: Tencent Cloud region string, e.g. "ap-shanghai" (default), "ap-beijing", "ap-guangzhou". Must match the region where your cluster is deployed.

Returns: Matching instance info (InstanceId, Name, Vip, DbType) or "not found".

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/yangfeng20/dmc-mcp-server'

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