Backenly

io.github.backenly由 GitHub 帳號 backenly 發布v0.4.0更新於 Oct 24, 2026

Postgres backend your coding agent builds over MCP; destructive actions wait for a person.

已驗證Streamable HTTP可網頁執行資料庫

概覽

AI 產生的概覽

Backenly 是遠端或本機執行的 MCP 伺服器,讓編碼助理透過自然語言建立與管理 Postgres 後端,破壞性操作須經人工核准。

可以做什麼
以自然語言提出需求,由 Backenly 規劃並執行後端變更,再回傳摘要。讀取後端狀態、資料表結構、REST 端點、RLS、指標與錯誤,並執行唯讀 SQL 查詢。套用資料庫結構遷移、插入或更新資料列,以及設定資料列層級安全規則。管理驗證、儲存、函式、即時、整合、監控、Webhook、部署與預覽分支等能力。輪詢已升級的破壞性請求,等待人工核准。
適用情境
適合讓編碼代理直接在同一個 Postgres 後端上建立與調整資料表、RLS、API 與部署,而不必手動切換主控台。也適合需要唯讀查詢與結構檢視,同時希望破壞性操作仍由人工核准的團隊。
執行需求
需要 Backenly 專案與範圍限定的 MCP 金鑰(BACKENLY_API_KEY,mcp_live_ 開頭),可透過環境變數或安裝程式寫入的本機設定檔提供。本機執行需 Node.js 20 以上,並需連線至 backenly.com 或自架端點(BACKENLY_API_URL)。
安裝前請注意
金鑰具專案寫入權限,外洩可修改後端;請勿放入應用程式程式碼或環境,僅供代理使用,並可隨時撤銷。資料列寫入工具以擁有者層級執行,會略過使用者層級的 RLS 與觸發器。部署、回復、刪除與撤銷金鑰等高風險動作會排入人工審核佇列,代理無法自行核准。所有變更會寫入稽核記錄。

安裝

在 SourceWeft 中

  1. 開啟 儀表板中的 Backenly,將其新增到工作區。
  2. 連接 所需的 憑證。它們會被私密儲存,絕不會在公開頁面上展示。
  3. 為需要使用其工具的對話啟用該服務。

Web executable,透過 Streamable HTTP。 遠端服務在工作區中設定後即可從網頁執行環境執行。

交給代理程式安裝

把這段提示詞貼上到 Claude Code、Codex、Cursor 等代理程式,或 SourceWeft 對話中。代理程式會讀取該伺服器的安裝指南,先向你展示發布者、端點和登入方式,經你同意後再把它新增到你的客戶端。金鑰不會寫進任何命令。

閱讀 https://sourceweft.com/mcp/io.github.backenly%2Fbackenly/install.md,並按其中說明把這個 MCP 伺服器接入我的客戶端。修改任何設定之前,先告訴我它的發布者、端點和登入方式,等我確認。不要把 API 金鑰寫進命令或我會提交的檔案;問我金鑰應從哪裡取得。

檢視代理程式所依據的安裝指南

其他 MCP 客戶端

把它新增到你客戶端的 mcpServers 設定中。 客戶端會在首次連接時完成 OAuth 登入。

{
  "mcpServers": {
    "backenly": {
      "type": "http",
      "url": "https://backenly.com/api/mcp"
    }
  }
}

README

@backenly/mcp-server

Plug Backenly into Claude Code, Cursor, Codex, Cline, and Claude Desktop over the Model Context Protocol.

sh
claude mcp add backenly -- npx -y @backenly/mcp-server \  --project <projectId> --key mcp_live_...

Run it before you open the agent: hosts read MCP config when a conversation starts, so the tools appear in the next conversation, not the one that ran the command. An agent that installs it mid-conversation keeps working through npx -y @backenly/cli@latest call <tool>, which reaches the same tools with the same key.

What you get

Twenty-three advertised tools, not sixty. The catalog is an allowlist admitted on one rule — is there exactly one tool here that answers a given request? — because tool-selection accuracy degrades with catalog size and models misfire hardest between similarly-named tools. Everything else is reached through backend_chat. Unlisted tools stay dispatchable, so clients pinned to an older manifest keep working.

