MCPglue
It’s an agent using an agent disguised as another agent!
This is a developer-focused guide to interacting with superglue’s capabilities through the Model Context Protocol (MCP). MCP allows for a standardized way to list and call tools exposed by a server.
introduction
Superglue utilizes MCP to expose its core functionalities as a set of “tools.” This allows external clients or agents to discover and execute these functionalities in a structured manner. You can think of it as an RPC-like mechanism where Superglue acts as the server, offering services like capability management, data transformation, and more.
connecting to the MCP Server
The superglue MCP server is typically available at the /mcp
endpoint of your superglue instance.
- Hosted Endpoint:
https://mcp.superglue.ai/
- Self-Hosted Endpoint:
http://<your-superglue-host>:<port>/mcp
(e.g.,http://localhost:3000/mcp
)
The reason this request is structured in an odd way (AUTH_HEADER instead of AUTH_TOKEN) is because Cursor does not allow spaces within the args array, but does so for env vars. This might become obsolete in future versions.
authentication
All requests to the MCP server must be authenticated. Superglue’s MCP integration uses a key-based authentication system just like the GQL endpoint.
session management
MCP interactions are session-based. A session allows the server to maintain context across multiple requests from the same client.
- Establishing a Session:
- To start a new session, the client sends an MCP
initialize
request to the/mcp
endpoint (typically via a POST request). - The server responds with a
sessionId
(e.g., in a header or the response body, though MCP standard usually involves the server generating it and the client then using it). The Superglue implementation generates a UUID for the session.
- To start a new session, the client sends an MCP
- Maintaining a Session:
- For subsequent requests within the same session, the client must include the
mcp-session-id
header with the value of thesessionId
received during initialization. POST /mcp
: Used for most MCP requests likelistTools
andcallTool
.GET /mcp
&DELETE /mcp
: ThehandleMcpSessionRequest
inmcp-server.ts
suggests these might be used for session-specific operations, requiring themcp-session-id
header. For example, to check session status or explicitly close a session if implemented.
- For subsequent requests within the same session, the client must include the
available superglue tools via MCP
The following tools are exposed by Superglue’s MCP server. The input schemas are defined using Zod in mcp-server.ts
.
1. transformData
-
Description: Execute a data transformation using a defined Superglue transform or an ad-hoc instruction.
-
Input Schema:
TransformOperationInputSchema
input
:endpoint
: (Optional) Object defining the transformation (id, instruction, responseSchema, responseMapping, version).id
: (Optional) ID of a pre-existing transform. (Eitherendpoint
orid
must be provided).
data
: The JSON data to transform.options
: OptionalRequestOptionsSchema
(cacheMode, timeout, retries, retryDelay, webhookUrl).superglueApiKey
: Your Superglue API Key. (Handled server-side bycreateMcpServer
).
-
Example Usage (Conceptual MCP Call):
2. listCapabilities
-
Description: List Superglue capabilities (workflows) with pagination.
-
Input Schema:
ListWorkflowsInputSchema
limit
: (Optional) Number of items to return (default: 10).offset
: (Optional) Offset for pagination (default: 0).
-
Example Usage (Conceptual MCP Call):
3. getCapability
-
Description: Get a specific Superglue capability (workflow) by its ID.
-
Input Schema:
GetWorkflowInputSchema
id
: The ID of the capability.
-
Example Usage (Conceptual MCP Call):
4. runCapability
-
Description: Execute a Superglue capability (workflow) by its ID.
-
Input Schema:
ExecuteWorkflowInputSchema
id
: The ID of the capability to execute.payload
: (Optional) JSON payload to pass to the capability.credentials
: (Optional) JSON credentials for the capability execution.options
: (Optional)RequestOptionsSchema
.
-
Example Usage (Conceptual MCP Call):
5. buildCapability
-
Description: Build a new Superglue capability (workflow) from an instruction.
-
Input Schema:
BuildWorkflowInputSchema
instruction
: Natural language instruction for the capability.payload
: (Optional) Example JSON payload.systems
: Array ofSystemInputSchema
defining the systems the capability can interact with.id
: System ID.urlHost
: Host URL of the system.urlPath
: (Optional) Base path for API calls.documentationUrl
: (Optional) URL to API documentation.documentation
: (Optional) Inline API documentation.credentials
: (Optional) Credentials for the system.
responseSchema
: (Optional) JSON schema for the expected response.
-
Example Usage (Conceptual MCP Call):
6. upsertCapability
-
Description: Create a new capability (workflow) or update an existing one.
-
Input Schema:
UpsertWorkflowInputSchema
id
: The ID for the capability (used for creation or to identify the one to update).input
: The capability definition (JSON, conforming to Superglue’s workflow structure).
-
Example Usage (Conceptual MCP Call):
7. deleteCapability
-
Description: Delete a Superglue capability (workflow) by its ID.
-
Input Schema:
DeleteWorkflowInputSchema
id
: The ID of the capability to delete.
-
Example Usage (Conceptual MCP Call):