different-ai/openwork · error · Error
Statement contains a forbidden keyword (read-only access)
Error message
Statement contains a forbidden keyword (read-only access)
What it means
Error "Statement contains a forbidden keyword (read-only access)" thrown in different-ai/openwork.
Source
Thrown at ee/packages/den-admin-mcp/index.mjs:193
signedUpAt: row.created_at,
lastActiveAt: lastActive.get(row.id) ?? null,
organizations: memberships.get(row.id) ?? [],
}));
}
// --- read-only guard for den_query ---
const FORBIDDEN_SQL =
/\b(insert|update|delete|drop|alter|create|truncate|rename|replace|grant|revoke|call|load|handler|lock|unlock|set|use|outfile|dumpfile|for\s+update)\b/i;
function assertReadOnly(input) {
const sqlText = input.trim().replace(/;+\s*$/, "");
if (sqlText.includes(";")) throw new Error("Only a single SQL statement is allowed");
if (!/^(select|with|show|describe|explain)\b/i.test(sqlText)) {
throw new Error("Only SELECT/WITH/SHOW/DESCRIBE/EXPLAIN statements are allowed");
}
if (FORBIDDEN_SQL.test(sqlText)) {
throw new Error("Statement contains a forbidden keyword (read-only access)");
}
return sqlText;
}
// --- MCP server ---
// Keep in sync with package.json. The hosted admin MCP may expose additional
// admin-only write tools while this break-glass stdio variant remains read-only.
const DEN_ADMIN_MCP_VERSION = "0.4.0";
const server = new McpServer({ name: "den-admin", version: DEN_ADMIN_MCP_VERSION });
server.tool(
"den_admin_version",
"Report the den-admin MCP version and runtime so you can verify which build is running.",
{},
async () =>
run(async () => ({View on GitHub (pinned to 2b7df46e8a)
When it happens
Trigger: Thrown at ee/packages/den-admin-mcp/index.mjs:193 when the library encounters an invalid state.
Common situations: See trigger scenarios.
Understand the failure class
- Authentication and authorization failures — expired tokens, bad credentials, and missing scopes.
AI-assisted analysis of different-ai/openwork@2b7df46e8a (2026-09-01).
Data as JSON: /api/errors/8b27f7e692d9b426.
Report an issue: GitHub.