backend_chat — say what you want

> Add comments and likes to my posts table

The host LLM hands the request to Backenly's brain. Brain plans, executes, and returns a summary. The host LLM never has to learn a vocabulary.

Read

  • read_backend_state — the single read-state door. Call with no arguments for the grounding overview; pass section (schema, tables, apis, rls, metrics, errors, deploy, usage, autonomy, …) to drill in. It replaces the ~26 list_* / get_* tools, which remain dispatchable.
  • run_query — standard read-only SQL over your workspace schema: joins, GROUP BY, aggregates, window functions, CTEs, EXPLAIN. Runs as a SELECT-only Postgres role scoped to the project, so isolation is a database grant rather than a parser. Secret-bearing columns come back redacted.
  • get_table_schema — everything about one table: columns, foreign keys, indexes, CHECK constraints with their permitted values, and live RLS policies. Read it before any write.
  • generate_types — TypeScript types (or a typed client, or OpenAPI) from the live catalog, with a schemaHash for drift checks.
  • fetch_docs — pull current Backenly docs instead of guessing.
  • check_approval — poll an escalated destructive request.

Write

  • apply_migration — ordinary PostgreSQL DDL (CREATE TABLE, ALTER TABLE, CREATE INDEX), translated statement by statement into governed actions. All-or-nothing; anything it cannot govern is refused with the tool to use instead. Not raw SQL execution.
  • db_insert / db_update / db_delete — row writes. Owner-level: validates shapes but bypasses end-user RLS and triggers, so treat them as maintenance tools.
  • set_rls — a row-level security predicate installed verbatim and read back from pg_policies.

Capabilities

One tool per dashboard section, each with an action: auth, storage, functions, realtime, integrations, monitoring, autonomy, webhooks, deploy, connect, plus branch (preview branches). Each tool's description lists its actions and their arguments. Destructive and high-risk actions (deploy, rollback, deletes, revoking a key) park the exact call for a human and run it verbatim once approved; poll check_approval. REST endpoints need no generation step, and older tool names such as enable_auth or adopt_external_schema stay callable by name without being advertised.

Resources (11)

Browse live state without spending a tool call:

backenly://state         Full backend statebackenly://tables        Table list + countsbackenly://apis          REST endpointsbackenly://buckets       Storage bucketsbackenly://triggers      Event triggersbackenly://rls           RLS policiesbackenly://functions     AI functionsbackenly://deploy        Deploy statusbackenly://metrics       Performance metricsbackenly://errors        Recent errorsbackenly://usage         Plan usage

Setup

Generate a scoped key from backenly.com → your project → Connect → Agents. It starts with mcp_live_, only works on MCP routes, and is revocable from the same page.

Claude Code / Codex — one command:

sh
claude mcp add backenly -- npx -y @backenly/mcp-server \  --project <projectId> --key mcp_live_...

