MCP Server Integration

Connect your AI agents to external tools and services using the Model Context Protocol (MCP) - an open standard that enables seamless integration between AI systems and your existing infrastructure.

What is MCP?

The Model Context Protocol (MCP) is an open protocol developed by Anthropic that standardizes how AI applications communicate with external tools, data sources, and services. Think of it as a universal adapter that lets your AI agent interact with any system that speaks the MCP language.


Getting Started

Quick Start

  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!


Configuration Reference

Essential Settings

These are the core settings required to connect to an MCP server.

Display Name

A friendly name to identify this server in your dashboard.

Example: "Customer Database" or "Logistics API"

Base URL

The root URL of your MCP server.

Example: https://mcp.yourcompany.com

Note: Must be a valid URL with http:// or https:// protocol. HTTPS is strongly recommended for production.

Connection Type

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

Endpoint Path

The path on the server where MCP requests are sent.

Connection TypeDefault Path
Streamable HTTP/mcp
SSE/sse

Tip: Most MCP servers use the default paths. Only change this if your server uses a custom endpoint.

API Key / Secret Token

Authentication token for your MCP server (if required).

Example: sk-xxxxxxxxxxxxxxxxxxxx

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


Advanced Settings

Fine-tune your integration with these optional settings.

Forward User Context

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 identify 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 Header:

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

Custom Headers

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


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

Testing Your Integration

Before saving your configuration, always test the connection to ensure everything works correctly.

Test Connection

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

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

Common Error Messages:

ErrorCauseSolution
Connection refusedServer not running or wrong URLVerify server is running and 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 server implements MCP protocol correctly

View Available Tools

After a successful connection test, click View Available Tools to see what capabilities 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

Tip: Review the tool list to confirm you've connected to the correct server and the expected tools are available.


Limits & Quotas

ResourceLimit
MCP servers per agent20
Display nameMust be unique per agent
Base URLValid HTTP/HTTPS URL
custom headersRecommended max 10

Troubleshooting

My agent isn't using the MCP tools

  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

  1. Verify 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

FAQ

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 will be available to the agent, and it will choose the appropriate tool based on the conversation context.

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


Need Help?

📧 Email: [email protected] 💬 Chat: Use the in-app support widget