patchbay
v0.4.1Audit any remote MCP server for OAuth 2.1 and security gaps.
These tools were reported by the server itself during our smoke test (tools/list), not copied from the README.
build_connector Build a connector
Describe an integration in one sentence ("When X happens in A, do Y in B"). patchbay plans it, researches both APIs, generates a connector with tests and a README, then verifies it in a sandbox with up to N repair attempts. Default language is TypeScript (vitest); set lang: "py" for Python 3.12 (pytest). Falls back to the recorded TypeScript replay run when live API keys are missing.
| Parameter | Type | Description |
|---|---|---|
prompt * | string | One-sentence integration description |
lang | string | Target language. "ts" (default) emits TypeScript+vitest; "py" emits Python 3.12+pytest. Live keys required for "py". |
maxAttempts | integer | Repair attempts, default from PATCHBAY_MAX_ATTEMPTS |
research_api Research an integration
Plan + Tavily-backed API research only. Returns the connector plan, the ranked documentation sources, and a normalized API spec (endpoints, auth, example payloads). No code is generated and no sandbox is used, so this is cheap and fast.
| Parameter | Type | Description |
|---|---|---|
prompt * | string | One-sentence integration description |
scan_repo Scan a repo for integration opportunities
Walk a repository (local directory or shallow-cloned GitHub URL) and report the integration opportunities patchbay could build: webhook handlers with TODO/empty bodies, .env.example entries pointing at vendor APIs with no implementation, TODO/FIXME comments mentioning vendors, and vendor SDKs imported but barely used. Understands TypeScript/JavaScript (Express/Next/Fastify routes) AND Python (FastAPI/Flask routes, pass bodies, raise NotImplementedError). Returns a ranked list, each item with a ready-to-run prompt the agent can hand straight to build_connector. Instant, free (no LLM / sandbox),…
| Parameter | Type | Description |
|---|---|---|
path * | string | Absolute path to a repo directory on disk, or a GitHub URL (https://github.com/<owner>/<repo> — shallow-cloned to a tempdir and scanned). |
topN | integer | How many top-ranked opportunities to return. Default 15. |
verify_code Verify a connector
Type-check and test an existing connector (files you provide as {path, content}) in an isolated Nebius sandbox, with up to N repair attempts from the strong model. For TypeScript (default) the gate is tsc + vitest; for Python (lang: "py") it is compileall + pytest. Requires live keys (NEBIUS_API_KEY, NEBIUS_AI_PROJECT); returns the final test report and the (possibly repaired) files.
| Parameter | Type | Description |
|---|---|---|
files * | array | Connector files. For TS, include src/connector.ts + a *.test.ts; for Python, include connector.py + test_connector.py. |
lang | string | Target language the files are in. "ts" (default) or "py". If omitted, auto-detected from file extensions. |
maxAttempts | integer | Repair attempts, default from PATCHBAY_MAX_ATTEMPTS |
audit_mcp_server Audit an MCP server for OAuth 2.1 and security gaps
Scan a remote MCP server URL (or a local MCP connector directory) for OAuth 2.1, RFC 8707 audience validation, RFC 8252 loopback redirects, OAuth metadata, scope posture, secret surface, tool manifest drift, and tool-description prompt injection patterns. Returns a letter grade, numeric score and the full findings list. Runs zero-auth probing by default (metadata-level checks only). Pass "authToken" to probe behind authentication. Pass "probeAudienceToken" to enable AUDIENCE-001 (cross-audience token check, RFC 8707). Pass "probeMissingAudToken" to enable AUDIENCE-002 (missing-aud-claim check,…
| Parameter | Type | Description |
|---|---|---|
target * | string | MCP server URL (https://...) or absolute path to a local connector directory. |
authToken | string | Bearer token to send on every probe request. Use for servers that require authentication beyond initialize. |
probeAudienceToken | string | Bearer token minted for a DIFFERENT resource on the same authorization server. Enables AUDIENCE-001 (RFC 8707 cross-audience check). |
probeDcrLoopback | boolean | Opt into AUTH-006 active Dynamic Client Registration loopback probe (RFC 8252 Section 7.3). Writes a throw-away client to the authorization server; off by default. |
probeHeadlessOauth | boolean | Opt into the OAuth 2.1 conformance battery (PKCE-001, PKCE-002, IMPLICIT-001, REDIRECT-002). Registers a throw-away client via DCR, then sends four crafted /authorize requests. Off by default. |
probeMissingAudToken | string | Bearer token whose JWT payload has NO aud claim at all. Enables AUDIENCE-002 (catches `if (aud && aud !== me) reject` early-exit bug per RFC 9068 Section 4). |
timeoutMs | integer | Per-request timeout in milliseconds. Default 8000. |