OpenAI released the Agents SDK yesterday, which is great because of its simplicity. I just added MCP support for it, which is currently available as a fork here: https://github.com/lastmile-ai/openai-agents-mcp (and on pypi as the openai-agents-mcp package).
You can specify the names of MCP servers to give an Agent access to by setting its `mcp_servers` property.
The Agent will then automatically aggregate tools from the MCP servers, as well as any `tools` specified, and create a single extended list of tools. This means you can seamlessly use MCP servers, local tools, OpenAI-hosted tools, and other kinds of Agent SDK tools through a single unified syntax -- and have them interact in the same Agent run loop!
Everything else stays exactly the same.
```
agent = Agent( name="MCP Assistant",
instructions="You are a helpful assistant with access to MCP tools.",
tools=[your_other_tools], # Regular tool use for Agent SDK
mcp_servers=["fetch", "filesystem"] # Names of MCP servers from your config file (see below)
)```
The servers are configured in an `mcp_agent.config.yaml` file, very similar to how they are configured for Claude Desktop:
```
$schema: "https://raw.githubusercontent.com/lastmile-ai/mcp-agent/main..."
mcp:
servers:
fetch:
command: "uvx"
args: ["mcp-server-fetch"]
filesystem:
command: "npx"
args: ["-y", "@modelcontextprotocol/server-filesystem", "."]
slack:
command: "npx"
args: ["-y", "@modelcontextprotocol/server-slack"]
```I have submitted an issue and PR into the openai-agents-python repo [2], and my plan is instead of a fork, I will create an extension package for MCP support (coming later today).
I was able to do this pretty quickly (got it working yesterday) because I've been building the mcp-agent library (https://github.com/lastmile-ai/mcp-agent), which makes MCP server aggregation/connection really easy. I did a Show HN about it a few weeks ago [3].
Wanted to share here to get community feedback on whether this is useful, which will help me decide if I should dedicate more time to it.
[1] - https://github.com/lastmile-ai/mcp-agent
[2] - https://github.com/openai/openai-agents-python/issues/23
https://huggingface.co/spaces/lastmileai/gradio-notebook-template
Hi HN Community!
I’m Sarmad, co-founder of LastMile AI, and today I’m excited to share Gradio Notebook, our latest open-source project in collaboration with Hugging Face. Gradio Notebook [1] is a notebook component that offers an interactive playground for Hugging Face models of any modality in a single Hugging Face space. It brings the familiar UX of a notebook to generative AI model inference, and enables much richer interactions than a chat interface allows.
If you're a Hugging Face space creator looking for speed and ease of development, Gradio Notebook gets your space ready in 5 minutes with < 10 lines of code (without having to build your own UI at all).
Key features:
* Use any combination of text, image, or audio models in a single space, and even chain models together.
* Interact and experiment with models using a pre-built notebook UI, which is a familiar, intuitive interface for multimodal interaction. At its core, the notebook contains cells (we call them “prompts”), which are associated with a model to run.
* Get a shareable URL to share the space outputs with others (my personal favorite feature, since it isn’t possible on HF today).
* Download your space config (prompts and model settings) as a JSON file, and use it in your application via our SDK [2].
This is a new user experience for generative AI, and for Hugging Face, and we are looking for feedback. If you frequently use HF spaces, and especially if you like to build spaces, please give this a try and get in touch!
Excited to hear from you, and looking forward to seeing what you create with Gradio Notebook! To get started, please use the Quickstart [1], which contains everything to set up and play with the component
[1] Link to Quickstart:
https://huggingface.co/spaces/lastmileai/gradio-notebook-template
[2] SDK:
https://aiconfig.lastmileai.dev/docs/gradio-notebook#gradio-notebook-api
[3] Gradio Notebook Docs:
https://aiconfig.lastmileai.dev/docs/gradio-notebook
[4] Repo (it’s all open source):
https://github.com/lastmile-ai/aiconfig/tree/main/gradio-notebook
The best part is that you can define your own “safety taxonomy” with it — custom policies for what is safe vs unsafe interactions between humans (prompts) and AI (responses).
I wanted to see how “safe” conversations with OpenAI’s ChatGPT were, so I ran a bunch of prompts (a mixture of innocuous and inappropriate) and asked LLaMA Guard to classify the interactions as safe/unsafe.
My key takeaways from the exercise: 1. OpenAI has done a good job of adding guardrails for its models. LLaMA Guard helped confirm this.
2. What makes this really cool is I may have a very specific set of policies I want to enforce ON TOP of the standard guardrails that a model ships with. LLaMA Guard makes this possible.
3. This kind of model chaining — passing responses from OpenAI models to LLaMA is becoming increasingly common, and I think we’ll have even more complex pipelines in the near future. It helped to have a consistent interface to store this multi-model pipeline as a config, especially because that same config also contains my safety taxonomy.
Try it out yourself:
GitHub: https://github.com/lastmile-ai/aiconfig/tree/main/cookbooks/LLaMA-Guard
Colab: https://colab.research.google.com/drive/1CfF0Bzzkd5VETmhsniksSpekpS-LKYtX
YouTube: <https://www.youtube.com/watch?v=XxggqoqIVdg>
Would love the community's feedback on the overall approach.