fix(next-config): move serverActions to experimental for Next.js 15+ compatibility
Some checks failed
Monorepo Pipeline / ⚡ Prioritize Release (push) Successful in 2s
Monorepo Pipeline / 🧹 Lint (push) Failing after 18s
Monorepo Pipeline / 🧪 Test (push) Failing after 10s
Monorepo Pipeline / 🏗️ Build (push) Failing after 10s
Monorepo Pipeline / 🚀 Release (push) Has been skipped
Monorepo Pipeline / 🐳 Build Gatekeeper (Product) (push) Has been skipped
Monorepo Pipeline / 🐳 Build Build-Base (push) Has been skipped
Monorepo Pipeline / 🐳 Build Production Runtime (push) Has been skipped

This commit is contained in:
2026-04-13 12:30:31 +02:00
parent 8ec2ecb454
commit 0b929d00a1
17 changed files with 343 additions and 307 deletions

View File

@@ -1,9 +1,7 @@
import { Client } from "@modelcontextprotocol/sdk/client/index.js";
import { SSEClientTransport } from "@modelcontextprotocol/sdk/client/sse.js";
import { StdioClientTransport } from "@modelcontextprotocol/sdk/client/stdio.js";
import { tool } from "ai";
import { z } from "zod";
import { tool, jsonSchema } from "ai";
/**
* Connects to an external MCP Server and maps its tools to Vercel AI SDK Tools.
*/
@@ -54,9 +52,7 @@ export async function createMcpTools(mcpConfig: {
aiSdkTools[`${mcpConfig.name}_${extTool.name}`] = tool({
description: `[From ${mcpConfig.name}] ${extTool.description || extTool.name}`,
parameters: z
.any()
.describe("JSON matching the original MCP input_schema"), // Simplify for prototype
parameters: jsonSchema(toolSchema as any),
// @ts-expect-error - AI strict mode overload bug with implicit zod inferences
execute: async (args: any) => {
const result = await client.callTool({