Skip to content
LangChain

MySQL (security-first) for LangChain

io.github.kurok1/mcp-server-mysql

Security-first MySQL MCP server with AST validation, table whitelist, schema resources, and audit.

client:LangChain transport:stdio runtime:oci

Install MySQL (security-first) in LangChain

pip install langchain-mcp-adapters

from langchain_mcp_adapters.client import MultiServerMCPClient

client = MultiServerMCPClient({
        "mcp-server-mysql": {
            "transport": "stdio",
            "command": "docker",
            "args": ["run", "-i", "--rm", "ghcr.io/kurok1/mcp-server-mysql:2.1.0"],
        }
})

tools = await client.get_tools()

get_tools() returns the server's tools as LangChain tools, ready for an agent. LangChain docs

MySQL (security-first) in other clients