Skip to content

armgit / eve

Public Imported from GitHub
0

The Open Framework for Building Agents

Add Neon to the connection registry (#2835)

vercel-gh-bot-5[bot]453d1942480c
diff --git a/.changeset/green-neon-connect.md b/.changeset/green-neon-connect.md
new file mode 100644
index 000000000..184003869
--- /dev/null
+++ b/.changeset/green-neon-connect.md
@@ -0,0 +1,5 @@
+---
+"eve": patch
+---
+
+Add Neon to the official connection registry and support app-scoped Vercel Connect setup.
diff --git a/apps/docs/lib/integrations/connection-setup.test.ts b/apps/docs/lib/integrations/connection-setup.test.ts
index 0554c684f..40cefd93d 100644
--- a/apps/docs/lib/integrations/connection-setup.test.ts
+++ b/apps/docs/lib/integrations/connection-setup.test.ts
@@ -42,6 +42,19 @@ describe("Agentcard connection setup", () => {
});
});
+describe("Neon connection setup", () => {
+ it("generates the registry install and Vercel Connect configuration", () => {
+ const integration = getIntegration("neon")!;
+ const setup = buildConnectionSetup(integration);
+ const quickStart = setup.variants["mcp:app"];
+
+ expect(buildConnectionInstall(integration)).toContain("eve add connection/neon");
+ expect(quickStart).toContain('url: "https://mcp.neon.tech/mcp"');
+ expect(quickStart).toContain('auth: connect({ connector: "neon/neon", principalType: "app" })');
+ expect(setup.configureVariants["mcp:app"]).toContain("vercel connect create neon --name neon");
+ });
+});
+
describe("Shopify connection setup", () => {
it("uses hand-authored sections without generating authentication variants", () => {
const integration = getIntegration("shopify")!;
diff --git a/apps/docs/lib/integrations/data.ts b/apps/docs/lib/integrations/data.ts
index b2947f8e6..24a218fdb 100644
--- a/apps/docs/lib/integrations/data.ts
+++ b/apps/docs/lib/integrations/data.ts
@@ -1926,6 +1926,16 @@ const connectionPresentations: Record<string, ConnectionPresentation> = {
configureNote:
"Natural moves real money. Add an approval gate or tool filters before allowing unattended payment actions.",
},
+ neon: {
+ logo: "neon",
+ docsHref: "https://neon.com/docs/ai/neon-mcp-server",
+ keywords: ["mcp", "postgres", "databases", "branches", "sql", "oauth", "connect"],
+ authModes: ["app"],
+ connector: "neon/neon",
+ connectorService: "neon",
+ configureNote:
+ "Neon's MCP server can modify projects and databases. Use a development or test project, review tool calls, and append `?readonly=true` or `?projectId=<project-id>` to scope access.",
+ },
netlify: {
logo: "netlify",
docsHref: "/docs/connections/mcp",
diff --git a/apps/docs/lib/integrations/logos.tsx b/apps/docs/lib/integrations/logos.tsx
index 67b0af615..dc369282b 100644
--- a/apps/docs/lib/integrations/logos.tsx
+++ b/apps/docs/lib/integrations/logos.tsx
@@ -407,6 +407,15 @@ export const naturalLogo = (props: LogoProps) => (
</svg>
);
+export const neonLogo = (props: LogoProps) => (
+ <svg fill="none" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg" {...props}>
+ <path
+ d="M24 0V24l-9.365-8.045V24H0V0ZM2.942 21.087h8.751V9.563l9.365 8.204V2.919L2.942 2.914Z"
+ fill="#34D59A"
+ />
+ </svg>
+);
+
export const mem0Logo = (props: LogoProps) => (
<svg fill="none" viewBox="0 0 100 100" xmlns="http://www.w3.org/2000/svg" {...props}>
<rect fill="#CBB2FF" height="100" rx="12" width="100" />
@@ -777,6 +786,7 @@ export const logos = {
miro: miroLogo,
mixpanel: mixpanelLogo,
natural: naturalLogo,
+ neon: neonLogo,
netlify: netlifyLogo,
oreilly: oreillyLogo,
planetscale: planetscaleLogo,
diff --git a/apps/docs/registry.json b/apps/docs/registry.json
index bd4819ce9..c14b1b4f5 100644
--- a/apps/docs/registry.json
+++ b/apps/docs/registry.json
@@ -861,6 +861,31 @@
}
]
},
+ {
+ "name": "connection/neon",
+ "type": "registry:item",
+ "title": "Neon",
+ "description": "Manage Neon projects, run queries, and make schema changes.",
+ "meta": {
+ "eve": {
+ "setup": {
+ "command": "eve",
+ "package": "eve",
+ "bin": "eve",
+ "args": ["integration", "connect", "neon", "neon", "neon", "--principal-type", "app"]
+ },
+ "requires": ">=0.29.0"
+ }
+ },
+ "dependencies": ["@vercel/connect"],
+ "files": [
+ {
+ "path": "registry/connections/neon.ts",
+ "type": "registry:file",
+ "target": "agent/connections/neon.ts"
+ }
+ ]
+ },
{
"name": "connection/netlify",
"type": "registry:item",
@@ -1196,7 +1221,15 @@
"command": "eve",
"package": "eve",
"bin": "eve",
- "args": ["integration", "connect", "tinybird", "tinybird", "tinybird"]
+ "args": [
+ "integration",
+ "connect",
+ "tinybird",
+ "tinybird",
+ "tinybird",
+ "--principal-type",
+ "app"
+ ]
},
"requires": ">=0.29.0"
}
diff --git a/apps/docs/registry.staged-requirements.json b/apps/docs/registry.staged-requirements.json
new file mode 100644
index 000000000..9a6349de1
--- /dev/null
+++ b/apps/docs/registry.staged-requirements.json
@@ -0,0 +1,3 @@
+{
+ "items": ["connection/neon", "connection/tinybird"]
+}
diff --git a/apps/docs/registry/connections/neon.ts b/apps/docs/registry/connections/neon.ts
new file mode 100644
index 000000000..a95c4697a
--- /dev/null
+++ b/apps/docs/registry/connections/neon.ts
@@ -0,0 +1,8 @@
+import { connect } from "@vercel/connect/eve";
+import { defineMcpClientConnection } from "eve/connections";
+
+export default defineMcpClientConnection({
+ url: "https://mcp.neon.tech/mcp",
+ description: "Neon: manage projects, run queries, and make schema changes.",
+ auth: connect({ connector: "neon", principalType: "app" }),
+});
diff --git a/apps/docs/scripts/validate-connection-registry.ts b/apps/docs/scripts/validate-connection-registry.ts
index 51d6772c4..2f162f047 100644
--- a/apps/docs/scripts/validate-connection-registry.ts
+++ b/apps/docs/scripts/validate-connection-registry.ts
@@ -59,6 +59,10 @@ const CONNECT_CREATION_TYPES: Readonly<Record<string, string>> = {
const CONNECT_METHODS: Readonly<Record<string, "mcp" | "oauth">> = {
agentcard: "mcp",
};
+const CONNECT_PRINCIPAL_TYPES: Readonly<Record<string, "app" | "user">> = {
+ neon: "app",
+ tinybird: "app",
+};
if (JSON.stringify(actualSlugs) !== JSON.stringify(expectedSlugs)) {
throw new Error(
@@ -92,6 +96,7 @@ for (const item of items) {
if (slug !== "browser-use") {
const creationType = CONNECT_CREATION_TYPES[slug];
const connectionMethod = CONNECT_METHODS[slug];
+ const principalType = CONNECT_PRINCIPAL_TYPES[slug];
const expectedSetup =
slug === "shopify"
? {
@@ -112,6 +117,7 @@ for (const item of items) {
slug,
...(creationType === undefined ? [] : ["--creation-type", creationType]),
...(connectionMethod === undefined ? [] : ["--connection-method", connectionMethod]),
+ ...(principalType === undefined ? [] : ["--principal-type", principalType]),
],
};
if (JSON.stringify(setups) !== JSON.stringify([expectedSetup])) {
diff --git a/packages/eve-catalog/src/index.test.ts b/packages/eve-catalog/src/index.test.ts
index 880583937..4a08c4fa4 100644
--- a/packages/eve-catalog/src/index.test.ts
+++ b/packages/eve-catalog/src/index.test.ts
@@ -41,6 +41,18 @@ describe("integration catalog", () => {
}
});
+ it("catalogs Neon with its official MCP endpoint", () => {
+ expect(getIntegrationEntry("neon")).toMatchObject({
+ name: "Neon",
+ kind: "connection",
+ surfaces: { scaffoldable: false, registry: true, gallery: true },
+ connection: {
+ description: "Neon: manage projects, run queries, and make schema changes.",
+ mcp: { url: "https://mcp.neon.tech/mcp" },
+ },
+ });
+ });
+
it("keeps channels free of connection identity", () => {
for (const entry of channelEntries()) {
expect(entry.connection).toBeUndefined();
diff --git a/packages/eve-catalog/src/index.ts b/packages/eve-catalog/src/index.ts
index b97ed52c0..256b4aceb 100644
--- a/packages/eve-catalog/src/index.ts
+++ b/packages/eve-catalog/src/index.ts
@@ -634,6 +634,17 @@ export const INTEGRATIONS: readonly IntegrationEntry[] = [
mcp: { url: "https://mcp.natural.com/mcp" },
},
},
+ {
+ slug: "neon",
+ name: "Neon",
+ kind: "connection",
+ tagline: "Manage Neon projects, run queries, and make schema changes.",
+ surfaces: { scaffoldable: false, registry: true, gallery: true },
+ connection: {
+ description: "Neon: manage projects, run queries, and make schema changes.",
+ mcp: { url: "https://mcp.neon.tech/mcp" },
+ },
+ },
{
slug: "netlify",
name: "Netlify",
diff --git a/packages/eve/src/cli/commands/integration-connect.test.ts b/packages/eve/src/cli/commands/integration-connect.test.ts
index 6e7227771..3b08709be 100644
--- a/packages/eve/src/cli/commands/integration-connect.test.ts
+++ b/packages/eve/src/cli/commands/integration-connect.test.ts
@@ -65,12 +65,16 @@ describe("runIntegrationConnect", () => {
appRoot: "/project",
slug: "agentcard",
service: "mcp.agentcard.sh/mcp",
- options: { creationType: "agentcard", connectionMethod: "mcp" },
+ options: { creationType: "agentcard", connectionMethod: "mcp", principalType: "app" },
dependencies: deps,
});
expect(deps.setupConnectionConnector).toHaveBeenCalledWith(
- expect.objectContaining({ creationType: "agentcard", connectionMethod: "mcp" }),
+ expect.objectContaining({
+ creationType: "agentcard",
+ connectionMethod: "mcp",
+ principalType: "app",
+ }),
);
});
diff --git a/packages/eve/src/cli/commands/integration-connect.ts b/packages/eve/src/cli/commands/integration-connect.ts
index 4bb9a0f64..6ab7510b6 100644
--- a/packages/eve/src/cli/commands/integration-connect.ts
+++ b/packages/eve/src/cli/commands/integration-connect.ts
@@ -3,6 +3,7 @@ import { join } from "node:path";
import {
cleanupCreatedConnectionConnector,
setupConnectionConnector,
+ type ConnectPrincipalType,
type SetupConnectionConnectorOptions,
} from "#setup/connection-connector.js";
import {
@@ -24,6 +25,7 @@ import { serializeHeadlessSetupEvent } from "./setup-headless.js";
export interface IntegrationConnectOptions {
creationType?: string;
connectionMethod?: "mcp" | "oauth";
+ principalType?: ConnectPrincipalType;
nonInteractive?: boolean;
signal?: AbortSignal;
}
@@ -97,6 +99,7 @@ export async function runIntegrationConnect(input: {
service: input.service,
creationType: input.options?.creationType,
connectionMethod: input.options?.connectionMethod,
+ principalType: input.options?.principalType,
canonicalConnectorName: input.canonicalConnectorName ?? input.slug,
project,
signal,
diff --git a/packages/eve/src/cli/commands/register-integration-commands.test.ts b/packages/eve/src/cli/commands/register-integration-commands.test.ts
new file mode 100644
index 000000000..1a1acc025
--- /dev/null
+++ b/packages/eve/src/cli/commands/register-integration-commands.test.ts
@@ -0,0 +1,15 @@
+import { describe, expect, it } from "vitest";
+
+import { parseConnectPrincipalType } from "./register-integration-commands.js";
+
+describe("parseConnectPrincipalType", () => {
+ it.each(["app", "user"] as const)("accepts %s", (principalType) => {
+ expect(parseConnectPrincipalType(principalType)).toBe(principalType);
+ });
+
+ it("rejects unsupported principal types", () => {
+ expect(() => parseConnectPrincipalType("jwt-bearer")).toThrow(
+ 'Expected principal type "app" or "user".',
+ );
+ });
+});
diff --git a/packages/eve/src/cli/commands/register-integration-commands.ts b/packages/eve/src/cli/commands/register-integration-commands.ts
index e1daf6272..9fc9cea48 100644
--- a/packages/eve/src/cli/commands/register-integration-commands.ts
+++ b/packages/eve/src/cli/commands/register-integration-commands.ts
@@ -1,5 +1,6 @@
-import type { Command } from "#compiled/commander/index.js";
+import { InvalidArgumentError, type Command } from "#compiled/commander/index.js";
import { applicationCommand, type CliApplicationContext } from "#cli/application-command.js";
+import type { ConnectPrincipalType } from "#setup/connection-connector.js";
import { parseSetupAnswer } from "./setup-answers.js";
@@ -8,6 +9,11 @@ interface IntegrationCommandLogger {
log(message: string): void;
}
+export function parseConnectPrincipalType(value: string): ConnectPrincipalType {
+ if (value === "app" || value === "user") return value;
+ throw new InvalidArgumentError('Expected principal type "app" or "user".');
+}
+
/** Registers hidden built-in integration setup commands used by trusted registry items. */
export function registerIntegrationCommands(input: {
program: Command;
@@ -55,6 +61,11 @@ export function registerIntegrationCommands(input: {
.option("-y, --yes")
.option("--creation-type <type>", "Select the Vercel Connect creation type.")
.option("--connection-method <method>", "Select the Vercel Connect connection method.")
+ .option(
+ "--principal-type <type>",
+ "Require app- or user-scoped Vercel Connect credentials.",
+ parseConnectPrincipalType,
+ )
.option(
"--non-interactive",
"Run without interactive prompts, instead emit structured NDJSON when further input is required",
@@ -67,6 +78,7 @@ export function registerIntegrationCommands(input: {
options: {
creationType?: string;
connectionMethod?: "mcp" | "oauth";
+ principalType?: ConnectPrincipalType;
nonInteractive?: boolean;
},
) => {
diff --git a/packages/eve/src/setup/connection-connector.integration.test.ts b/packages/eve/src/setup/connection-connector.integration.test.ts
index 22c876e71..44630b0f3 100644
--- a/packages/eve/src/setup/connection-connector.integration.test.ts
+++ b/packages/eve/src/setup/connection-connector.integration.test.ts
@@ -32,7 +32,7 @@ function connectorResult(uid: string, id: string, subject: "app" | "user") {
}
describe("connector response parsing", () => {
- it("rejects created connectors without user support", () => {
+ it("selects created connectors by principal support", () => {
const response = { uid: "linear/acme", id: "scl_1", supportedSubjectTypes: ["user"] };
expect(parseCreatedConnector(JSON.stringify(response))).toEqual({
uid: "linear/acme",
@@ -41,6 +41,9 @@ describe("connector response parsing", () => {
expect(
parseCreatedConnector(JSON.stringify({ ...response, supportedSubjectTypes: ["app"] })),
).toBeUndefined();
+ expect(
+ parseCreatedConnector(JSON.stringify({ ...response, supportedSubjectTypes: ["app"] }), "app"),
+ ).toEqual({ uid: "linear/acme", id: "scl_1" });
});
});
@@ -143,6 +146,44 @@ describe("setupConnectionConnector", () => {
);
});
+ it("attaches an app-only canonical connector when requested", async () => {
+ capture
+ .mockResolvedValueOnce(
+ jsonResult({ connectors: [{ uid: CANONICAL_UID, id: "scl_canonical" }] }),
+ )
+ .mockResolvedValueOnce(connectorResult(CANONICAL_UID, "scl_canonical", "app"));
+ run.mockResolvedValue(true);
+
+ await expect(setupConnectionConnector({ ...options(), principalType: "app" })).resolves.toEqual(
+ {
+ kind: "existing",
+ connectorUid: CANONICAL_UID,
+ },
+ );
+ expect(run).toHaveBeenCalledWith(
+ ["connect", "attach", CANONICAL_UID, "--yes", "--scope", "org_1"],
+ expect.any(Object),
+ );
+ });
+
+ it("creates an app-only connector when requested", async () => {
+ capture.mockResolvedValue(jsonResult({ connectors: [] }));
+ create.mockResolvedValue(connectorResult("linear/linear", "scl_created", "app"));
+ run.mockResolvedValue(true);
+ const fake = createFakePrompter({ single: () => "create", text: () => "linear" });
+
+ await expect(
+ setupConnectionConnector({
+ ...options(fake.prompter),
+ principalType: "app",
+ }),
+ ).resolves.toEqual({
+ kind: "created",
+ connectorId: "scl_created",
+ connectorUid: "linear/linear",
+ });
+ });
+
it("paginates and offers only existing connectors that support user authorization", async () => {
run.mockResolvedValue(true);
capture
diff --git a/packages/eve/src/setup/connection-connector.ts b/packages/eve/src/setup/connection-connector.ts
index 534a0e3d3..47206d68c 100644
--- a/packages/eve/src/setup/connection-connector.ts
+++ b/packages/eve/src/setup/connection-connector.ts
@@ -4,6 +4,8 @@ import type { Prompter } from "#setup/prompter.js";
import { readProjectLink, type VercelProjectReference } from "#setup/project-resolution.js";
import { captureVercel, runVercel, runVercelCaptureStdout } from "#setup/primitives/run-vercel.js";
+export type ConnectPrincipalType = "app" | "user";
+
/** Controls connector selection while adding a Connect-backed connection. */
export interface SetupConnectionConnectorOptions {
log: ChannelSetupLog;
@@ -13,6 +15,7 @@ export interface SetupConnectionConnectorOptions {
service: string;
creationType?: string;
connectionMethod?: "mcp" | "oauth";
+ principalType?: ConnectPrincipalType;
canonicalConnectorName: string;
project: VercelProjectReference;
signal?: AbortSignal;
@@ -67,13 +70,16 @@ function parseConnectorRef(value: unknown): ConnectConnectorRef | undefined {
return connector;
}
-/** Parses a created connector that can issue user credentials. */
-export function parseCreatedConnector(stdout: string): ConnectConnectorRef | undefined {
+/** Parses a created connector that can issue credentials for the requested principal type. */
+export function parseCreatedConnector(
+ stdout: string,
+ principalType: ConnectPrincipalType = "user",
+): ConnectConnectorRef | undefined {
const value = parseJson(stdout);
const connector = parseConnectorRef(value);
if (!isRecord(value) || connector === undefined) return undefined;
const subjects = value["supportedSubjectTypes"];
- return Array.isArray(subjects) && subjects.includes("user") ? connector : undefined;
+ return Array.isArray(subjects) && subjects.includes(principalType) ? connector : undefined;
}
function parseConnectorList(
@@ -144,7 +150,7 @@ async function listConnectors(
return connectors;
}
-async function supportsUserAuthorization(
+async function supportsPrincipalType(
options: SetupConnectionConnectorOptions,
project: VercelProjectReference,
connector: ConnectConnectorRef,
@@ -167,7 +173,7 @@ async function supportsUserAuthorization(
throw new Error(`Vercel returned invalid details for connector ${connector.uid}.`);
}
const subjects = value["supportedSubjectTypes"];
- return Array.isArray(subjects) && subjects.includes("user");
+ return Array.isArray(subjects) && subjects.includes(options.principalType ?? "user");
}
function connectorNames(connectors: readonly ConnectConnectorRef[]): Set<string> {
@@ -236,6 +242,7 @@ async function resolveFallbackConnector(
connectors: readonly ConnectConnectorRef[],
initialNotice: string,
): Promise<ConnectorResolution> {
+ const principalType = options.principalType ?? "user";
let notice = initialNotice;
while (true) {
const choice = await options.prompter.select<"find" | "create">({
@@ -250,12 +257,12 @@ async function resolveFallbackConnector(
if (choice === "find") {
const supported: ConnectConnectorRef[] = [];
for (const connector of connectors) {
- if (await supportsUserAuthorization(options, project, connector, onOutput)) {
+ if (await supportsPrincipalType(options, project, connector, onOutput)) {
supported.push(connector);
}
}
if (supported.length === 0) {
- notice = `No existing ${options.service} connectors support user authorization.`;
+ notice = `No existing ${options.service} connectors support ${principalType} credentials.`;
continue;
}
const byUid = new Map(supported.map((connector) => [connector.uid, connector]));
@@ -317,10 +324,10 @@ async function resolveFallbackConnector(
);
const raw = parseConnectorRef(parseJson(created.stdout));
const ownedId = raw?.id ?? CREATED_CONNECTOR.exec(transcript.join("\n"))?.[1];
- const connector = created.ok ? parseCreatedConnector(created.stdout) : undefined;
+ const connector = created.ok ? parseCreatedConnector(created.stdout, principalType) : undefined;
if (connector !== undefined) return { kind: "created", connector };
const message = created.ok
- ? `The ${options.service} connector does not support user authorization.`
+ ? `The ${options.service} connector does not support ${principalType} credentials.`
: connectorCreationFailure(options.service, created.stderr);
if (ownedId !== undefined) {
try {
@@ -344,6 +351,7 @@ async function resolveFallbackConnector(
export async function setupConnectionConnector(
options: SetupConnectionConnectorOptions,
): Promise<SetupConnectionConnectorResult> {
+ const principalType = options.principalType ?? "user";
const onOutput = createPromptCommandOutput(options.log);
const project = options.project;
const connectors = await listConnectors(options, project, onOutput);
@@ -353,7 +361,7 @@ export async function setupConnectionConnector(
let notice = `Could not find a connector named ${options.canonicalConnectorName}.`;
if (canonical !== undefined) {
- if (await supportsUserAuthorization(options, project, canonical, onOutput)) {
+ if (await supportsPrincipalType(options, project, canonical, onOutput)) {
if (await attach(options, project, canonical.uid, onOutput)) {
options.log.success(`Attached ${canonical.uid} connector`);
return { kind: "existing", connectorUid: canonical.uid };
@@ -361,7 +369,7 @@ export async function setupConnectionConnector(
options.signal?.throwIfAborted();
notice = `Could not attach ${canonical.uid}.`;
} else {
- notice = `${canonical.uid} does not support user authorization.`;
+ notice = `${canonical.uid} does not support ${principalType} credentials.`;
}
}