MCP for coding agents
Give a coding agent your database’s schema, rows and relationships as MCP tools, read-only unless a connection says otherwise.
{ "mcpServers": { "tablewalk": { "command": "npx", "args": ["tablewalk", "--mcp", "--config", "/absolute/path/tablewalk.json"] } }}The config file is the same one the browser reads
(connections); npx tablewalk --mcp <url or file>
works for one database.
What you’ll see
Section titled “What you’ll see”- The agent calls
schema_summaryfirst, thentable,queryandrecordas it needs them. - Every answer carries a
link: open it and you are on the same rows in the browser. - 23 tools: 17 that only read, and 6 writes listed only when a connection is
"writable": true.
When to use it
Section titled “When to use it”- Use database MCP when an agent should read your schema and data: to write a migration, a query, a fixture or a first App.
- Use App MCP instead when the agent should act through an App’s grants and commands, as a signed-in role would.
- Use the agent skill beside either one when the agent is building an App: the skill says how; MCP shows what is there.
The tools
Section titled “The tools”| Task | Tools |
|---|---|
| Orient | connections, schema_summary, tables, table |
| Locate and inspect | find, query, record, profile |
| Summarize | breakdown |
| Diagnose | sql, explain, lint, change_impact, diff |
| Prepare fixtures | order, fixture |
| Refresh | refresh |
| Write (writable only) | insert, update, delete, insert_graph, delete_graph, revert |
query and breakdown take the query language verbatim.
Options
Section titled “Options”| Flag | Does | Default |
|---|---|---|
--tools <profile> |
Offers one job’s worth: explore, migrate or seed. A profile never grants writes. |
full |
--output-schema |
Advertises each tool’s output shape in tools/list. |
off |
--config <path> |
The connections, each read-only unless "writable": true. |
tablewalk.json in the working directory, then ~/.config/tablewalk/connections.json |
Every statement stops at 30 seconds (sql takes a lower timeout_ms) and
when the client cancels. Counts stop at 10,000 and say so. sql and
explain refuse tablewalk’s own __tablewalk_ tables and the
tablewalk_auth schema.
Common mistakes
Section titled “Common mistakes”- The agent sees no
insertorupdate→ the connection is read-only; add"writable": trueto it, and connect as a database role that may write. No config file at …→ a relative--configpath resolved against the agent’s working directory, not yours; give an absolute path.- An App that signs people in, or names its sources, is refused → database
MCP serves no App; use App MCP (
--app-mcp) under a token.
Related
Section titled “Related”- Query language: what
queryandbreakdownaccept. - Build with a coding agent: the skill, the loop and the prompt.
- App API: an App’s reads and commands as MCP tools, under a token.
- Walk a database: where a tool’s
linklands.