What is MCP?
Model Context Protocol (MCP) is an open standard that enables AI models to seamlessly discover and execute external tools at runtime. Instead of being limited to text generation, AI models can interact with filesystems, search the web, query databases, and execute custom business logic through external MCP servers. Bifrost provides a comprehensive MCP integration that goes beyond simple tool execution:- MCP Client: Connect to any MCP-compatible server (filesystem tools, web search, databases, etc.)
- MCP Server: Expose your connected tools to external MCP clients (like Claude Desktop)
- Agent Mode: Autonomous tool execution with configurable auto-approval
- Code Mode: Let AI write and execute TypeScript to orchestrate multiple tools
Security-First Design
By default, Bifrost does NOT automatically execute tool calls. All tool execution requires explicit API calls, ensuring human oversight for potentially dangerous operations. However, you can enable Agent Mode to allow automatic execution of specific tools via the
tools_to_auto_execute configuration.| Principle | Description |
|---|---|
| Explicit Execution | Tool calls from LLMs are suggestions only - execution requires separate API call |
| Granular Control | Filter tools per-request, per-client, or per-virtual-key |
| Opt-in Auto-execution | Agent mode with auto-execution must be explicitly configured |
| Stateless Design | Each API call is independent - your app controls conversation state |
Key Capabilities
Connect to MCP Servers
Connect to external MCP servers via STDIO, HTTP, or SSE protocols
Tool Execution
Execute tools with full control over approval and conversation flow
Agent Mode
Enable autonomous tool execution with configurable auto-approval
Code Mode
Let AI write TypeScript to orchestrate multiple tools in one request
MCP Gateway URL
Expose Bifrost as an MCP server for Claude Desktop and other clients
Tool Hosting
Register custom tools directly in your Go application
Tool Filtering
Control which tools are available per request or per virtual key
How MCP Works in Bifrost
Bifrost acts as both an MCP client (connecting to external tool servers) and optionally as an MCP server (exposing tools to external clients like Claude Desktop). For detailed architecture information, see the MCP Architecture documentation.Basic Tool Calling Flow
The default tool calling pattern in Bifrost is stateless with explicit execution:- No unintended API calls to external services
- No accidental data modification or deletion
- Full audit trail of all tool operations
- Human oversight for sensitive operations
Why Code Mode Matters
If you’re planning to use 3+ MCP servers, read the Code Mode documentation carefully. Code Mode reduces token usage by 50%+ and execution latency by 40-50% compared to classic MCP by having the AI write TypeScript code to orchestrate tools in a sandbox, rather than exposing 100+ tool definitions directly to the LLM.Next Steps
1
Connect to MCP Servers
2
Enable Code Mode (for 3+ servers)
3
Execute Tools
4
Enable Agent Mode

