Deployment
Function instances
Section titled “Function instances”When you deploy a function in Infragate, the code itself is executed in the runtime of the MCP server instance. This means that if your function is used by multiple MCP servers, each server will have its own instance of the function running in its environment.
Lifecycle
Section titled “Lifecycle”As soon as your MCP server is invoked, all functions associated with that server are loaded into memory.
This loads the global scope of each function, allowing any variables or state defined outside the handler to persist across invocations.
When a tool that uses a function is called, the handler function is executed with the provided request data.
Function instances remain active as long as the MCP server instance is warm.
Function Reloading
Section titled “Function Reloading”Functions in Infragate are designed to be dynamic and can be updated without requiring a full redeployment of the MCP server. When you make changes to a function’s code in the Infragate Console, those changes are automatically applied the next time the function is invoked. These changes take effect within seconds, allowing for rapid iteration and testing of your function logic.
Functions are reloaded when:
- A new instance of the function is created (e.g., due to scaling events).
- The function code is updated in the Infragate Console.