WoWSQL

com.wowsqlv1.0.0更新於 Oct 5, 2026

Managed Postgres MCP: projects, SQL, docs search, and storage buckets via OAuth.

已驗證Streamable HTTP可網頁執行Files & StorageDatabases

概覽

AI 產生的概覽

託管 Postgres 的 MCP 伺服器,讓助理透過 OAuth 操作 WoWSQL 專案、執行 SQL、搜尋文件並管理儲存桶。

功能
WoWSQL 是面向託管 Postgres 平台的遠端 HTTP MCP 端點。依描述,它提供專案、SQL 執行、文件搜尋與儲存桶相關工具。README 說明其採用帶 PKCE 的 OAuth 2.0 授權碼流程,MCP 程序作為 OAuth 受保護資源,並將授權中介資料代理到 WoWSQL API。請求是以 Bearer 權杖向 /mcp 送出的 JSON-RPC POST,可透過帶參數的 URL 限定專案與唯讀模式。
適用情境
當助理需要檢視或查詢 WoWSQL 託管的 Postgres 專案、查閱平台文件或管理儲存桶,而不想離開聊天用戶端時使用。適合已採用 WoWSQL、希望透過 Cursor 等 MCP 用戶端進行資料庫作業的團隊。
執行需求
可使用 遠端端點,或基於 @wowsql/mcp-server-wowsql 套件自建 Node.js 程序。需要針對 WoWSQL API 的帶 PKCE 的 OAuth 2.0 授權碼流程,以及用於 POST /mcp 的 Bearer 存取權杖。自建需設定 WOWSQL_API_BASE,可選 WOWSQL_OAUTH_ISSUER_URL、MCP_PUBLIC_URL、PORT 或 MCP_PORT、MCP_HOST;權杖驗證還需要 WoWSQL API 後端正在執行。
安裝前請注意
此伺服器可執行 SQL 並管理儲存桶,可能讀取、寫入或刪除 WoWSQL 專案中的資料。盡量使用帶 read_only=true 的限定 URL。MCP_ALLOW_UNAUTHENTICATED=true 會略過 Bearer 檢查,文件標示為不安全,僅限本機測試。OAuth 權杖與 API 基礎位址屬敏感資訊,.env.local 不應提交到版本庫。

安裝

在 SourceWeft 中

  1. 開啟 儀表板中的 WoWSQL,將其新增到工作區。
  2. 為需要使用其工具的對話啟用該服務。

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

其他 MCP 客戶端

把它新增到你客戶端的 mcpServers 設定中。

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

README

WoWSQL MCP (Model Context Protocol)

wowsql-style HTTP MCP with OAuth 2.0 authorization code + PKCE on the WoWSQL API.

Packages

PackageDescription
packages/mcp-server-wowsql@wowsql/mcp-server-wowsql — HTTP MCP server, createToolSchemas() for AI SDK

Quick start (self-hosted MCP process)

From the repo root:

bash
cd mcpnpm installnpm run buildnpm start

Authentication (OAuth 2.0 + MCP)

The MCP process is an OAuth protected resource (not the authorization server):

  1. POST /mcp requires Authorization: Bearer <access_token> unless MCP_ALLOW_UNAUTHENTICATED=true (dev only).
  2. Missing/invalid tokens get 401 with WWW-Authenticate: Bearer ... resource_metadata="<url>" so MCP clients (Cursor, etc.) can start OAuth.
  3. Token validation calls your API: GET {WOWSQL_API_BASE}/api/v1/auth/me with the same Bearer token (must match the JWT issued by WoWSQL OAuth or login).
  4. Discovery
    • Authorization server metadata (WoWSQL API): GET {WOWSQL_API_BASE}/.well-known/oauth-authorization-server
    • Protected resource metadata (this MCP host): GET /.well-known/oauth-protected-resource/mcp

