MCP 服务 2026-10-04 15:28 UTC
mcp-server-neon
由提交人 thisistonydang 提交,主要更新类型为:新增功能与能力扩展。提交说明:Add send_feedback tool (#370)。带来了新的能力与可配置项,扩展了使用场景。
Commit提交信息原文
Add send_feedback tool (#370)
Tony's Agent:
## Overview
Adds a `send_feedback` MCP tool that sends anonymous feedback to the
Neon feedback service
([neondatabase/neon-feedback](https://github.com/neondatabase/neon-feedback)).
It is the MCP version of `neon feedback --message` from the CLI
([neondatabase/neon-pkgs#725](https://github.com/neondatabase/neon-pkgs/pull/725)).
- **Request:** `POST https://feedback.neon.tech/` with `{"feedback":
"<text>", "source": "neon_mcp"}`. Nothing else is sent: no account,
project, or credentials.
- **Validation:** trims the text and rejects empty messages or messages
over 10,000 characters (the service would silently truncate them).
- **Errors:** clear messages for rate limits (429), other error
responses, network failures, and timeouts (10s, same as the docs tools).
- **Config:** `NEON_FEEDBACK_URL` overrides the endpoint, like
`NEON_DOCS_INDEX_URL`.
## Where it is available
The tool is available everywhere:
- **Every grant:** added to `ALWAYS_AVAILABLE_TOOLS` next to `search`
and `fetch`. Unlike them, it is also available on project-scoped
connections, because it does not touch any project.
- **Read-only mode:** `readOnlySafe: true`, because it does not change
Neon resources. The annotations still say `readOnlyHint: false`, so
clients can ask the user before sending.
- **No-login docs endpoint (`?category=docs`):** registered next to the
docs tools. It never uses the Neon API client.
## Related fixes
Adding an always-available tool exposed places that hard-coded `search`
and `fetch`:
- **Consent page live preview:** the browser script had its own copy of
the always-available list. It is now built from
`ALWAYS_AVAILABLE_TOOLS`.
- **Messages:** the "no categories" consent notes and grant warnings
said only Search and Fetch (or nothing) remain. Updated to include Send
Feedback.
- **Read-only notice:** no longer says every remaining tool is
read-only. It now says Neon resources stay read-only and feedback can
still be sent.
- **Docs-only tool list:** one helper, `isDocsOnlyTool`, now decides
which tools the no-login endpoint serves. It is used by `route.ts` and
by the tool catalog's `public` column.
## Tests
- New `mcp/__tests__/feedback-tool.test.ts`: request body, validation,
429, other errors, network failures, and timeouts.
- New e2e test calls `send_feedback` through the no-login endpoint. The
existing docs fixture server now also stands in for the feedback
service, so no test sends real feedback.
- Existing tests that count or list tools now expect one more tool. Two
consent collapse tests switched from `snapshots` to `data_api`, because
`snapshots` no longer fits the case those tests check (4 or fewer tools
with writes off).
- Ran locally: `pnpm test:unit` (727 passed), `pnpm test:integration`,
`pnpm test:e2e:mcp`, `pnpm test:e2e:web` (60 passed), `typecheck`,
`lint`, `fmt:check`, `knip`.
- A `dry_run` request to production `https://feedback.neon.tech/` with
`source: neon_mcp` returned `204`.