Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

MCP Template Specification

An MCP (Model Context Protocol) template defines a configuration for an MCP server that agents can use to access external tools and resources. Agent Studio supports running MCP servers as child processes during workflow execution.

Fields

FieldTypeRequiredDefaultDescription
idstring (UUID)YesUnique identifier
workflow_template_idstring (UUID)NonullScopes the template to a workflow template
namestringYesHuman-readable server name
typestringYesServer type: "PYTHON" or "NODE"
argsarray of stringsYesCommand-line arguments for starting the server
env_namesarray of stringsYesEnvironment variable names the server requires
toolsobject or nullNonullMCP-exposed tool definitions. Set to null on export. Populated during import validation.
statusstringNo“”Validation status. Set to empty string on export.
mcp_image_pathstringNo“”Relative path to the server’s icon within the ZIP

Server Types

TypeRuntimeExample
PYTHONExecuted via Pythonpython -m my_mcp_server
NODEExecuted via Node.jsnpx @modelcontextprotocol/server-filesystem

Export/Import Behavior

Two fields receive special treatment during the export/import cycle:

  • tools: Set to null on export. During import, Agent Studio starts the MCP server, queries it for available tools, and populates this field. SDK validators should accept null here.
  • status: Set to empty string "" on export. During import, it transitions through "VALIDATING""VALID" or "VALIDATION_FAILED". SDK validators should accept empty string or any status value.

Cross-References

  • Every MCP template id referenced in an agent template’s mcp_template_ids must correspond to an entry in the ZIP’s mcp_templates array
  • The mcp_templates array in the manifest may be empty or absent in older exports

JSON Example

{
  "id": "m1234567-89ab-cdef-0123-456789abcdef",
  "workflow_template_id": "w9x8y7z6-5432-1098-fedc-ba0987654321",
  "name": "Filesystem Server",
  "type": "NODE",
  "args": ["npx", "@modelcontextprotocol/server-filesystem", "/workspace"],
  "env_names": [],
  "tools": null,
  "status": "",
  "mcp_image_path": "studio-data/dynamic_assets/mcp_template_icons/filesystem_server_abc123_icon.png"
}