Back to blog

Product · May 22, 2026

Connecting MCP Servers to Facio: A Practical Guide

Step-by-step guide to connecting MCP servers to Facio: adding, configuring, securing, and troubleshooting — with practical examples and best practices.

MCPIntegrationTutorialAgent ToolsDeployment

Connecting MCP Servers to Facio: A Practical Guide

The Model Context Protocol (MCP) has become the standard way for AI agents to connect to external tools and services. Facio supports MCP natively — add a server, and its tools become available to your agents instantly. This guide walks through the practical steps.

What MCP Brings to Facio

MCP servers expose tools — functions that can be called, resources that can be read, and prompts that can be used — over a standardized protocol. When you connect an MCP server to Facio, every tool the server provides becomes callable by your agent, just like a built-in capability.

This means:

  • Database tools → your agent can query databases directly
  • API integrations → your agent can interact with SaaS platforms
  • File system tools → your agent can read and write files
  • Browser tools → your agent can navigate the web
  • Custom business logic → your agent can trigger internal workflows

Facio ships with several built-in MCP servers (browser, file tools, cron). Adding community or custom servers extends this further.

Adding an MCP Server to Facio

Use the manage_mcp tool to register a new server. Here's the basic pattern:

{
  "action": "add",
  "name": "my-server",
  "config": {
    "command": "npx",
    "args": ["-y", "@org/mcp-server-name"]
  }
}

For a Python MCP server:

{
  "action": "add",
  "name": "python-mcp",
  "config": {
    "command": "python",
    "args": ["-m", "my_mcp_server"]
  }
}

For HTTP-based MCP servers (e.g., hosted on a remote endpoint):

{
  "action": "add",
  "name": "remote-mcp",
  "config": {
    "url": "https://my-mcp-server.example.com/mcp"
  }
}

After adding, enable the server with manage_mcp(action="enable", name="my-server") and restart it if needed.

Real Example: Blotato Social Media API

Blotato provides an MCP server for social media scheduling. The connection looks like:

{
  "action": "add",
  "name": "blotato",
  "config": {
    "url": "https://mcp.blotato.com/mcp",
    "headers": {
      "Authorization": "Bearer ${credentials.BLOTATO_API_KEY}"
    }
  }
}

Once connected, the agent can schedule posts, check publishing status, and manage social media operations — all through natural language instructions to Facio.

MCP Server Discovery

Where to find MCP servers:

  • Glama MCP Registry: glama.ai/mcp/servers — trending servers with community ratings
  • mcpservers.org: Community-curated directory
  • Hacker News: Search site:news.ycombinator.com "Show HN" MCP server for newly released servers
  • GitHub: Search for mcp-server topics for open-source implementations
  • Payload CMS MCP: github.com/your-org/payload-mcp — CMS integration via MCP

Configuration Best Practices

Security

  • Run MCP servers that handle sensitive data with minimal permissions
  • Use enabled_tools to restrict which tools the agent can access
{
  "action": "edit",
  "name": "my-server",
  "updates": {
    "enabled_tools": ["read", "search"]
  }
}

Timeout Management

  • Set tool_timeout (seconds) for servers with potentially slow operations
  • The default is generous, but API calls or database queries may need tuning
{
  "action": "edit",
  "name": "my-server",
  "updates": {
    "tool_timeout": 120
  }
}

Environment Variables

For servers that need API keys or config, pass them via the env field:

{
  "action": "add",
  "name": "secure-server",
  "config": {
    "command": "node",
    "args": ["./server.js"],
    "env": {
      "API_KEY": "${credentials.MY_API_KEY}",
      "REGION": "eu-west-1"
    }
  }
}

Troubleshooting

Server won't start: Check that the binary (npx, python, etc.) is available and the package is installed. Use exec to test the command manually first.

Tools not appearing: After adding and enabling, use manage_mcp(action="restart", name="...") to reload the connection.

Timeouts: Increase tool_timeout or check if the MCP server has a long initialization phase.

Authentication errors: Verify the server supports header-based auth (for HTTP) and that credentials are correctly stored via ask_form with password fields.

Building Your Own MCP Server

Facio supports the standard MCP protocol. Any MCP-compatible server works. For Python, FastMCP is the fastest path:

from mcp.server.fastmcp import FastMCP

mcp = FastMCP("my-tool")

@mcp.tool()
def query_database(query: str) -> str:
    """Run a SQL query against the analytics DB"""
    # implementation
    return result

mcp.run()

Then connect it:

{
  "action": "add",
  "name": "analytics-mcp",
  "config": {
    "command": "python",
    "args": ["/path/to/server.py"]
  }
}

Key Takeaways

  • Facio natively supports MCP — tools from any connected server become available to your agents
  • Three transport modes: local process (command), HTTP endpoint (url), and hybrid
  • Use enabled_tools to restrict agent access and tool_timeout for slow operations
  • Store API keys in Facio's credential system (never in plaintext config) and reference via ${credentials.KEY}
  • Any MCP-compatible server works — build your own with FastMCP in Python or the TypeScript SDK

MCP specification: modelcontextprotocol.io · MCP server registry: glama.ai/mcp/servers · Facio docs: facio.bot/docs

Keep reading

More on Product

View category
Jun 6, 2026Product

Facio's Workspace System: How File Tools and Layout Conventions Keep Agent Work Organized

AI agents that can read, write, and edit files are common. Agents that understand where files belong — following project conventions, keeping roots clean, and organizing deliverables — are rare. Facio's workspace system combines a full file tool surface (read_file, write_file, edit_file, grep, glob, patch_file) with WORKSPACE.md layout rules that give agents structural awareness. Here's how it turns file access into file discipline.

Jun 5, 2026Product

Facio's Built-in Log System: How read_logs Makes Agent Execution Auditable in Real Time

When an AI agent makes a mistake at 4 AM, you need to know what happened — not wait for a human to grep through server logs. Facio's read_logs tool gives agents access to their own persistent execution log, with level filtering, time-range queries, and regex search. The agent diagnoses its own failures. Here's how the architecture works and why self-auditability matters for production autonomy.

Jun 4, 2026Product

Facio's Multi-Provider Architecture: How switch_model Enables Dynamic Model Routing

Locking an AI agent to a single model provider is like locking a developer to a single programming language — it works until it doesn't. Facio's switch_model tool lets agents change LLM providers mid-conversation with human approval, enabling cost-optimized routing, provider fallback, and capability-aware task delegation across OpenAI, Anthropic, Google, OpenRouter, and any OpenAI-compatible endpoint.