Remote MCP tools reach the existing Plugins editor, configuration storage, IPC approval, launch identity, host, paginated discovery and tool calls. Stdio MCP is unchanged. The transport follows the 2025-06-18 / 2025-03-26 POST flow with bounded JSON and SSE replies. - Endpoints default to public HTTPS; private networks are an explicit per-server choice. Each request pins its resolved destination before connecting, and redirects are refused. - Protected headers are encrypted at rest, masked in settings, and bound to the destination: changing the destination or transport drops them. Signed approval identity covers destination, network and headers. - Requests carry IDs, deadlines, cancellation, validated session IDs and the negotiated protocol header. A 404 ends the session; cleanup sends DELETE. A failed call that may have mutated is not replayed. - Catalog refreshes are generation-bound, so paginated listing cannot recurse into refresh storms. - MCP tool calls take the agent's abort signal. - Twelve locale packs gain the new fields; the pack index is regenerated. Not included: OAuth, the legacy HTTP+SSE transport, idle GET streams, Last-Event-ID resumption, and client sampling, elicitation or roots.
5.1 KiB
HTTP MCP connections
TensorFold Studio can connect to MCP servers over a local standard-input/output process or Streamable HTTP. Both transports use the same tool approval policy, tool discovery, resource and prompt catalogues, bot allowlists, and agent tool execution path.
Connect a server
Open Plugins → Advanced → Add server, choose Streamable HTTP, and enter the
server's MCP endpoint, for example https://mcp.example.com/mcp. Add the authentication
headers required by that server, such as Authorization: Bearer …. Review the endpoint
in the native connection confirmation and connect. HTTP servers do not launch a command
or a Docker container.
Public endpoints require HTTPS. An explicit Allow private network access setting
permits local or LAN endpoints, including http://127.0.0.1:8000/mcp. Link-local and
metadata addresses remain blocked. Every request validates and pins its DNS destination;
redirects are rejected. Endpoint URLs cannot contain credentials, a query, or a fragment.
Use request headers for tokens. Cookies, host/origin overrides, proxy headers, and MCP's
own protocol/session headers cannot be configured as user headers.
Saved header values use the existing encrypted profile storage and are masked in app snapshots. Their secrecy has the same limits as other profile credentials: the default profile key lives alongside the profile, while deployments can supply an external key. A masked saved value can only be reused with the same endpoint, transport, and private network setting. Changing that destination requires re-entering the headers. A change to an endpoint, header, or network permission also invalidates connection approval.
Session and failure behavior
The client advertises MCP 2025-06-18 and accepts 2025-06-18 or 2025-03-26 during
initialization. It sends notifications/initialized, includes the negotiated protocol
version on subsequent HTTP messages, and echoes a valid server-assigned session ID.
POST replies can be JSON or an SSE stream. SSE handling supports split UTF-8 and line
boundaries, multi-line data fields, server notifications, and matching JSON-RPC responses.
Server ping requests are answered. Unsupported client requests receive -32601; the
client does not advertise sampling, elicitation, or roots capabilities.
Catalog discovery uses the existing bounded pagination logic. HTTP messages and responses are limited to 8 MiB, each SSE reply to 128 JSON-RPC messages, and configured headers to 32 entries and 16 KiB in total. Ordinary requests time out after 20 seconds; tool calls use the host's 120-second deadline. Agent cancellation aborts the in-flight request and attempts an MCP cancellation notification. A deadline also covers DNS resolution: a late DNS result cannot send the request after cancellation.
A failed, redirected, timed-out, or disconnected request is never automatically replayed. A tool may have changed external state before the response was lost; review its outcome before choosing to run it again. HTTP 404 for an active session clears the catalogue, marks the connection as expired, and requires an explicit reconnect. Closing a connection aborts outstanding work and attempts session termination with HTTP DELETE. Transport errors do not include a remote response body or authorization header value.
This client does not open an optional idle GET stream or resume streams with
Last-Event-ID. It does not implement the retired HTTP+SSE transport or an OAuth
authorization flow. Servers requiring OAuth consent/token refresh need that separate
integration; a static header is not a substitute for OAuth.
Signed manifests for automatic or trusted connections
The existing requirement for signed manifests on automatic or trusted MCP connections also applies to HTTP servers. The signed HTTP identity contains:
{
"schemaVersion": 1,
"transport": "streamable_http",
"url": "https://mcp.example.com/mcp",
"allowPrivateNetwork": false,
"headersSha256": "<SHA-256 of normalized sorted header entries>"
}
Use mcpHttpManifestIdentity(config) to construct the identity: names are lowercased,
entries sorted by ASCII header name, then JSON-encoded as [[name,value], ...] and hashed
with SHA-256. Sign the complete manifest using the existing canonicalMcpManifest and
Ed25519 process. The manifest binds the exact normalized URL, network permission, and
header digest; it contains no header values. Its key and signature remain configured
through the existing manifest configuration fields. Rotating credentials requires an
updated signature when a signed manifest is required.
Validation
mcp-http.test.ts exercises actual loopback HTTP initialization, paginated catalogues,
JSON/SSE response handling, session expiry, unsupported protocols, failed authentication,
redirect refusal, malformed replies, disconnects, cancellation, deadlines, and cleanup.
mcp-http-security.test.ts covers the real encrypted store and signed identity binding.
The IPC and launch race suites cover confirmation identity changes.
These are protocol and integration checks; they do not claim live vendor
OAuth compatibility.