KosmoKrator

other

Mysql MCP Integration for LangGraph

Connect Mysql to LangGraph through the local KosmoKrator MCP gateway with scoped tools, credentials, and write policy.

8 functions 5 read 3 write API key auth

Connect Mysql to LangGraph

Run KosmoKrator integration calls from LangGraph nodes while preserving local credentials and permissions.

Use a graph node that calls the KosmoKrator CLI for deterministic steps or an MCP client for dynamic tool selection. The gateway is local, scoped to this integration, and starts with --write=deny so LangGraph can inspect read-capable tools without receiving write access by default.

Mysql MCP Config for LangGraph

Headless CLI calls fit repeatable graph edges; MCP fits exploratory agent nodes.

{
  "mcpServers": {
    "kosmokrator-mysql": {
      "type": "stdio",
      "command": "kosmo",
      "args": [
        "mcp:serve",
        "--integration=mysql",
        "--write=deny"
      ]
    }
  }
}

Run the Gateway Manually

kosmokrator mcp:serve --integration=mysql --write=deny

Why Use KosmoKrator Here

Scoped tools

Expose only Mysql instead of a broad multi-service tool list.

Local credentials

Reuse credentials already configured for the KosmoKrator CLI and Lua runtime.

Write policy

Start read-only, then opt into ask or allow for trusted workspaces.

Mysql Tools Visible to LangGraph

LangGraph sees stable MCP tool names generated from the Mysql integration catalog.

MCP toolSource functionTypeDescription
integration__mysql__mysql_query mysql.mysql_query Read Execute a raw SQL query on the MySQL database. Supports SELECT, INSERT, UPDATE, DELETE, and other SQL statements. Use for custom queries, joins, aggregations, and complex data retrieval.
integration__mysql__mysql_list_databases mysql.mysql_list_databases Read List all databases accessible to the authenticated MySQL user. Use this to discover which databases are available before querying or exploring tables.
integration__mysql__mysql_list_tables mysql.mysql_list_tables Read List all tables in a MySQL database. Use this to discover which tables exist before querying or describing their structure.
integration__mysql__mysql_describe_table mysql.mysql_describe_table Read Get the column structure of a MySQL table. Returns column names, types, nullable status, keys, defaults, and extra info. Use this before inserting or updating data to understand the schema.
integration__mysql__mysql_insert mysql.mysql_insert Write Insert a new row into a MySQL table. Provide column names and values as key-value pairs. Use mysql_describe_table first to understand the schema if needed.
integration__mysql__mysql_update mysql.mysql_update Write Update rows in a MySQL table that match a filter. Provide a filter to identify which rows to update and a data object with the new column values. Use mysql_describe_table first to understand the schema if needed.
integration__mysql__mysql_delete mysql.mysql_delete Write Delete rows from a MySQL table that match a filter. Provide a filter with column-value pairs to identify which rows to delete. This action is irreversible — use with caution.
integration__mysql__mysql_get_current_user mysql.mysql_get_current_user Read Get information about the currently authenticated MySQL user. Useful for verifying credentials and connection status.

Related Mysql Pages