Deploy an MCP Server
Deploying an MCP Server makes your ToolSet's tools available to AI agents over the Model Context Protocol. This guide walks you through creating an export, understanding your server URL, managing the server lifecycle, and monitoring active sessions.
Prerequisites
Before deploying an MCP Server, ensure you have:
- An active ToolSet with at least one active tool. See ToolSets for instructions on creating a ToolSet.
- A Nexla service key for authentication. See Service Keys for details.
Deploying from a ToolSet
To deploy a ToolSet as an MCP Server:
- Open the ToolSet detail page in the Nexla Platform (AI tab).
- Navigate to the Exports tab.
- Click Create Export.
- Select the export type. Choose
mcp_serverfor standard MCP Streamable HTTP (recommended for most use cases). - Select the target environment (
dev,stage, orprod). - Optionally set a public name to help identify this server in client configurations.
- Click Deploy.
The system generates a unique server key and MCP endpoint URL for your export. The server starts in draft status -- activate it when you are ready to accept connections.
If you created your ToolSet using Create from Nexsets, an MCP server export is automatically created for you in the dev environment. You can find it in the Exports tab immediately after ToolSet creation.
Your MCP Server URL
Every MCP Server export gets a unique endpoint URL in the following format:
https://api-genai.nexla.io/mcp/service_key/{server_key}
The server_key is a unique identifier assigned to your export. You will provide this URL to MCP clients so they can connect to your server.
You can find the full URL in the export detail view, or copy it directly from the Exports tab.
Viewing MCP Configuration
Nexla provides a ready-to-use JSON configuration that you can paste directly into MCP clients. This saves you from manually assembling the URL and headers.
You can access the MCP configuration in two ways:
- From the UI -- Open the export detail view and click Copy MCP Config.
- From the API -- Send a
GETrequest to the MCP config endpoint:
GET /v1/toolsets/{id}/mcp_config
The response returns a JSON object formatted for MCP client configuration:
{
"mcpServers": {
"nexla-my-toolset": {
"url": "https://api-genai.nexla.io/mcp/service_key/abc123...",
"headers": {
"Authorization": "Bearer YOUR_SERVICE_KEY"
}
}
}
}
The key name (e.g., nexla-my-toolset) is derived from your ToolSet's name. You can rename it in your client configuration without affecting functionality.
Managing Server Lifecycle
After deployment, you can manage your MCP Server's status from the export detail page.
Pausing
Pausing temporarily disables the server. When paused:
- No new MCP client connections are accepted.
- Existing sessions may continue until they naturally close.
- All configuration, including the server key and URL, is preserved.
- You can resume the server at any time by setting it back to
active.
Use pausing for planned maintenance, incident response, or temporarily restricting access.
Retiring
Retiring permanently deactivates the server. When retired:
- All connections are terminated.
- The server key and URL become permanently inactive.
- The export cannot be reactivated.
Retiring is irreversible. Only retire a server when you are certain it is no longer needed. If you need a temporary disable, use Pause instead.
Refreshing Cache
MCP Servers maintain a tools cache -- a precomputed snapshot of the ToolSet's tools optimized for fast MCP serving. In most cases, changes to your ToolSet's tools propagate automatically. If you notice that recent tool changes are not reflected in your MCP server:
- Open the export detail page.
- Click Refresh Cache.
- The server rebuilds its tools cache from the current ToolSet manifest.
This is useful after bulk edits to tools or when troubleshooting tool discovery issues.
Active Sessions
MCP Servers track active client connections as sessions. You can view and manage sessions from the export detail page.
Each session displays:
| Field | Description |
|---|---|
| Session ID | A unique identifier for the connection. |
| Client Info | Information about the connected MCP client (name, version). |
| Protocol Version | The MCP protocol version negotiated during connection. |
| Last Activity | The timestamp of the most recent request from the client. |
From the sessions view, you can:
- Terminate a session -- Immediately disconnect a specific client.
- Clean up stale sessions -- Remove sessions that have not had activity for an extended period.
Terminating a session only affects the specific connection. The MCP client can reconnect if the server is still active.
Next Steps
- Connect MCP Clients -- Configure AI agents to connect to your deployed MCP server.
- MCP Servers Overview -- Review export types, environments, and authentication options.