MCP Servers¶
Model Context Protocol (MCP) servers let an Agent connect to external tools, data sources, and internal systems. Within its authorization scope, the Agent can query data, invoke tools, access system capabilities, or perform specific operations.
Unlike a Skill, an MCP service is closer to a tool gateway. Services that connect to production systems, customer data, or write-capable APIs require particular attention to permissions, data scope, and operational risk.
If you are not sure whether to use a Skill, an MCP server, or both, start with Skills and MCP: How to Choose.
Configuration Model¶
Toby AI Agents uses a "configure globally, enable per Agent, verify at runtime" model:
| Step | Location | Description |
|---|---|---|
| 1 | Global configuration in Settings | Add, edit, or remove services available to the workspace, then inspect configuration and tool information. |
| 2 | MCP Servers in an Agent workspace | Enable the services needed by the current Agent and wait for runtime installation and activation. |
| 3 | Agent task | Describe the goal so the Agent can select an appropriate activated tool. |
flowchart LR
A[Configure a global MCP service] --> B[Enable it for an Agent]
B --> C[Agent runtime installs and activates it]
C --> D[Inspect actual tools]
D --> E[Use them in a task]
Global configuration determines which services are available in the workspace; it does not expose them to every Agent automatically. A switch in an Agent workspace affects that Agent only.
Before You Start¶
Make sure that:
- The MCP Server comes from a trusted source and provides configuration suitable for the runtime environment;
- The target Agent host can reach the MCP Server, package registry, and related business systems;
- A local
stdioservice has the required Node.js, Python, or other runtime dependencies; - A remote HTTP service has the required network, proxy, certificate, and authentication setup;
- Your account can manage global MCP services and the target Agent;
- The data scope and possible write operations exposed by the tools are understood.
Step 1: Manage Global MCP Servers¶
Select your avatar and open Agent Configuration > MCP Servers in Settings. This workspace-level capability pool lets administrators add, search, edit, or remove services and inspect available tool information. Whether a service is enabled for a particular Agent is controlled from that Agent's workspace.
Add a Service¶
- Click Add MCP.
- Copy the configuration JSON from the MCP Server's official documentation or another trusted source.
- Paste it into the editor and review the name, transport, command, or endpoint.
- Save the configuration.
- Review preparation status, connection errors, and discoverable tools on the service card.
The configuration uses an mcpServers object and must contain exactly one service. Common fields are:
| Field | Description |
|---|---|
| Service name | The key under mcpServers, used to identify the service in global configuration and Agent workspaces. |
transport |
stdio or http. When omitted, a configuration containing url is treated as HTTP; otherwise it is treated as stdio. |
command, args |
Startup command and arguments for a stdio service. |
url |
Endpoint for a remote HTTP MCP Server. |
package_name |
Optional package or service source identifier. |
stdio example:
{
"mcpServers": {
"example-server": {
"command": "npx",
"args": ["-y", "mcp-server-example"],
"package_name": "mcp-server-example",
"transport": "stdio"
}
}
}
Remote HTTP example:
{
"mcpServers": {
"internal-readonly": {
"transport": "http",
"url": "https://mcp.example.com/server"
}
}
}
Follow the fields documented by the MCP Server provider. Do not guess commands, arguments, or endpoints to make a configuration pass validation. Use team-approved secret management and runtime injection instead of placing long-lived credentials in configuration visible to many users.
Note
For both creation and editing, one JSON document can contain only one MCP service. Before editing or removing a service, identify which Agents currently depend on it.
Inspect Status and Tools¶
A global service card can show configuration, preparation or connection state, and tools when discovery is supported. Depending on the service, you can:
- Expand the tool list to review names and descriptions;
- Inspect connection errors and retry;
- Edit configuration;
- Remove the service.
A remote HTTP service can expose connection and discovery status directly. A local stdio service ultimately runs in the Agent environment, so use the runtime status and tool list in the Agent workspace as the source of truth after enabling it.
Step 2: Enable the Server for an Agent¶
A globally configured service is not enabled for every Agent:
- Open the target Agent workspace.
- Go to Configuration > MCP Servers.
- Find the service and turn on its switch.
- Wait for the resource to be saved, installed, and activated.
- Expand runtime tools and confirm that the count, names, and descriptions are as expected.
Search matches the MCP server name, runtime tool name, and tool description, so you can locate a server from the capability you need.
Each switch action saves only that MCP service; it does not resubmit or lock every MCP configuration for the Agent. While the current service is saving, installing, waiting, or being removed, its switch is temporarily locked. Other services remain independent.
Enable services according to Agent responsibility and least privilege. A production troubleshooting Agent may need read-only query services; a cloud cost Agent may need billing services; a document organization Agent should not receive production tools.
Understand Runtime Status¶
The Agent workspace follows configuration from save through runtime availability:
| State | Meaning | Recommendation |
|---|---|---|
| Saving or waiting for Agent | The desired configuration was submitted and is waiting for the Agent. | Keep the Agent online and wait for the state to advance. |
| Installing | The Agent is preparing dependencies or connecting to the service. | Avoid repeated switching; verify network and dependency installation access. |
| Active | Agent runtime has loaded the service. | Expand runtime tools and verify actual availability. |
| Removing | The service was disabled and runtime resources are being removed. | Wait before enabling it again. |
| Installation failed | A dependency, configuration, network, or connection check failed. | Inspect the error and troubleshooting ID, fix the cause, then reinstall. |
| Agent upgrade required | The runtime version does not support the required configuration synchronization. | Upgrade the Agent service, then retry. |
| Runtime synchronization paused | Synchronization is paused; previously reported tools do not prove that the current configuration is active. | Check Agent status and the page guidance before resuming. |
The runtime tool section is collapsed by default. Its header shows the count actually reported by Agent runtime. Expand it to inspect components, transports, tool names, and descriptions. Disabling a service immediately hides its tools from the current availability list.
When a new configuration fails but a previous version is still serving tools, the page displays an explicit warning. Do not treat the new configuration as active until the error is fixed and reinstallation completes.
Step 3: Use MCP Tools in a Task¶
After activation, the Agent can select an MCP tool based on the task goal. You can also state which objects to query, which capability to use, and what output to return.
Start with a low-risk test:
Use the enabled read-only Kubernetes MCP service to list the five Pods with the most restarts in the test namespace.
Read data only. Return the object name, restart count, and recommended checks.
For production environments, customer data, permission changes, or write operations, define the exact scope, expected result, and actions requiring approval. Confirm that the Agent's access scope and behavioral boundaries match the task.
Troubleshoot MCP Servers¶
| Symptom | What to check |
|---|---|
| Global configuration cannot be saved | Validate the JSON structure, mcpServers, service name, and required command or url. |
| Connection fails | Inspect error details and verify endpoint, network, proxy, certificate, and authentication. |
| The service is missing from the Agent workspace | Confirm that it still exists in the current workspace's global configuration, then reopen the Agent workspace and check again. |
| The switch remains in a waiting state | Confirm that the Agent is online and up to date, then review runtime logs and the troubleshooting ID. |
| Installation fails | Check the stdio command, dependencies, package registry, and host permissions, or remote HTTP connectivity. |
| The service is active but has no tools | Expand runtime tools and wait for the page to update automatically. Confirm that the MCP Server exposes tools and no component has failed; retry only when the page offers that action. |
| A task does not use the MCP tool | Confirm that the tool appears in the current Agent's runtime list and describe the target object and desired capability explicitly. |
Recommendations¶
- Enable only the MCP services directly related to the Agent's responsibility;
- Prefer read-only or least-privilege credentials and restrict data and action scope in the target system;
- Copy configuration from trusted sources and review package versions before upgrades;
- Keep human approval for production writes and state prohibited actions in Agent behavioral boundaries;
- After a change, verify activation from runtime status and the actual tool list;
- Review failed, disabled, and unused services regularly and repair or remove them;
- When a required service is unavailable, require the Agent to state the missing capability instead of drawing a definite conclusion from incomplete data.