- OpenAI Connectors: OpenAI-maintained MCP wrappers for third party services that don’t have official MCP servers (Gmail, Google Drive, Outlook, Microsoft Teams, Dropbox etc.). Using these connectors requires OAuth client registration and authorization with the provider.
 - Remote MCP servers: Any MCP server operated by you or a third party. You provide the server URL and any required authentication details, and the agent can call the server’s MCP tools.
 
Using OpenAI Connectors & MCP Tools with Agents
The simplest way to give your agent access to MCP tools is to pass them directly to thetoolkits parameter when creating the agent (see example below). This will ensure the agent always has access to the tools.
For more advanced use cases, you can also let users dynamically enable/disable specific connectors per message - see Dynamic MCP Tools for details.
In both cases, MeshAgent talks to OpenAI via the OpenAIResponsesAdapter. This adapter gathers the toolkits available to the agent on that turn, manages tool execution, streaming responses, and returning the final result.
Example: Create an Agent with MCP Tools
Let’s create aChatBot that can use the public DeepWiki MCP Server which does not require an access token or OAuth.
For this ChatBot we’ll define:
- A 
Toolkit: a collection of related tools the agent can use - An 
MCPTool: connects to an MCP server MCPConfig: configuration for the MCP connectionMCPServer: the actual server details (URL, authentication details)
bash
myroom, and start talking to the agent. Ask it about public GitHub repositories and it will use the DeepWiki MCP tools to respond. For example you can ask “What’s in the README on the Pydantic AI repository?”.
Package and deploy the agent
Once satisfied with the agent, we can package and deploy it as a project service so it’s automatically available to all the rooms in a project, or as a room service so it’s always available in a specific room. To do so we’ll create a Dockerfile, build/push the image, create a yaml file that defines the service, then deploy it using the MeshAgent CLI. Step 1: Create the DockerfileDockerfile
yaml
bash
Conclusion
OpenAI Connectors and MCP Servers extend your agents with third-party capabilities. When adding these tools, consider:- What data you’re sharing with external services
 - Who operates the MCP servers you connect to
 - Whether agents should require approval before using certain tools
 
Related Topics
- Dynamic Connectors and MCP Servers: Configure your agent and UI so users can dynamically select tools for the agent per message.
 - Introduction to Services and Containers: Learn more about project and room services and how to run ad-hoc commands using the Containers API.
 - Packaging Services: Learn how to create a meshagent.yaml file to package a project or room service
 - Deploying Services: Learn how to deploy a project or room service from MeshAgent Studio or using the MeshAgent CLI
 - Secrets: Understand how to use secrets and OAuth with MeshAgent