Giving Claude safe access to Quickbase with MCP and .NET

2026-12-03来源 dev.toEnglish
Giving Claude safe access to Quickbase with MCP and .NET

Last time I wrote about QuickbaseNet, a .NET SDK for the Quickbase REST API. The obvious next step was letting an assistant use it. So I built an MCP server on top of it: Claude, Copilot or Cursor can query Quickbase tables but can only change data through a preview they show you first.

GitHub logo gitshrini / QuickbaseNet.Mcp

MCP server for Quickbase. Lets Claude, Copilot and Cursor query Quickbase tables and make previewed, allowlisted changes. Run with dnx QuickbaseDotNet.Mcp

Quickbase MCP server for .NET

An MCP server that lets Claude, GitHub Copilot and Cursor read Quickbase data and make previewed, allowlisted changes.

ci NuGet Downloads License: MIT

Unofficial project. Not affiliated with Quickbase, Inc.

Why this one

Other Quickbase MCP servers are written in TypeScript or only read data. This one is built for teams that run .NET and keep real company data in Quickbase.

  • .NET 10. Runs with dnx, publishes as a native AOT binary and uses the QuickbaseNet SDK for every Quickbase call.
  • Safe writes. Read only by default. Writes go through a preview that returns a change_id, then a separate apply call. Apps and tables are allowlisted and sensitive fields can be hidden from the model entirely.
  • Azure ready. A second host serves streamable HTTP behind Microsoft Entra ID, reads the Quickbase token from Key Vault with a managed identity and deploys to Azure Container Apps with azd up…

Setup

You need the .NET 10 SDK, a Quickbase user token and the ID of the app you want to expose. The app ID is the part after /db/ in the app's URL.

In Claude Desktop, open Settings, then Developer, then Edit Config:

{ "mcpServers": { "quickbase": { "command": "dnx", "args": ["QuickbaseDotNet.Mcp", "--yes"], "env": { "QB_REALM": "yourrealm.quickbase.com", "QB_USER_TOKEN": "your token", "QB_ALLOWED_APPS": "your app id" } } } } 

dnx downloads the tool from NuGet and runs it. Nothing to install globally. The same server is in the official MCP Registry as io.github.gitshrini/quickbasenet-mcp, so clients that read the registry can find it there.

Restart Claude and ask "what tables are in my Quickbase app?" or "show open tasks over budget".

What the model sees

Six read tools: get_app, list_tables, describe_table, query_records, count_records and run_report. Each allowed table's schema is also a resource. There are three prompts for exploring a table, finding stale records and checking data quality.

The model never writes Quickbase query syntax. Filters are JSON:

{ "match": "all", "conditions": [ { "field": "Status", "operator": "equals", "value": "Open" }, { "field": "Spent", "operator": "greater_than", "value": 10000 } ] } 

Fields can be labels or fids. Each operator is checked against the field type. If the model misspells a label, the error lists the closest real labels, so it fixes itself on the next call instead of guessing. Results come back keyed by label instead of fid, with ISO dates and long text trimmed.

Writes need two calls

The server is read only unless you set QB_MODE=write. Even then, nothing is written in one step:

  1. preview_upsert or preview_delete validates the change and returns what would happen plus a change_id.
  2. apply_upsert or apply_delete takes that change_id and does it.

A change_id lasts five minutes, works once and only for the caller that made it. Deletes need a filter, are capped at QB_MAX_ROWS and are counted again right before they run, so a delete that previewed 3 rows can't quietly remove 300. Clients that support MCP elicitation also ask you to confirm.

Keeping data out of the model

  • QB_ALLOWED_APPS and QB_ALLOWED_TABLES are checked on every call, not only at startup.
  • QB_HIDDEN_FIELDS takes fids or labels like SSN,Salary. Hidden fields are left out of queries, results, schemas and even spelling suggestions, so the model can't learn they exist.
  • QB_AUDIT_LOG writes one JSON line per call with the tool, table, filter, row count and outcome. It never logs field values or tokens.

Running it for a team

There's a second host for shared use. It serves streamable HTTP behind Microsoft Entra ID with two app roles, Quickbase.Read and Quickbase.Write. Callers without the write role don't even see the write tools. The Quickbase token lives in Key Vault and is read with a managed identity. azd up deploys it to Azure Container Apps with Bicep. Each caller gets a rate limit.

Under the hood

It's built on the official MCP C# SDK and the QuickbaseNet SDK. The stdio host publishes as a native AOT binary with no trimming warnings. There are 85 xUnit tests against a fake Quickbase that evaluates real where clauses.

If you use Quickbase and try it, I'd like to hear what's missing. Issues and PRs are open.

原文:https://www.a8q9.cn/en/article/giving-claude-safe-access-to-quickbase-with-mcp-and-net-40930c.html

相关文章