How do I add ToolForte to the OpenAI Agents SDK?
Create an MCPServerStreamableHttp with the server URL and pass it in the agent's mcp_servers list. The SDK lists the tools on connect and the agent calls them like any function tool.
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.
- 01Install the SDKpip install openai-agents. The MCP classes live in agents.mcp.
- 02Connect the serverOpen an MCPServerStreamableHttp as an async context manager with the URL below. It connects and fetches the tool list.
- 03Give it to the agentPass the server in mcp_servers when you build the Agent, then run it with Runner.run.
- 04Try a toolRun the agent on "Validate the IBAN NL91 ABNA 0417 1643 00 with ToolForte." and print result.final_output.
Configuration
import asyncio
from agents import Agent, Runner
from agents.mcp import MCPServerStreamableHttp
async def main():
async with MCPServerStreamableHttp(
name="toolforte",
params={"url": "https://toolforte.com/api/mcp"},
) as toolforte:
agent = Agent(
name="Assistant",
instructions="Use ToolForte for anything that must be exact.",
mcp_servers=[toolforte],
)
result = await Runner.run(agent, "Validate the IBAN NL91 ABNA 0417 1643 00 with ToolForte.")
print(result.final_output)
asyncio.run(main())params={"url": "https://toolforte.com/api/mcp", "headers": {"Authorization": "Bearer tf_your_key_here"}},Adding an API key
Add a headers map to params, as in the second snippet. The SDK sends it on every request to the server.
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
Without a key the server answers initialize, tools/list, prompts and resources, and it will search and describe tools, but it runs nothing else. AI tools and renders never run without a key. A key, free or paid, sets how much of the server-side work you can do in a month; the free one is a trial. A tool call costs 1 credit, a render 25; memory is free.
| Without a key | Free key | ToolForte Pro | |
|---|---|---|---|
| Price | Nothing | Nothing | €19.00 a month, or €190.00 a year |
| Utility tools | Listed and described, not run | 100 credits a month, so up to 100 calls | 7,500 credits a month, so up to 7,500 calls |
| Renders (PDF, screenshot, read_page) | Refused: every call needs a key | Up to 4 a month from the same balance | Up to 300 a month from the same balance |
| Agent memory | Refused: needs a key, so entries have an owner | Private to your key, kept 30 days, never metered | Private to your key, kept 365 days, never metered |
| Saved workflows (workflow_run) | Refused: a workflow belongs to an account | Yes, each step costs what its tool costs | Yes, each step costs what its tool costs |
| Usage history | None | 7 days | 365 days |
| When the month runs out | Not applicable: a tool that does work needs a key | Buy credits from 100 for €1.00, they never expire, or move to ToolForte Pro | Buy 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
- Create a free account. An email address is all it asks for.
- On your account page, create an API key. It is shown once; copy it then.
- Put the key in the OpenAI Agents SDK as described above, and restart or refresh the connection.
- Ask for something server-side, such as a PDF. The result names your remaining balance, which proves the key arrived.
- 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 OpenAI Agents SDK.
Check that it works
One question is enough to see the server answer instead of the model.
Validate the IBAN NL91 ABNA 0417 1643 00 with ToolForte.
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 OpenAI Agents SDK specifics first, then what applies to every client.
The tool list is fetched on every run. Can I cache it?
Yes: pass cache_tools_list=True to MCPServerStreamableHttp. The ToolForte list only changes when the server is deployed, so caching it for the life of the process is safe.
What does the ToolForte MCP server cost?
The 150 deterministic utilities can be listed and described freely. search_tools and describe_tool run without a key; every other tool call needs an API key. AI tools and renders never run without one. The free account is a trial of 100 credits a month: a tool call costs 1 credit and a render 25, so that is 100 calls or 4 renders. 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 to connect. initialize, tools/list, prompts and resources work without a key, and so do search_tools and describe_tool. Every other tool call needs one, and the refusal says how to get it (api_key_required, or HTTP 401 with the same instructions when the client can sign in). AI tools and renders never run without one. You create a key on your ToolForte account page, or with POST https://toolforte.com/api/v1/keys/bootstrap and {"email"} from a script, which emails the key to that address, 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.