MCP (Model Context Protocol)
Connect Studio Agent blocks to external tools and services with the Model Context Protocol.
The Model Context Protocol (MCP) is an open standard that lets AI agents connect to tools and data sources. TradingGoose supports MCP in both directions:
- Copilot MCP -- Use TradingGoose's server-side Copilot tools from a trusted coding agent.
- MCP client -- Connect Agent blocks in Studio to tools exposed by an external MCP server.
Use TradingGoose from a coding agent
See Copilot MCP for supported capabilities and installation for Claude Code, Cursor, OpenCode, Codex, Antigravity, and Gemini CLI. That guide also covers browser approval, manual client configuration, permissions, and key revocation.
Connect Studio to an MCP server
TradingGoose's MCP client speaks JSON-RPC 2.0 and supports protocol version negotiation across multiple spec revisions (2025-06-18, 2025-03-26, 2024-11-05).
Supported Transports
Every MCP server you register uses one of three HTTP-based transport modes:
| Transport | Description |
|---|---|
| HTTP | Standard HTTP POST with JSON responses. Suitable for simple request/response tools. |
| SSE | Server-Sent Events. The server may reply with text/event-stream for streamed results. |
| Streamable HTTP | Transport introduced in spec 2025-03-26 and supported in 2025-06-18. Supports session management via Mcp-Session-Id headers and content-type negotiation between JSON and SSE. |
All three transports are handled by the same underlying client -- the transport field controls how the connection is labeled, but the client will negotiate the response format automatically based on the server's Content-Type header.
Adding an MCP Server
Open the MCP Editor widget
Add the MCP Servers list and MCP Editor widgets to your dashboard. Create a server from the list, then select it in the editor. See the MCP Editor widget docs for details on the editor interface.
Provide the server configuration
Each server requires:
- Name -- A human-readable label.
- Transport -- One of
http,sse, orstreamable-http. - URL -- The server endpoint (e.g.
https://mcp.example.com/v1). - Headers (optional) -- Custom headers such as
Authorization. Supports environment variable interpolation (see below). - Timeout (optional) -- Request timeout in milliseconds. Defaults to 30 000 ms.
- Retries (optional) -- Saved with the server. The current URL transport runtime does not apply this setting.
Save and test
Click Save, then use the Test connection button in the MCP Editor toolbar. The client will run the full initialization handshake -- version negotiation, capability exchange, and an initialized notification -- to confirm the server is reachable.
Authentication and Environment Variables
You can reference workspace or personal environment variables in the server URL and headers using double-brace syntax:
Authorization: Bearer {{MY_API_KEY}}At runtime the service tries to resolve these placeholders against your effective decrypted environment. If a referenced variable is missing, Studio logs the resolution error and leaves the unresolved placeholder in the URL or header. The downstream server may then reject the request or receive the literal placeholder.
Never hard-code secrets directly in server configurations. Always store sensitive values as environment variables and reference them with the {{VAR_NAME}} syntax.
Tool Discovery
When you connect to a server, the client sends a tools/list JSON-RPC request. The response is parsed into a list of tools, each with:
- name -- Unique tool identifier on that server.
- description -- What the tool does.
- inputSchema -- A JSON Schema describing the expected arguments.
The Studio UI caches discovered tools for five minutes using the workspace and current server records as its cache key. It reloads tools after server changes and on the periodic refresh, or you can force a refresh from the MCP Editor toolbar.
Using MCP Tools in Agent Blocks
Once a server is registered and enabled, its tools appear alongside built-in tools in any Agent block's tool picker.
Select MCP tools
Open an Agent block and expand the Tools section. MCP tools are listed under their server name. Select the ones you need.
Run the agent
During execution, the agent calls tools/call on the appropriate MCP server, passing the tool name and arguments. The result is returned as structured content (text, image, or resource) and fed back into the agent's context.
Each tool call uses the authenticated user's workspace access and receives an audit identifier in the server logs before dispatch.
Security
The MCP client applies these safeguards:
- Workspace authorization -- Server management and tool operations require access to the target workspace.
- URL validation during connection tests -- Studio accepts HTTP or HTTPS and rejects known local/private destinations and blocked service ports.
- Secret interpolation -- Credentials can remain in personal or workspace environment variables instead of the saved server definition.
- Request boundaries -- Server requests use the configured timeout, and Studio applies an overall timeout to tool execution.
- Audit correlation -- Tool calls receive an audit identifier in server logs.
Troubleshooting
Server not connecting
Verify the URL is correct and the server is running. The client tries both with and without a trailing slash, so path issues are handled automatically. Check the browser console for detailed connection errors.
Tools not appearing
Confirm the server is enabled and not soft-deleted. Use the Refresh tools button in the MCP Editor to force a cache clear and re-discovery.
Unresolved environment variables
Studio leaves a missing {{VAR_NAME}} placeholder unchanged instead of rejecting the configuration itself. Add the variable in your workspace or personal environment settings, then retry the connection or tool call.
Timeout errors
Increase the server timeout value in the MCP Editor. The default is 30 seconds. Slow servers or large tool responses may need more time.