Skip to main content

How tools work in MagOneAI

MagOneAI agents connect to external services through MCP (Model Context Protocol), Anthropic’s open standard for AI-tool communication. Instead of building proprietary integrations, MagOneAI adopted MCP to ensure your agents can work with any MCP-compatible tool — now and in the future. When an agent needs to take action in the real world — schedule a meeting, send an email, query a database, or search the web — it calls a tool. The platform handles authentication, execution, and response handling, so your agents can focus on reasoning and decision-making.

MCP architecture overview

The Model Context Protocol defines a standardized way for AI agents to discover and interact with external tools:
  • MCP servers expose tools and resources to agents
  • MagOneAI connects to MCP servers as a client on behalf of your agents
  • Each tool has defined parameters and return types using JSON Schema
  • Agents discover available tools and call them during reasoning loops
This architecture means you’re not locked into a proprietary tool ecosystem. Tools built for MagOneAI work with any MCP client, and tools built for other MCP clients work with MagOneAI.

Built-in tools

MagOneAI includes ready-to-use integrations with popular services. Enable them in your project settings and connect your accounts.

Custom tools

Beyond built-in integrations, you can add any MCP-compatible tool server to MagOneAI. Connect your internal APIs, proprietary systems, or third-party services:
  • Build an MCP server using Python or TypeScript SDKs
  • Wrap any REST API with tool definitions
  • Register the server in your project settings
  • Agents can now call your custom tools
Learn more in the Custom MCP tools guide.

OAuth flow management

For tools that require user authentication (Google, Microsoft), MagOneAI handles the entire OAuth flow:
1

Configure OAuth credentials

Add your OAuth client ID and secret in the Admin Portal. These are stored securely in HashiCorp Vault.
2

Users authorize once

When a user first uses a tool, they complete the OAuth consent flow in their browser.
3

Platform manages tokens

MagOneAI stores access tokens and refresh tokens in Vault. Token refresh happens automatically — users never see expired credentials.
4

Agents call tools

Credentials are injected at runtime when agents execute tools. No credentials in logs or configurations.
Users authenticate once per service. After that, agents can use those tools on the user’s behalf without re-authentication.

Tool execution in workflows

You can use tools in two ways within your workflows:

Via Agent nodes

When you attach tools to an agent, the agent decides when and how to call them based on its reasoning. This is non-deterministic — the agent chooses which tools to use and with what parameters. Example: An agent node with system prompt “Schedule a meeting with the client based on their availability” will:
  1. Check the client’s calendar using the calendar tool
  2. Find available time slots
  3. Create a calendar event with appropriate details

Via Tool nodes

Tool nodes execute a specific tool with specified parameters. This is deterministic — you control exactly which tool runs and when. Example: A Tool node configured to “Send email to [email protected] with subject ‘Weekly Report’ and body from variable report_content” will always send that exact email. Use Agent nodes for intelligence and flexibility. Use Tool nodes for guaranteed execution of specific actions.

Security and credentials

All credentials are stored in HashiCorp Vault:
  • API keys for platform-level integrations (OpenAI, Anthropic, etc.)
  • OAuth tokens for user-authenticated services (Google, Microsoft)
  • Database connection strings for SQL tools
  • Custom integration secrets for your internal APIs
Credentials are never exposed in:
  • Workflow configurations
  • Agent logs or traces
  • API responses
  • User interfaces
They’re injected at runtime only when needed, then immediately discarded from memory.
MCP (Model Context Protocol) is Anthropic’s open standard for AI-tool communication. MagOneAI adopted MCP to ensure interoperability and avoid proprietary tool formats. Tools you build today will work with the AI ecosystem of tomorrow.

Next steps