Docs
MCP

Add MCP Servers

Add, edit, enable, disable, and remove MCP servers from Placet, API, or the agent.

Facio exposes MCP management in three ways: Placet settings, the management API, and the agent's own manage_mcp tool.

Agent-managed MCP

The agent can help create MCP servers itself. A typical flow is:

  1. User asks for a capability, for example GitHub, browser testing, database access, or docs search.
  2. Agent researches the MCP server command and required credentials.
  3. Agent asks the user to confirm the exact server name and config.
  4. If credentials are needed, the agent uses a password/form field so the secret goes into the credential store.
  5. Agent calls manage_mcp with the confirmed config.
  6. Facio writes mcp.json, connects the server, and registers tools named like mcp_server_tool.

The confirmation step matters. MCP servers can run local commands or access external accounts, so adding one is treated as a sensitive runtime change.

Management API

List servers:

curl http://localhost:8900/api/v1/mcp \
  -H "Authorization: Bearer $FACIO_MANAGEMENT_TOKEN"

Add a stdio server:

curl -X POST http://localhost:8900/api/v1/mcp \
  -H "Authorization: Bearer $FACIO_MANAGEMENT_TOKEN" \
  -H 'Content-Type: application/json' \
  -d '{
    "name": "github",
    "type": "stdio",
    "command": "npx",
    "args": ["-y", "@modelcontextprotocol/server-github"],
    "env": {"GITHUB_PERSONAL_ACCESS_TOKEN": "${credentials.GITHUB_TOKEN}"},
    "enabledTools": ["*"],
    "enabled": true
  }'

Edit or lifecycle actions:

EndpointAction
GET /api/v1/mcp/{name}Read one server summary.
PATCH /api/v1/mcp/{name}Update config fields.
DELETE /api/v1/mcp/{name}Remove the server.
POST /api/v1/mcp/{name}/enableEnable and connect.
POST /api/v1/mcp/{name}/disableDisconnect and keep config.
POST /api/v1/mcp/{name}/restartReconnect.

Server config fields

FieldMeaning
typestdio, sse, or streamableHttp. Omitted type is inferred where possible.
command / argsCommand and arguments for stdio servers.
envExtra environment variables for stdio servers. Supports ${credentials.KEY} placeholders.
urlHTTP/SSE endpoint.
headersHTTP/SSE headers. Supports ${credentials.KEY} placeholders.
toolTimeoutPer MCP tool-call timeout in seconds.
enabledTools['*'] for all tools, a list of raw MCP names, wrapped names, or [] for none.
enabledWhether Facio should connect the server at startup.

What to verify

  • The command exists in the Facio container, not only on the host.
  • The server package is trusted and maintained.
  • Required account scopes are narrow.
  • Credentials use placeholders rather than raw values.
  • The first connection reports the expected tool list.
  • Tool-call policy is configured for high-impact MCP tools.

On this page