Skip to main content

Add Kolumn MCP to Claude Code

· 5 min read
SchemaBounce

A coding agent can produce plausible-looking Kolumn HCL that uses the wrong syntax. If the model reaches for familiar infrastructure patterns, the file may look reasonable right up until validation.

The Kolumn MCP server gives the agent a better source than its training data: pattern documentation, structured schema information, a validator, and a table-definition generator.

Use it to retrieve and check syntax before you review a database change. It isn't permission to apply that change.

Connect the local server​

The server's README documents this Claude Code setup command:

claude mcp add kolumn -- npx @schemabounce/kolumn-mcp

This registers a stdio server launched through npx. It doesn't apply schema changes or deploy a hosted endpoint.

You'll need a working Node.js/npm environment and a Claude Code installation that supports the command. The example is reproduced from the server's documented setup; it isn't a claim that the package has already been installed or tested on your machine.

For a controlled team setup, agree on a reviewed package version rather than silently picking up updates. The short README command above doesn't pin one. Use your client's supported configuration and your package policy when making that change.

You can also install the package explicitly, using the README's alternative:

npm install -g @schemabounce/kolumn-mcp
claude mcp add kolumn -- kolumn-mcp

Pick one setup, not both. After registering it, inspect the connection and available tools before asking the agent to edit a project.

The MCP integration docs explain the client/server boundary. This local configuration belongs to your coding client; it doesn't configure tools for agents running elsewhere.

Know the four tools​

The server documents four tool names:

ToolUse it for
kolumn_patternRetrieve HCL patterns and syntax rules
kolumn_schemaRead structured column types, policies, migration operations, and provider features
kolumn_validateCheck Kolumn HCL and return syntax issues
kolumn_generateGenerate a table definition from a description

The validator is particularly useful when the model mixes dialects. The README says it catches resource where Kolumn expects create, data where it expects discover, single-label provider syntax, and the old column "name" { } form.

That doesn't make validation a review of the database operation. A syntactically valid destructive change is still destructive.

Ask for retrieval before generation​

An instruction you can adapt for a real task:

Read the table pattern and relevant provider syntax first. Draft a users table with a bigint primary key, a unique non-null email, and a name field. Run the Kolumn validator on the draft. Show the configuration and any remaining issues. Do not apply it.

That's illustrative task wording, not a transcript of an executed tool call.

The important part is the order. Retrieve the current pattern. Generate a candidate. Validate that candidate. Read the issues and revise. Only then review the proposed operation against the actual project.

Keep provider selection explicit. A valid type or operation for one database doesn't establish support in another. Use the provider feature information and the Kolumn documentation rather than treating a generated example as portable by default.

Existing rows change the problem​

Adding a constraint to an empty table and adding it to a populated table are different operations. The schema text alone won't tell you whether existing values satisfy the new rule.

The server's column_policies documentation covers policy fields including null_action, null_fill, default_strategy, and type_strategy. Retrieve the relevant policy before proposing a change that affects existing values.

For example, the documented null-handling options include failing, skipping, deleting null rows, or coalescing values. Those choices have very different consequences. An agent shouldn't choose deletion just to make validation pass.

The server returns structured schema information in TOON format. That is a response representation, not evidence that a migration is safe or that a particular token-saving percentage will hold for your task.

For the wider workflow, managing remote database schemas with the CLI covers the infrastructure side. If the live database differs from the desired definition, the schema drift guide is relevant before you interpret the plan.

Separate drafting from applying​

A useful review packet contains the proposed HCL, the validation result, the intended provider, the expected data impact, and the plan produced by the actual deployment workflow.

Keep credentials and apply permissions out of the syntax-help setup unless the task genuinely needs them. Documentation and validation access shouldn't quietly become production write access.

If the MCP server fails to start, check the package launch and client connection first. If a tool returns validation issues, work from those issues. If the deployment plan proposes an unexpected data change, stop there. A cleaner prompt doesn't make an unsafe plan acceptable.

Written with AI assistance. Publication requires human approval.