Repository navigation
feat: GoSQLX Claude Code plugin and ChatGPT app - #823
Conversation
Embed an analyze_sql report widget (ui://gosqlx/analysis-v1.html), return structuredContent from all tools with unchanged text output, add server instructions, noauth securitySchemes and invocation status metadata, accept mariadb/clickhouse in validate_sql, report gosqlx.Version and the real tool count, serve the optional OpenAI apps domain challenge, and sweep idle MCP sessions after 30 minutes. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01L2wnDjnjXs2u8baaf2PC6w
Install with /plugin marketplace add ajitpratap0/GoSQLX and /plugin install gosqlx@gosqlx: hosted MCP server, five SQL skills, four slash commands, a read-only sql-reviewer agent and an opt-out .sql validation hook. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01L2wnDjnjXs2u8baaf2PC6w
Add gosqlx.dev/terms, describe hosted MCP server, ChatGPT app and Claude plugin data handling accurately in the privacy policy, document both integrations in README, MCP guide and CHANGELOG, and fix the Claude Desktop stdio example. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01L2wnDjnjXs2u8baaf2PC6w
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
Claude finished @ajitpratap0's task in 26s —— View job Review of PR #823: Claude Code plugin and ChatGPT appI reviewed the Go changes ( What looks good
Suggestions and nits (non-blocking)
No security concerns beyond the above. The challenge token is public by design, so the plain string compare/serve is fine. |
Name the maintainer as controller and contracting party, add a private contact and grievance officer, legal bases, recipients (incl. Vercel), international transfers, retention, security, user rights, children, DPDP Act 2023 and GDPR references; terms gain eligibility, liability cap, consumer carve-out, indemnity, termination, Indian governing law, boilerplate and conspicuous disclaimers. Correct the VS Code telemetry opt-in text and replace its dead PRIVACY.md link. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01L2wnDjnjXs2u8baaf2PC6w
|
Claude finished @ajitpratap0's task in 18s —— View job Review of PR #823: Claude Code plugin and ChatGPT appI read the diffs for What looks good
Suggestions (non-blocking)
Before directory submission (already in your notes)
Security: I have no concerns beyond the above. The challenge token is public by design, so serving it as plain text is fine. The widget's empty CSP and |
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01L2wnDjnjXs2u8baaf2PC6w
|
Claude finished @ajitpratap0's task in 20s —— View job Review of PR #823: Claude Code plugin and ChatGPT appI read the diffs for What looks good
Corrections to the earlier automated reviews
Suggestions (non-blocking)
Before directory submission (already in your notes)
Security: I have no concerns beyond the above. The challenge token is public by design. The empty CSP and |
Independent review (Opus + Sonnet)Verdict: changes requested before merge. Medium1. Session IDs are retained and logged, contradicting the privacy policy (
Low2. Release notes edited from a feature PR (
3. Shared rate-limit budget once ChatGPT and claude.ai traffic arrives (
4. No body or idle timeout on the HTTP server (
5. Greedy
6. Pre-existing lint warnings (
7. Contact mailbox unconfirmed (
Informational8. Rate-limit client IP comes from Blocking item: finding 1. Findings 2 and 4 are strongly recommended before merge. The rest can be follow-ups. 🤖 Generated with Claude Code |
…t_sql - widget: cap long lists (counted statement types, +N more), show failed tool calls as errors on both host bridges, skip clipboard API when the frame's permissions policy blocks it - server: one streamable transport per Server reused by Handler/Start, new Server.Shutdown, Start gains read-header/idle timeouts, transport logger drops Info so session IDs are never logged - format_sql: uppercase_keywords=true also uppercases operator/function keywords; option semantics documented precisely - docs/privacy: session state is swept 30-45 minutes after last request and IDs are not tracked - tests: full HTTP chain via newMux, session TTL wiring, sweeper leak, widget script structure, constants and metadata keys Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01L2wnDjnjXs2u8baaf2PC6w
|
Claude finished @ajitpratap0's task in 32s —— View job Review of PR #823 (current head
|
|
Claude finished @ajitpratap0's task in 24s —— View job Review of PR #823 (head
|
Correction to my earlier reviewIn my review, medium finding 1 claimed that session IDs pile up forever in mcp-go's
The logging half of that finding still stands in part, and #831 doesn't fully fix it:
#835, stacked on #831, fixes both remaining points:
Sorry for the noise on the retention claim. |
|
Merge train: this PR is ready otherwise (all checks green on cb0051a, no changes requested), but it now conflicts with main (mergeStateStatus DIRTY). Could the owner please rebase or merge current main into this branch and resolve the conflicts? The train will pick it up again afterwards. (The train does not push to or resolve conflicts on this branch.) |
Resolve conflicts with #825 (syntax highlighting) and #829 (dialect lists): CHANGELOG [Unreleased] Added keeps both entries; pkg/mcp/server.go unions the imports and derives supportedDialects from keywords.DialectNames, used for the validate_sql description and enum. Also correct the validate-sql.sh fallback comment: the greedy sed match takes the last file_path value, not the first. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01RkzVu3JY9Y6BRWfjesWts9
|
Merged origin/main into this branch (merge commit d786d0f, normal fast-forward push, no force-push, no rebase). Conflicts resolved:
🤖 Generated with Claude Code |
|
Claude finished @ajitpratap0's task in 23s —— View job Review of PR #823 (head
|
|
Claude finished @ajitpratap0's task in 22s —— View job Review of PR #823 (head
|
…h, tool errors) (#831) * feat(mcp): ChatGPT app support via OpenAI Apps SDK and MCP Apps Embed an analyze_sql report widget (ui://gosqlx/analysis-v1.html), return structuredContent from all tools with unchanged text output, add server instructions, noauth securitySchemes and invocation status metadata, accept mariadb/clickhouse in validate_sql, report gosqlx.Version and the real tool count, serve the optional OpenAI apps domain challenge, and sweep idle MCP sessions after 30 minutes. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01L2wnDjnjXs2u8baaf2PC6w * feat(plugin): add GoSQLX Claude Code plugin and marketplace Install with /plugin marketplace add ajitpratap0/GoSQLX and /plugin install gosqlx@gosqlx: hosted MCP server, five SQL skills, four slash commands, a read-only sql-reviewer agent and an opt-out .sql validation hook. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01L2wnDjnjXs2u8baaf2PC6w * docs: add terms of service, update privacy policy and integration docs Add gosqlx.dev/terms, describe hosted MCP server, ChatGPT app and Claude plugin data handling accurately in the privacy policy, document both integrations in README, MCP guide and CHANGELOG, and fix the Claude Desktop stdio example. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01L2wnDjnjXs2u8baaf2PC6w * docs(legal): harden terms and privacy policy for app directory review Name the maintainer as controller and contracting party, add a private contact and grievance officer, legal bases, recipients (incl. Vercel), international transfers, retention, security, user rights, children, DPDP Act 2023 and GDPR references; terms gain eligibility, liability cap, consumer carve-out, indemnity, termination, Indian governing law, boilerplate and conspicuous disclaimers. Correct the VS Code telemetry opt-in text and replace its dead PRIVACY.md link. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01L2wnDjnjXs2u8baaf2PC6w * fix(website): keep privacy meta description within SEO length limit Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01L2wnDjnjXs2u8baaf2PC6w * fix(mcp): address PR #823 test findings in widget, sessions and format_sql - widget: cap long lists (counted statement types, +N more), show failed tool calls as errors on both host bridges, skip clipboard API when the frame's permissions policy blocks it - server: one streamable transport per Server reused by Handler/Start, new Server.Shutdown, Start gains read-header/idle timeouts, transport logger drops Info so session IDs are never logged - format_sql: uppercase_keywords=true also uppercases operator/function keywords; option semantics documented precisely - docs/privacy: session state is swept 30-45 minutes after last request and IDs are not tracked - tests: full HTTP chain via newMux, session TTL wiring, sweeper leak, widget script structure, constants and metadata keys Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01L2wnDjnjXs2u8baaf2PC6w * fix(mcp): harden HTTP server rate limiting, timeouts, auth and tool errors - rate limit keys on RemoteAddr; X-Forwarded-For no longer trusted by default; opt-in GOSQLX_MCP_TRUSTED_PROXY_HEADER / _HOPS with IP validation (render.yaml: CF-Connecting-IP) - bounded limiter memory with per-shard LRU eviction - GET/SSE streams excluded from load metric, capped at 4 per IP - POST body read deadline (408), idle timeout, 32KB header cap, read deadline on non-/mcp routes so stalled bodies cannot hold connections - oversized bodies get 413; denials are HTTP 429 with Retry-After and the request id (initialize keeps 200 for mcp-go clients); batches charged per tool call - bearer auth: constant-time digest compare, case-insensitive scheme - tool input problems return isError results naming the argument; indent_size limited to 0-16 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01L2wnDjnjXs2u8baaf2PC6w --------- Co-authored-by: Ajit Pratap Singh <ajitpratapsingh@Ajits-Mac-mini-2655.local> Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
…ransport errors (#835) * feat(mcp): ChatGPT app support via OpenAI Apps SDK and MCP Apps Embed an analyze_sql report widget (ui://gosqlx/analysis-v1.html), return structuredContent from all tools with unchanged text output, add server instructions, noauth securitySchemes and invocation status metadata, accept mariadb/clickhouse in validate_sql, report gosqlx.Version and the real tool count, serve the optional OpenAI apps domain challenge, and sweep idle MCP sessions after 30 minutes. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01L2wnDjnjXs2u8baaf2PC6w * feat(plugin): add GoSQLX Claude Code plugin and marketplace Install with /plugin marketplace add ajitpratap0/GoSQLX and /plugin install gosqlx@gosqlx: hosted MCP server, five SQL skills, four slash commands, a read-only sql-reviewer agent and an opt-out .sql validation hook. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01L2wnDjnjXs2u8baaf2PC6w * docs: add terms of service, update privacy policy and integration docs Add gosqlx.dev/terms, describe hosted MCP server, ChatGPT app and Claude plugin data handling accurately in the privacy policy, document both integrations in README, MCP guide and CHANGELOG, and fix the Claude Desktop stdio example. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01L2wnDjnjXs2u8baaf2PC6w * docs(legal): harden terms and privacy policy for app directory review Name the maintainer as controller and contracting party, add a private contact and grievance officer, legal bases, recipients (incl. Vercel), international transfers, retention, security, user rights, children, DPDP Act 2023 and GDPR references; terms gain eligibility, liability cap, consumer carve-out, indemnity, termination, Indian governing law, boilerplate and conspicuous disclaimers. Correct the VS Code telemetry opt-in text and replace its dead PRIVACY.md link. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01L2wnDjnjXs2u8baaf2PC6w * fix(website): keep privacy meta description within SEO length limit Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01L2wnDjnjXs2u8baaf2PC6w * fix(mcp): address PR #823 test findings in widget, sessions and format_sql - widget: cap long lists (counted statement types, +N more), show failed tool calls as errors on both host bridges, skip clipboard API when the frame's permissions policy blocks it - server: one streamable transport per Server reused by Handler/Start, new Server.Shutdown, Start gains read-header/idle timeouts, transport logger drops Info so session IDs are never logged - format_sql: uppercase_keywords=true also uppercases operator/function keywords; option semantics documented precisely - docs/privacy: session state is swept 30-45 minutes after last request and IDs are not tracked - tests: full HTTP chain via newMux, session TTL wiring, sweeper leak, widget script structure, constants and metadata keys Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01L2wnDjnjXs2u8baaf2PC6w * fix(mcp): harden HTTP server rate limiting, timeouts, auth and tool errors - rate limit keys on RemoteAddr; X-Forwarded-For no longer trusted by default; opt-in GOSQLX_MCP_TRUSTED_PROXY_HEADER / _HOPS with IP validation (render.yaml: CF-Connecting-IP) - bounded limiter memory with per-shard LRU eviction - GET/SSE streams excluded from load metric, capped at 4 per IP - POST body read deadline (408), idle timeout, 32KB header cap, read deadline on non-/mcp routes so stalled bodies cannot hold connections - oversized bodies get 413; denials are HTTP 429 with Retry-After and the request id (initialize keeps 200 for mcp-go clients); batches charged per tool call - bearer auth: constant-time digest compare, case-insensitive scheme - tool input problems return isError results naming the argument; indent_size limited to 0-16 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01L2wnDjnjXs2u8baaf2PC6w * fix(mcp): pin stateless session IDs and stop logging session IDs in transport errors Pin the streamable HTTP transport to mcp-go's StatelessGeneratingSessionIdManager instead of relying on the library default. mcp-go's InsecureStatefulSessionIdManager stores every terminated session ID in a sync.Map that is never pruned (v0.45.0 server/streamable_http.go:1489,1523); pinning the manager keeps an upstream default change from turning the public no-auth server into an unbounded store of session IDs. Redact transport error arguments unless the format is known to be safe. mcp-go logs errors that embed the client-supplied Mcp-Session-Id header (streamable_http.go:363 via :826 and :1471), which any client can trigger by POSTing a response-shaped JSON-RPC message, contradicting the privacy policy's promise that session IDs are never logged. Generated IDs are also scrubbed from every error line as a second line of defence. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01RkzVu3JY9Y6BRWfjesWts9 --------- Co-authored-by: Ajit Pratap Singh <ajitpratapsingh@Ajits-Mac-mini-2655.local> Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
Summary
Ships GoSQLX as a Claude Code plugin and a ChatGPT app, both built on the existing
gosqlx-mcpserver, plus the legal pages the ChatGPT app directory requires.Description
.claude-plugin/marketplace.json,plugins/gosqlx/):/plugin marketplace add ajitpratap0/GoSQLX→/plugin install gosqlx@gosqlx. Hosted MCP server by default (GOSQLX_MCP_URLoverrides for local), 5 skills (analysis, formatting, security review, linting, dialects),/gosqlx:analyze|format|lint|security, read-onlysql-revieweragent, opt-out PostToolUse hook validating edited.sqlfiles when thegosqlxCLI exists.pkg/mcp,cmd/gosqlx-mcp:analyze_sqlwidgetui://gosqlx/analysis-v1.html(text/html;profile=mcp-app, empty CSP, data rendered viatextContentonly); tool meta in both MCP Apps (ui.resourceUri) andopenai/*forms.structuredContentalongside the byte-identical text JSON.securitySchemes: noauth(only when auth is off), invocation status strings.validate_sqlacceptsmariadb/clickhouse; server version fromgosqlx.Version;/healthreports the real tool count; optional/.well-known/openai-apps-challenge(GOSQLX_MCP_OPENAI_APPS_CHALLENGE, declaredsync: falseinrender.yaml);ReadHeaderTimeout.WithSessionIdleTTL) — previously sessions from clients that never sent DELETE lived until restart./termspage (footer + sitemap); privacy policy rewritten for the hosted server / ChatGPT app / Claude plugin (removes the inaccurate "stateless" claim, documents in-memory session + rate-limit state, Render/Cloudflare as processors).integrations/chatgpt/README.md(setup + directory submission checklist),docs/CHATGPT_APP.md, plugin README, README, MCP guide (also fixes the Claude Desktop example missing--stdio), CHANGELOG.Type of Change
Test Plan
task check(fmt, vet, golangci-lint 0 issues,test:race) passespkg/mcp/apps_test.go(resources/list+read, widget meta, tool meta, structuredContent == text JSON),cmd/gosqlx-mcp/main_test.go(health, challenge route), config test for the challenge env varanalyze_sqlclaude plugin validate --stricton marketplace and plugin; hook script exercised with valid/invalid/missing-CLI/no-jq/space-in-path inputstypecheck,eslint,npm test,check:docs,next build(/termsprerendered)Breaking Changes
None. Existing MCP clients receive identical text content; new fields are additive. Behavior notes:
validate_sqlenum gains two dialects; idle sessions now expire after 30 min (clients re-initialize transparently).Performance Impact
structuredContent, roughly doubling payload size for largeanalyze_sqlresponses.Additional Notes
Before ChatGPT directory submission (maintainer): legal review of
/termsand/privacy(no governing-law clause yet), set the challenge token in Render, test the widget in developer mode, prepare logo/screenshots/demo video.securitySchemesis emitted in_metaonly (mcp-go v0.45.0 cannot emit it at the tool top level).🤖 Generated with Claude Code
https://claude.ai/code/session_01L2wnDjnjXs2u8baaf2PC6w