Cursor (~/.cursor/mcp.json, not the project's), Cline (cline_mcp_settings.json), Claude Desktop — same server block:

json
{  "mcpServers": {    "backenly": {      "command": "npx",      "args": [        "-y", "@backenly/mcp-server",        "--project", "<projectId>",        "--key", "mcp_live_..."      ]    }  }}

Prefer to keep the key out of a file you might commit? Run the installer once — it verifies the key, writes ~/.backenly/mcp.json (mode 0600), and prints config snippets. The host block then needs no key at all.

sh
npx @backenly/mcp-server init

Open a new conversation in your host. Backenly appears as a tool surface.

The mcp_live_ key is for your agent only. Backenly's runtime API refuses it, so it never goes in app code or an app's environment: the app gets its own key from connect { action: "create_api_key" }, or Settings → API keys.

How it works

Host LLM (Claude Code, Cursor, ...)   │ stdio JSON-RPC   ▼@backenly/mcp-server (this package)   │ HTTPS + x-api-key + x-correlation-id   ▼backenly.com — brain, executor, runtime APIs

The package contains zero business logic — it's a thin protocol adapter. Tool definitions, billing, rate limiting, and audit logging all live server-side. New brain tools appear in your host immediately without npm update.

Protocol

Built on the official MCP TypeScript SDK (v2). It serves both protocol eras from one server: hosts that open with initialize (revisions 2024-11-05 through 2025-11-25) and hosts that speak 2026-07-28 (server/discover, per-request _meta). Requires Node.js 20 or newer.

Every tool result carries the server's JSON body twice: as structuredContent, for hosts that read fields (ok, code, hint, applied, approval, …), and as text, for hosts that only read text. A failure adds a second text block saying what its fields mean for the next step. Fields the server did not send stay absent.

What this package serves (tools, instructions, resources, result shapes) is what the remote endpoint (https://backenly.com/api/mcp) serves, and CI compares the two call for call.

Reliability

  • Retry — network errors and 502/503/504 retry with exponential backoff (250ms / 1s / 3s + jitter), honoring Retry-After.
  • Boot health check — /api/mcp/health runs before manifest fetch so auth failures surface in <1s.
  • Graceful shutdown — SIGINT/SIGTERM close the transport cleanly so MCP hosts don't see corrupt frames.
  • Correlation IDs — every request carries x-correlation-id for distributed tracing.

Security

  • MCP keys (mcp_live_…) are scope-gated — /api/mcp/* rejects runtime SDK keys. A leaked SDK key cannot be replayed against MCP to drop tables.
  • Destructive tools are not exposed. drop_table, delete_bucket, truncate_table, etc. are never executed from MCP. Ask for one via backend_chat and it parks in the project's Review Queue and returns an approval id; a human decides in the dashboard and you poll check_approval until it is executed or rejected. The agent cannot self-approve.
  • Per-key rate limit — sliding-window using ApiKey.rateLimit / rateLimitWindow. 429 includes Retry-After + X-RateLimit-* headers.
  • Audit log — every mutation through MCP writes an AuditLog row on your project timeline.
  • Local config is written with 0600 permissions (user-only readable).
  • Revoke any key, or disconnect an agent you signed in from the browser, anytime from your project's Connect → Agents page.

Environment

VariableDefaultNotes
BACKENLY_API_KEYfrom ~/.backenly/mcp.jsonOverride key (CI / multiple projects).
BACKENLY_API_URLhttps://backenly.comSelf-hosted Backenly endpoint.

CLI

sh
npx @backenly/mcp-server init              # interactive setupnpx @backenly/mcp-server init -k <key>     # setup with API key flagnpx @backenly/mcp-server                   # run as MCP server (stdio)npx @backenly/mcp-server health            # verify the configured keynpx @backenly/mcp-server versionnpx @backenly/mcp-server help

Troubleshooting

"This key has scope='runtime'" — you pasted your SDK anon key. Generate a separate MCP key from the project's Connect → Agents page.

"Could not reach Backenly" — check your internet or set BACKENLY_API_URL if self-hosting.

Host shows "MCP server crashed" — run npx @backenly/mcp-server health to verify the key. Check ~/.backenly/mcp.json exists and has mode 0600.

Rate-limited (429) — your MCP key hit its per-minute cap. Default is 600/min; raise it from the dashboard or wait until X-RateLimit-Reset.

License

MIT — see LICENSE.

來源:packages/mcp-server/README.md,提交 08671c7

工具

0
該伺服器需要登入,因此 SourceWeft 無法在沒有帳號的情況下讀取其工具,也未收錄。已連接帳號所能看到的內容可能因帳號及其權限而異。

版本歷史

1
  1. v0.4.0最新Oct 24, 2026

評分

已滿足適用檢查項的 85%

該評分衡量此收錄條目的完整程度,依據註冊中心條目、端點與公開來源計算得出。它不是對伺服器本身的評價,也不表示伺服器安全或目前可用:可連通性是帶日期的檢查結果,評分也不包含安裝量或使用者評價。

  • 近 30 天內可連通必需25 分
  • 已宣告認證方式必需10 分
  • 已列出工具15 分

    請讓伺服器在無憑證時回應 tools/list,或發布可在沙箱中無憑證啟動的軟體包。

  • 描述必需15 分
  • 圖示10 分
  • 文件15 分
  • 授權條款10 分