# JetBrains AI Assistant

Source: https://dbmcp.haymon.ai/clients/jetbrains/

Add dbmcp to JetBrains AI Assistant in its Model Context Protocol settings

Open **Settings → Tools → AI Assistant → Model Context Protocol (MCP)**, click **Add**, and paste:

```json tab="bin" title="MCP server"
{
  "mcpServers": {
    "dbmcp": {
      "command": "dbmcp",
      "args": [],
      "env": {
        "DBMCP_DB_BACKEND": "mysql",
        "DBMCP_DB_HOST": "127.0.0.1",
        "DBMCP_DB_USER": "root",
        "DBMCP_DB_PASSWORD": "secret",
        "DBMCP_DB_NAME": "mydb"
      }
    }
  }
}
```

```json tab="npx" title="MCP server"
{
  "mcpServers": {
    "dbmcp": {
      "command": "npx",
      "args": ["-y", "@haymon-ai/dbmcp"],
      "env": {
        "DBMCP_DB_BACKEND": "mysql",
        "DBMCP_DB_HOST": "127.0.0.1",
        "DBMCP_DB_USER": "root",
        "DBMCP_DB_PASSWORD": "secret",
        "DBMCP_DB_NAME": "mydb"
      }
    }
  }
}
```

Click **Apply** to start the server; **OK** alone does not.