Skip to content

MCP server integration

Open in ChatGPT Open in Claude

Connect your agent to external tools, data sources, and services using the Model Context Protocol (MCP). MCP is an open standard, developed by Anthropic, that standardizes how AI applications talk to external systems: a universal adapter that lets your agent interact with anything that speaks MCP.

  1. Navigate to Agent Studio → select your agent → MCP Servers tab.
  2. Click Add Server.
  3. Enter the server details.
  4. Click Test Connection to verify connectivity.
  5. Review the available tools, then click Save Server.

Your agent can now use the tools provided by your MCP server.

The core settings required to connect to an MCP server.

A friendly name to identify this server in your dashboard.

Example: "Customer Database" or "Logistics API"

The root URL of your MCP server.

Example: https://mcp.yourcompany.com

Must be a valid URL with an http:// or https:// protocol. Use HTTPS in production.

Choose how your agent communicates with the MCP server.

TypeDescriptionWhen to use
Streamable HTTP (Recommended)Modern HTTP-based transport with streaming supportDefault choice for most integrations
SSE (Legacy)Server-Sent Events transportOnly if your MCP server doesn’t support HTTP transport

The path on the server where MCP requests are sent.

Connection TypeDefault Path
Streamable HTTP/mcp
SSE/sse

Authentication token for your MCP server, if required.

Example: sk-xxxxxxxxxxxxxxxxxxxx

Tokens are encrypted at rest and never displayed in the UI after saving. To update a configuration without changing the token, leave this field empty.

These optional settings fine-tune your integration.

When enabled, Foldspace automatically includes the current user’s identity in requests to your MCP server via the X-Foldspace-User-Id header.

SettingBehavior
EnabledUser’s identity ID is sent with every MCP request
DisabledNo user context is forwarded (default)

Use this when:

  • Your MCP server needs to personalize responses per user.
  • You want to implement user-level access controls on your server.
  • You need to audit which user triggered which action.

Example headers:

X-Foldspace-User-Id: user_abc123
X-Foldspace-Subscription-Id: sub_xyz789

Add static headers to every request sent to your MCP server.

Use CaseHeader Example
API VersioningX-API-Version: 2024-01
RoutingX-Environment: production

Test the connection before saving to confirm everything works.

The Test Connection button performs a full MCP initialization handshake with your server.

ResultMeaning
SuccessServer is reachable and responds correctly to the MCP protocol
FailedConnection issue, check the error message for details

Common error messages:

ErrorCauseSolution
Connection refusedServer not running or wrong URLVerify the server is running and the URL is correct
Connection timeoutNetwork issue or firewall blockingCheck network access and firewall rules
401 UnauthorizedInvalid or missing API keyVerify your API key is correct
404 Not FoundWrong endpoint pathCheck the endpoint path configuration
Protocol errorServer doesn’t speak MCPEnsure the server implements the MCP protocol correctly

After a successful connection test, click View Available Tools to see what your MCP server provides. Each tool displays:

  • Name: The identifier your agent uses to invoke the tool.
  • Description: What the tool does (shown to the AI).
  • Input Schema: The parameters the tool accepts.
ResourceLimit
MCP servers per agent20
Display nameMust be unique per agent
Base URLValid HTTP/HTTPS URL
Custom headersRecommended max 10
  1. Verify the server is enabled. Disabled servers don’t sync to the agent.
  2. Check tool descriptions. The AI uses descriptions to decide when to call tools: make them clear and specific.
  3. Test the connection. Ensure the server is reachable.

Connection test passes but tools aren’t working

Section titled “Connection test passes but tools aren’t working”
  1. Verify the input schema. Ensure the AI is sending parameters in the expected format.
  2. Review server logs. Check your MCP server’s logs for errors.
  3. Test tools directly. Use the “List Tools” endpoint to verify tool availability.

Can I connect multiple MCP servers to one agent? Yes. You can connect up to 20 MCP servers to a single agent. Each server’s tools are available to the agent, which chooses the appropriate tool based on the conversation context.

Can I use MCP servers behind a VPN? Currently, MCP servers must be accessible via the public internet. For private networks, use a secure tunnel or API gateway that’s publicly accessible with proper authentication.