This week, OpenAI introduced its new agent building platform, featuring AgentKit and Agent Builder. Agent Builder provides a visual canvas interface, similar to Zapier and n8n, where users can draw, drag and drop control flows to build automated workflows.
The big deal is that creating an agent on your own is now considerably simpler due to OpenAI’s components, which save developers time.
This allows the builders to focus on building their workflow logic while benefiting from built-in guardrails, evals for robustness testing to ensure consistentcy and improved performance.
Whether you prefer to draw it or write code to automate your workflow, MCP is easily integrable.
Creating and Running MCP Servers
First things first, we need to run MCP servers in order to connect them as part of the workflow.
With our platform at mcptotal.io, you can sign up for free and immediately create a new space to running MCPs for your agent:
A space is an aggregation of MCP tools running as one MCP endpoint in a cloud hosted isolated container.
Taking this endpoint URL you can connect it to any AI client that speaks MCP.
And the next step, add various MCP servers to run under this space, dedicated for your agent workflow.
In this case we’re adding the ‘Gmail’ MCP server and authorizing it to use our inbox, so we can read and write emails:
And we added ‘PDF Maker’ too, so our agent can create cool PDFs because it knows the markdown language, and we got the space ready for use:
Note that you can also run any MCP server you wish in our platform, by adding a custom Python or Node package (uvx/npx) or a docker image, through clicking the first card in the homepage’s catalog.
Connecting the MCP Server
Back to the spaces page, clicking ‘Connect’ we can fetch the endpoint URL of the MCP server that our platform provides, which aggregates all the tools (Gmail and PDF Maker and this example) together.
OpenAI agents do not yet support OAuth and still might favor SSE over MCP according to their documentation!
Fortunately, our platform offers support for connecting to the space's MCP server, accommodating various protocols and authentication schemes.
However, from our tests, 'Streamable HTTP' also works alright, just without authentication either.
AgentKit Coding Integration
If you’re using their AgentKit you can do the following in this Python snippet:
A few notes regarding using MCPs with OpenAI:
- We keep the ‘require_approval’ field as 'never', so it can directly consume the MCP functionality. And the secret key is part of the URL in this case. Keeping it simple.
- ChatGPT might ask many questions in order to complete the request, so sometimes you might need to give it more details for sake of completeness, otherwise it will come back asking more questions about it.
- Obviously, don't forget setting your API key envar. For example in terminal: export OPENAI_API_KEY="<key here>"
- OpenAI's documentation warns that connecting to a malicious server can cause harm. We know it can try to steal data or fooling the agent to do unintended things. So make sure you connect it to trusted servers.
Agent Builder Integration for MCP
When using the builder dashboard with an MCP component, an access token must be used for authentication, good.
To connect it, select "Streamable HTTP" in the space's "Connect to" dialog.
Now choose "HTTP header" under Security, and a key will be displayed; this key is used as the HTTP header to authorize access to your server.
Back to the Agent Builder MCP configuration dialog, we now have a fitting pair of URL and secret that you can copy paste.
So it's more secure because of the use of a HTTP header that provides the access token to your MCP server.
Summary
MCPTotal simplifies the creation of an MCP server, enabling you to host various underlying tools (MCP servers) and securely expose them to OpenAI’s agent platform with appropriate URLs and credentials. We easily allow for running custom MCPs so you don't need to go through the hassle of deploying and managing them on your own.
Our architecture prioritizes isolated (single-tenant) and sandboxed server operations, along with auditing and logging for security and diagnostics that are accessible to you.
For further details on our security architecture, please refer to our blog here.
.png)
![Bad Apple but it's a sorting algorithm [video]](https://www.youtube.com/img/desktop/supported_browsers/chrome.png)