Cursor / Electron: OAuth metadata is rewritten so authorization_endpoint, token_endpoint, and registration_endpoint point at this MCP host (e.g. http://localhost:8787/...). The MCP process proxies those requests to WOWSQL_API_BASE, so the IDE does not need a working direct fetch to localhost:8000 for OAuth (which often shows up as fetch failed). You still need FastAPI running on WOWSQL_API_BASE so the proxy can reach it.

If MCP_PUBLIC_URL is unset, PRM and 401 resource_metadata are derived from each request’s Host (and X-Forwarded-Proto), so http://localhost:8787/mcp and http://127.0.0.1:8787/mcp each get matching metadata. Set MCP_PUBLIC_URL when the MCP is behind a reverse proxy or you need a single fixed origin in production.

VariableDefaultPurpose
WOWSQL_API_BASEhttps://api.wowsql.comWoWSQL FastAPI base URL (no trailing slash).
WOWSQL_OAUTH_ISSUER_URLsame as WOWSQL_API_BASEissuer advertised in PRM (authorization_servers).
MCP_PUBLIC_URLunsetIf set, fixed public origin (no /mcp path) for OAuth PRM + WWW-Authenticate; overrides Host-based derivation.
MCP_ALLOW_UNAUTHENTICATEDunsetIf true, skips Bearer check (insecure; local testing only).
PORT / MCP_PORT8787MCP HTTP port.
MCP_HOST0.0.0.0Bind address.

Option A — .env / .env.local (recommended)
Copy packages/mcp-server-wowsql/.env.example to .env or .env.local in that folder. The CLI loads .env, then .env.local (overrides), then the process cwd .env. Use .env.local for machine-specific values (e.g. http://localhost:8000) without committing them.

bash
cd mcp/packages/mcp-server-wowsqlcp .env.example .env# edit .env — set WOWSQL_API_BASE to your APInpm run build   # from mcp root: npm run build -w @wowsql/mcp-server-wowsqlnpm start

Option B — shell (no file)

PowerShell:

powershell
cd mcp$env:WOWSQL_API_BASE="http://localhost:8005"$env:PORT="8787"npm start

bash / zsh:

bash
cd mcpexport WOWSQL_API_BASE=http://localhost:8005export PORT=8787npm start

Endpoints

  • MCP (Streamable HTTP): POST http://localhost:8787/mcp — JSON-RPC body; append query params for scoping. MCP clients (Cursor, etc.) use this.
  • MCP (browser): GET http://localhost:8787/mcp returns 401 with a short “not authorized” page (no public metadata). The protocol is POST JSON-RPC with Authorization: Bearer.
  • Health: GET http://localhost:8787/health

Example scoped URL for clients:

http://localhost:8787/mcp?project_ref=<uuid-or-slug>&read_only=true&features=database,docs

OAuth (API)

  • Metadata: GET https://api.wowsql.com/.well-known/oauth-authorization-server
  • Authorize (redirect to dashboard): GET /api/v1/auth/oauth/mcp/authorize
  • Approve (logged-in user): POST /api/v1/auth/oauth/mcp/approve
  • Token: POST /api/v1/auth/oauth/mcp/token (grant_type=authorization_code or refresh_token)

Dashboard consent UI: /mcp/oauth on the app (see dashboard/app/mcp/oauth/page.tsx).

Deploy mcp.wowsql.com

  1. Run this Node service behind TLS (reverse proxy or platform of your choice).
  2. Set WOWSQL_API_BASE / WOWSQL_OAUTH_ISSUER_URL to https://api.wowsql.com (not 127.0.0.1:8000/8001). Blue/green flips change the backend host port; the public hostname always follows the active slot via NPM.
  3. Set MCP_PUBLIC_URL=https://mcp.wowsql.com.
  4. Point DNS mcp.wowsql.com to the service; health check: GET /health.
  5. Ensure CORS and OAuth redirect_uri values include your MCP client callbacks (see oauth_clients seed + env).

EC2 blue/green: ./deploy/ec2-blue-green.sh mcp sets those env vars automatically.

npm publish

bash
cd mcp/packages/mcp-server-wowsqlnpm version patchnpm publish --access public

Requires an npm org scope @wowsql (or change name in package.json).

來源:README.md,提交 98f0793

工具

0
工具後設資料尚未被收錄。

版本歷史

1
  1. v1.0.0最新Oct 5, 2026