MCP server endpoint
When you deploy an MCP server on Blaxel, a WebSocket endpoint is generated on Global Agentics Network to connect to the server. The server endpoint looks like this:Connect to an MCP server
Endpoint authentication
By default, MCP servers deployed on Blaxel aren’t public. It is necessary to authenticate all connections, via a bearer token. The evaluation of authentication/authorization for messages is managed by the Global Agentics Network based on the access given in your workspace. You can make an MCP server public, meaning it will bypass Blaxel authentication and you will have to implement your own authentication inside the server. This can be done through theblaxel.toml
configuration file.
blaxel.toml reference
blaxel.toml reference
The MCP server deployment can be configured via the blaxel.toml file in your MCP server directory.This file is used to configure the deployment of the MCP server on Blaxel. The only mandatory parameter is the
type
so Blaxel knows which kind of entity to deploy. Others are not mandatory but allow you to customize the deployment.name
,workspace
, andtype
fields are optional and serve as default values. Any bl command run in the folder will use these defaults rather than prompting you for input.[env]
section defines environment variables that the MCP server can access via the SDK. Note that these are NOT secrets.[[triggers]]
and[triggers.configuration]
sections defines ways to send requests to the MCP servers. You can also make them either private (default) or public (authenticationType = "public"
).
Timeout limit
MCP server runtime has a hard limit of 15 minutes.Call the MCP server
You can connect to your MCP server and send requests in several ways (code samples below):- use the Blaxel SDK to retrieve tools: best when developing an agent, particularly when running on Blaxel
- connect from your code directly: suitable for custom implementations requiring server connection to list and call tools
- connect from the Blaxel Console’s Playground: best for testing and validating server functionality
Use Blaxel SDK to retrieve tools
The following code example demonstrates how to use the Blaxel SDK to retrieve and pass an MCP server’s tools when building an agent.Directly connect from your code
Below are snippets of code to connect to an MCP server that is deployed on Blaxel. You will need the following information:BL_API_KEY
: an API key to connect to your Blaxel workspaceBL_WORKSPACE
: the slug ID for your workspaceMCP_SERVER_NAME
: the slug name for your MCP server
Connect to pre-built servers
Blaxel’s pre-built MCP servers offer two methods:tools/list
: method that lists the available tools and their schemas, allowing consumers (you or agents) to discover the function’s capabilities.tools/call
: method that lets consumers execute individual tools. It requires params with two keys:name
: the name of the tool to run, obtained from the listing endpoint abovearguments
: an object with the key and values of input parameters for the execution, obtained from the listing endpoint above
tools/list
outbound message on a Brave Search toolkit (make sure to fill in the authentication token).
tools/call
outbound message on the brave_web_search tool.
Via Blaxel console
Requests to an MCP server can be made from the Blaxel console from the server deployment’s Playground page.