Skip to main content
Glama

Server Configuration

Describes the environment variables required to run the server.

NameRequiredDescriptionDefault
MCP_HOSTNoHost for HTTP/SSE transports0.0.0.0
MCP_PATHNoHTTP endpoint path/mcp
MCP_PORTNoPort for HTTP/SSE transports8000
LOG_LEVELNoLogging level: DEBUG, INFO, WARNING, ERRORINFO
MCP_DATA_DIRNoDirectory for persistent data storagedata
MCP_TRANSPORTNoTransport type: stdio, streamable-http, or ssestdio
MCP_REQUEST_TIMEOUTNoRequest timeout in seconds30
MCP_REQUEST_IMMEDIATE_TIMEOUTNoImmediate response timeout in seconds2

Capabilities

Server capabilities have not been inspected yet.

Tools

Functions exposed to the LLM to take actions

NameDescription
register_agent

Registers an Agent-to-Agent (A2A) agent with the bridge server.

This tool fetches the agent's information (AgentCard) from the given URL and stores it in the server's list of registered agents, making it available for communication.

Args: url (str): The base URL of the A2A agent to register. This URL should point to where the agent's card can be resolved. ctx (Context): The MCP context, used for logging information back to the client.

Returns: Dict[str, Any]: A dictionary containing the registration status. On success, it includes the status and the registered agent's details. On error, it includes the status and an error message.

list_agents

Lists all A2A agents currently registered with the bridge server.

This resource returns a list of all agents, including their URL and AgentCard information.

Args: dummy (str): A dummy parameter to satisfy the MCP tool signature. Just for compatibility. Just pass the empty string. Returns: List[Dict[str, Any]]: A list of dictionaries, each containing the URL and AgentCard information of a registered agent. Each dictionary has the keys "url" and "card".

unregister_agent

Unregisters an A2A agent from the bridge server.

This also removes any tasks associated with the unregistered agent.

Args: url (str): The URL of the agent to unregister. ctx (Context): The MCP context for logging.

Returns: Dict[str, Any]: A dictionary confirming the action, including the name of the unregistered agent and the number of tasks that were removed. Returns an error if the agent was not found.

send_message

Sends a message to an agent and returns the task status.

This function initiates a task with an agent. It will return quickly.

  • If the agent responds within 5 seconds, the final result is returned.

  • Otherwise, a 'pending' status is returned, and the gateway continues to fetch the result in the background. Use the 'get_task_result' tool with the returned 'task_id' to check for completion.

Args: agent_url (str): The URL of the registered A2A agent. message (str): The text message to send. session_id (Optional[str]): An optional identifier for conversation context. ctx (Context): The MCP context for logging.

Returns: Dict[str, Any]: A dictionary representing the task. It will contain the final result if completed quickly, or a pending status if the agent takes longer to respond.

get_task_result

Retrieves the result or status of a previously created task.

Using the task_id returned by send_message, this tool fetches the current state and any results from the corresponding A2A agent.

Args: task_id (str): The unique identifier of the task to retrieve. ctx (Context): The MCP context for logging.

Returns: Dict[str, Any]: A dictionary containing the task's current status, result message, and any associated data or an error if the task ID is not found.

get_task_list

Retrieves a list of tasks being managed by the server.

Args: status (Literal["all", "completed", "running", "error", "pending", "streaming", "cancelled"]): Filters tasks by their status. Defaults to "all". sort (Literal["Descending", "Ascending"]): Sorts tasks by their last update time. Defaults to "Descending". number (int): The maximum number of tasks to return. Defaults to 10. ctx (Context): The MCP context for logging.

Returns: List[Dict[str, Any]]: A list of tasks, each represented as a dictionary.

Prompts

Interactive templates invoked by user choice

NameDescription

No prompts

Resources

Contextual data attached and managed by the client

NameDescription

No resources

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/yw0nam/mcp_a2a_gateway'

If you have feedback or need assistance with the MCP directory API, please join our Discord server