import { mcplug } from "@mcplug/client/ai"; const tools = await mcplug({ token, id: "01JSPD306WT46ZCMQRPVBC6RTE", constants: { EXA_API_KEY: '<VALUE>' } }); const { text, response } = await generateText({ model: openai("gpt-4o"), system: "You are a friendly assistant!", maxSteps: 10, messages: [{ role:"user", content:"Hello, what is the weather in Tokyo?" }], tools });
{ "mcpServers": { "mcplug": { "command": "npx", "args": [ "-y", "@mcplug/client@latest", "01JSPD306WT46ZCMQRPVBC6RTE" ], "env": { "MCPLUG_TOKEN": "<YOUR_TOKEN>", "EXA_API_KEY": "<VALUE>", } } } }