Connect the ISMS Copilot MCP server to the Vercel AI SDK
Setup tested on 2026-11-29 with ai 7.0.184 with @ai-sdk/mcp 2.0.106: the files below listed ISMS Copilot's tools and ran one read call on our test account.
In the AI SDK, createMCPClient from @ai-sdk/mcp turns a remote MCP server into tools you pass to generateText or streamText. A TypeScript app can then let its model ask ISMS Copilot for the SOC 2 or ISO 27001 answer instead of improvising it in your product. The module below uses the HTTP transport with a bearer header, tools(), then execute on list_workspaces, with no model and no API key involved. It is the check we ran on Node.js.
Who does what
Vercel AI SDK
Runs your TypeScript app, streams the model's reply and executes the ISMS Copilot tools the model calls.
ISMS Copilot
Answers the compliance question behind each call and checks the text your app is about to show.
You
Choose the tools your app exposes and review what it tells your users about their obligations.
The tested setup
- 1
Create a token
Sign up at chat.ismscopilot.com (free, no card), open Settings, Connected apps, and create a token. The Agent delegation preset grants account:read, workspaces:read, conversations:create, company_context:read and memories:read, with no write scopes. Our own check used a narrower token with five read scopes only (account, workspaces, memories, documents, company context), which is enough for the check below. conversations:create lets your agent ask questions, and each question uses your plan's messages. Copy the pat-isms- value once and keep it in ISMS_COPILOT_TOKEN, never in a committed file.
- 2
Install the packages
In your project, install the versions this page shows.
Install npm install ai@7.0.184 @ai-sdk/mcp@2.0.106 - 3
Run the check
Save the module as check-ismscopilot.mjs and run it with ISMS_COPILOT_TOKEN set. It closes the client at the end, as the AI SDK docs ask.
check-ismscopilot.mjs import { createMCPClient } from "@ai-sdk/mcp"; const ismscopilot = await createMCPClient({ transport: { type: "http", url: "https://account.ismscopilot.com/v1/account/mcp", headers: { Authorization: `Bearer ${process.env.ISMS_COPILOT_TOKEN}` }, }, }); const tools = await ismscopilot.tools(); console.log(Object.keys(tools)); const result = await tools.list_workspaces.execute({}, { toolCallId: "check", messages: [] }); console.log(JSON.stringify(result)); await ismscopilot.close();
The server URL, if you add it by hand:
https://account.ismscopilot.com/v1/account/mcpWhat the test showed
tools() returned 29 tools, and execute on list_workspaces returned the test account's sample workspaces.
Tested with ai 7.0.184 with @ai-sdk/mcp 2.0.106, Node.js 26. The token was read-only, on our test account with sample data.
Use the tools in generateText
Pass the object from tools() as the tools option of generateText or streamText with your model, and close the client when the response finishes. That run needs your model provider's key and was not part of our test.
Every tool, the scopes each one needs and the sign-in options: the ISMS Copilot MCP server.
What it does not do
- Keep the token on the server side. Never send ISMS_COPILOT_TOKEN to the browser bundle.
- ISMS Copilot works from what your agent sends it, plus the company profile, memories and documents you keep in ISMS Copilot. It does not read your systems on its own.
- Answers and findings are drafts for a person to decide. ISMS Copilot does not certify anyone; your auditor's judgement stays your auditor's.
If something does not work
- Serverless function hangs after the reply? Close the MCP client in onFinish or a finally block; an open client keeps the connection alive.
- Calling execute yourself? It takes a second options argument with a toolCallId and the messages, as in the module above; inside generateText the SDK fills it in.
AI SDK docs: MCP tools. Connect an agent with a token, in the ISMS Copilot docs.
Every AI and tool that connects: use ISMS Copilot in your AI. ISMS Copilot in Mastra. ISMS Copilot in n8n. ISMS Copilot in the OpenAI Agents SDK. Building your own agent? The developer hub.
ISMS Copilot is made by Better ISMS. It is not affiliated with or endorsed by Vercel. Product names belong to their owners. Agents get a Markdown version of this page by sending Accept: text/markdown.
The GRC expert your agent calls.
Free to start, no card. Create a token, run the check, then give the tools to your agent.

ISMS Copilot