// mcp/vercel-ai-sdk/

How do I add ToolForte to the Vercel AI SDK?

Create an MCP client with a StreamableHTTPClientTransport pointed at the server URL, ask it for its tools, and pass them to generateText or streamText. Any model the AI SDK supports can then call ToolForte.

Step by step

The server URL is https://toolforte.com/api/mcp. Nothing runs on your machine; the client connects to it over streamable HTTP.

  1. 01
    Install the packages
    npm install ai @modelcontextprotocol/sdk, plus the provider package for your model.
  2. 02
    Create the client
    Build the transport with the URL below and hand it to createMCPClient.
  3. 03
    Pass the tools to the model
    await client.tools() returns the ToolForte tools in the AI SDK's tool shape. Spread them into the tools option of generateText or streamText.
  4. 04
    Try a tool
    Prompt "Validate the IBAN NL91 ABNA 0417 1643 00 with ToolForte." and close the client when the call has finished.

Configuration

TypeScript
import { experimental_createMCPClient as createMCPClient, generateText } from "ai";
import { StreamableHTTPClientTransport } from "@modelcontextprotocol/sdk/client/streamableHttp.js";

const toolforte = await createMCPClient({
  transport: new StreamableHTTPClientTransport(new URL("https://toolforte.com/api/mcp")),
});
const tools = await toolforte.tools();
const { text } = await generateText({
  model, // any AI SDK model
  tools,
  prompt: "Validate the IBAN NL91 ABNA 0417 1643 00 with ToolForte.",
});
await toolforte.close();
Same, with an API key
new StreamableHTTPClientTransport(new URL("https://toolforte.com/api/mcp"), {
  requestInit: { headers: { Authorization: "Bearer tf_your_key_here" } },
})

Adding an API key

Does a key work in the Vercel AI SDK?
Yes: requestInit.headers on the transport. Everything below applies.

Pass requestInit with a headers object to the transport, as in the second snippet. It is sent on every request.

A key starts with tf_ and is created on your account page. It is free, and it is what gives memory a private owner and workflows an account to run on.

Free or paid: what changes

Everything on this page works without paying. A key, free or paid, changes how much of the server-side work you can do in a month. A tool call costs 1 credit, a render 25, memory 0.

Without a keyFree keyToolForte Pro
PriceNothingNothing€19.00 a month, or €190.00 a year
Utility toolsAll of them, 200 requests a day per session1,000 credits a month, so up to 1,000 calls7,500 credits a month, so up to 7,500 calls
Renders (PDF, screenshot, read_page)3 a dayUp to 40 a month from the same balanceUp to 300 a month from the same balance
Agent memoryRefused: needs a key, so entries have an ownerPrivate to your key, kept 30 days, never meteredPrivate to your key, kept 365 days, never metered
Saved workflows (workflow_run)Refused: a workflow belongs to an accountYes, each step costs what its tool costsYes, each step costs what its tool costs
Usage historyNone7 days365 days
When the month runs outWait for tomorrowBuy credits from 100 for €1.00, they never expire, or move to ToolForte ProBuy credits from 100 for €1.00, they never expire

The same balance also pays for the REST API and the AI tools, and every tool result tells the assistant what is left. When it is gone the call is refused with a plain message; nothing keeps running on credit. Full detail on pricing and credits and plans.

From free to paid, in order

  1. Create a free account. An email address is all it asks for.
  2. On your account page, create an API key. It is shown once; copy it then.
  3. Put the key in the Vercel AI SDK as described above, and restart or refresh the connection.
  4. Ask for something server-side, such as a PDF. The result names your remaining balance, which proves the key arrived.
  5. Running low? Buy credits on the pricing page, or take ToolForte Pro there for the larger monthly balance. Both use the same key; nothing changes in the Vercel AI SDK.

Check that it works

One question is enough to see the server answer instead of the model.

Ask the assistant
Validate the IBAN NL91 ABNA 0417 1643 00 with ToolForte.
What a correct answer looks like
The assistant calls validate_iban and reports the result of the mod-97 check and the bank country. If it answers without calling a tool, the server is not connected yet: look for it in the client's MCP or connector list and make sure it is switched on for the conversation.

