Skip to content

MCP (AI Agent Integration) ​

Let an AI agent explore and query a database through noorm, limited to what the agent role on each config allows.

bash
noorm mcp init
Created /home/dev/order-to-cash/.mcp.json
json
// .mcp.json
{
    "mcpServers": {
        "noorm": {
            "command": "noorm",
            "args": [
                "mcp",
                "serve"
            ]
        }
    }
}

That is Claude Code's file. --agent cursor writes .cursor/mcp.json. Other MCP clients take the same entry by hand. An existing file keeps its other entries, and init prints Extended. Pair it with the agent skill: npx skills add noormdev/noorm/skills.

How does a request reach the database? ​

An agent holds viewer on a config named orders. Every command passes a policy check first:

The server offers two tools: noorm_help lists commands and their parameters, and run_noorm_cmd runs one as { command, config?, payload? }.

Which commands can the agent run? ​

Each command needs one permission, and the agent's role on the config decides if it has it:

CommandsPermissionvieweroperatoradmin
list_configs, connect, disconnect, statusnoneyesyesyes
overview, list, detail, change_historyexploreyesyesyes
sql with SELECT, or SHOW and DESCRIBE on MySQLsql:readyesyesyes
sql with INSERT, UPDATE, DELETEsql:writenoyesyes
sql with DDLsql:ddlnonoyes
run_build, run_file, change_run, change_ff, change_revertrun:*, change:*nonoyes

sql is classified by what the statement does, and EXPLAIN takes the class of the statement it wraps. A config with no access gives agents viewer.

access.agent: false hides a config: list_configs omits it, and connect fails with the error an unknown name produces, Config "orders" not found.

An agent that shells out to noorm after a refusal stays on the agent channel (how the channel is chosen).

What bites ​

SymptomCauseFix
"sql:write" is not allowed on config "orders" (role: viewer).The default agent role is viewerRaise access.agent for that config in the TUI
"change:ff" on config "orders" requires confirmation from a human.A confirm cell is deny for agents, and --yes does not change thatGive a disposable database agent: admin, or run the command yourself
Agent still refused after you raised its roleA session keeps the config it loaded at connectHave the agent call connect again, or restart the server

Next ​