KosmoKrator

other

Mysql MCP Integration for Vercel AI SDK

Connect Mysql to Vercel AI SDK 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 Vercel AI SDK

Use KosmoKrator as a local integration gateway for Vercel AI SDK agents and scripts.

Create an MCP client that starts or connects to the KosmoKrator gateway for the selected integration. The gateway is local, scoped to this integration, and starts with --write=deny so Vercel AI SDK can inspect read-capable tools without receiving write access by default.

Mysql MCP Config for Vercel AI SDK

Prefer CLI JSON calls when a workflow only needs one deterministic integration operation.

{
  "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 Vercel AI SDK

Vercel AI SDK 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