Questions

The the Vercel AI SDK specifics first, then what applies to every client.

Why does the import say experimental?

The AI SDK marks its MCP client experimental while the interface settles. It works today; the name may drop the prefix in a later release, and the ToolForte side does not change.

What does the ToolForte MCP server cost?

The 150 deterministic utilities are free and so is agent memory. Each client session gets 3 renders a day without a key. With a free API key you get a monthly balance of 1,000 credits: a tool call costs 1 credit and a render 25, so that is 40 renders or 1,000 calls. ToolForte Pro is €19.00 a month for 7,500 credits, and any account can buy extra credits from 100 for €1.00 that never expire. You never have to guess: every tool in the list carries its price, and every result says what the call cost and what is left.

Do I need an API key?

Not for the utilities. A key is what makes memory private to you, gives access to the workflows on your account, and moves renders onto a monthly balance instead of the daily allowance. You create one on your ToolForte account page and pass it as an Authorization: Bearer header; an X-API-Key header works too.

Which tools does the server expose?

180 tools in four groups: 150 deterministic utilities such as validate_iban, calculate_vat, working_days_between, parse_cron and test_regex; 14 render tools (html_to_pdf, url_to_pdf, url_screenshot, qr_code_png, pdf_merge, pdf_split, images_to_pdf, image_resize, image_convert, image_compress, read_page, strip_metadata, pdf_to_docx, docx_to_pdf) that return hosted files or page content; 4 memory tools (memory_set, memory_get, memory_list, memory_delete); and 3 workflow tools (workflow_list, workflow_run, workflow_propose).

Why does my client list only a handful of tools?

On purpose. A session that loads all 180 tool definitions spends tens of thousands of tokens before the first message, and models choose worse from a long list, so the plain URL lists a small core plus three meta tools: search_tools finds any tool by a word from the job, describe_tool returns its full schema, and run_tool runs it by name. Every tool stays callable by name as well. To list everything up front, connect to https://toolforte.com/api/mcp?tools=all; to pick jobs, use ?tools=pdf,dutch or any names, comma separated. With the npm bridge, set TOOLFORTE_TOOLS.

Is what I send to a tool stored?

Tool inputs are processed on ToolForte servers and not kept, except for the memory tools, whose entire purpose is to keep what you store, and rendered files, which are hosted for 24 hours behind a signed link. The browser tools on toolforte.com never send anything; the MCP server necessarily does.

Is there anything to install?

No. The server runs at toolforte.com and every client on this page connects to it over streamable HTTP. A client that only speaks stdio, such as the Claude desktop app on the free plan, runs "npx -y toolforte-mcp" instead: a small bridge on npm that connects to the same server.

What you can ask once it is connected

The server answers to 180 tool names. The full list, grouped and explained, is on the MCP page.

Check an IBAN or a VAT number, compute VAT on an amount, count working days between two dates in the Netherlands, explain a cron expression, test a regex, format or diff JSON, turn an HTML report into a hosted PDF, screenshot a page, read a JavaScript-rendered page as Markdown, remember something for next week, or run a saved workflow by id. See every tool.

Other clients
The MCP server
Every tool the server exposes, what each one costs, and the endpoint itself.
Claude
How do I add ToolForte to Claude?
Claude Code
How do I add ToolForte to Claude Code?
Cursor
How do I add ToolForte to Cursor?
VS Code
How do I add ToolForte to VS Code and GitHub Copilot?
ChatGPT
How do I add ToolForte to ChatGPT?
Windsurf
How do I add ToolForte to Windsurf?
Gemini CLI
How do I add ToolForte to Gemini CLI?
Codex CLI
How do I add ToolForte to Codex CLI?
Cline
How do I add ToolForte to Cline?
Roo Code
How do I add ToolForte to Roo Code?
Continue
How do I add ToolForte to Continue?
OpenCode
How do I add ToolForte to OpenCode?
Zed
How do I add ToolForte to Zed?
the Anthropic API
How do I add ToolForte to the Anthropic API?
the OpenAI Agents SDK
How do I add ToolForte to the OpenAI Agents SDK?
LangChain
How do I add ToolForte to LangChain?