# Metorial MCP

> Metorial provides full visibility into serverless AI agent lifecycles. It lets your agent client manage remote compute resources by deploying new instances (`metorial_deploy_server`), checking health status (`metorial_get_server_status`), or shutting down unused endpoints (`metorial_delete_server`). Use it to monitor execution traces, track resource costs, and enforce boundaries on complex AI tooling.

## Overview
- **Category:** friends-mcp
- **Price:** Free
- **Tags:** serverless, telemetry, tracing, ai-infrastructure, performance-monitoring, scaling

## Description

Listen up. This isn't another fancy dashboard; this is pure visibility into your agent’s compute layer. The **Metorial MCP Server** gives you the controls to manage remote serverless AI lifecycles, treating complex agent logic like a managed cloud service so you don't lose track of what's running or where your budget's going.

You need full command over your resources—from spinning up new compute matrices to shutting down endpoints that’ve gone stale. You can use it to monitor execution traces, nail down resource costs, and strictly enforce boundaries on whatever complex AI tooling you deploy. Here's what you can do with the tools available:

**To Manage Your Compute Environment:** 
When you need your agent logic running somewhere remote, you’ll initiate a new environment using `metorial_deploy_server`. This action initializes that serverless compute matrix for your agent's specific needs. You keep tabs on what's active by calling `metorial_list_servers`, which gives you a complete inventory of every single MCP bound running in the entire Metorial workspace, whether it’s currently up or shut down. If an endpoint is running and you gotta know if it’s healthy, you check its operational status using `metorial_get_server_status`; that tool pulls the current health metrics for any specific node you point it at.

**To Execute and Isolate Tasks:** 
If you want to run a specific piece of logic without spinning up a whole new server, you can use `metorial_invoke_server_tool`. This runs an isolated tool schema inside a designated serverless container. For complex workflows, you’ll need to manage the lifecycle; once a server is done with its job and isn't needed anymore, you terminate it completely by running `metorial_delete_server`, which stops and removes that logical server instance from your workspace.

**To Audit Performance and Usage:** 
Tracking performance metrics and costs is critical. You run `metorial_get_usage_metrics` to aggregate all the data on latency, token usage, and actual costs across every single agent running in your entire workspace. For a deep dive into how an agent actually got its results, you pull detailed execution paths using `metorial_get_trace_details`; this provides a line-by-line breakdown of a specific tool run, showing exactly where the performance bottlenecks hit. When you need to see what agents have been running and what tools they used over time, you use `metorial_list_traces`, which pulls a full log list of all past agent executions.

**In short:** You manage deployment with `metorial_deploy_server` and clean up with `metorial_delete_server`. You check the pulse using `metorial_get_server_status`, you run specific code with `metorial_invoke_server_tool`, and you audit everything—the cost, the steps, and the history—using `metorial_get_usage_metrics` and `metorial_list_traces`. It's your full operational command center for agent scaling.

## Tools

### metorial_delete_server
Stops and removes a logical server instance from your Metorial workspace.

### metorial_deploy_server
Initializes a new, remote serverless compute environment for an agent's logic.

### metorial_get_server_status
Retrieves the current operational health and status of a specific hosted node.

### metorial_get_trace_details
Provides a detailed, line-by-line breakdown of an agent's previous execution path.

### metorial_get_usage_metrics
Aggregates data on costs and latency across all running agents in the workspace.

### metorial_invoke_server_tool
Runs a specific, isolated tool schema inside a designated serverless container.

### metorial_list_servers
Lists every active and inactive MCP bound running within your entire Metorial workspace.

### metorial_list_traces
Pulls a log list of all past agent executions, tracking tool usage over time.

## Prompt Examples

**Prompt:** 
```
List all explicitly active MCP server deployments spanning natively onto the Metorial Serverless cloud.
```

**Response:** 
```
Generating state array checking bounds limits parsing explicitly (`list_servers`). Found completely running topological schemas mapped safely avoiding logic panics.
```

**Prompt:** 
```
Trace granular execution logic of my last proxy run extracting explicit metrics via Metorial telemetry limits.
```

**Response:** 
```
Poll diagnostic streams cleanly targeting UUID via `get_trace_details`. The log engine mapped successfully explicit latencies bounding logic natively completely secure.
```

**Prompt:** 
```
Spawn naturally a fresh container instance deploying logic to Metorial binding explicit organizational params.
```

**Response:** 
```
Engaged explicit backend orchestrations bounding limits natively (`deploy_server`). Cloud infrastructure received limits provisioning bounds parameters completely functionally sound.
```

## Capabilities

### Manage Server Provisioning
Trigger remote provisioning of an agent's compute matrix using `metorial_deploy_server`.

### Inspect Execution Logs
Deep dive into the step-by-step path and performance metrics of a specific tool run with `metorial_get_trace_details`.

### Audit Resource Usage
Calculate total cost, latency boundaries, and token usage across all deployed agents via `metorial_get_usage_metrics`.

### Inventory Running Agents
Retrieve a complete list of every serverless MCP bound hosted in your workspace using `metorial_list_servers`.

### Determine Server Health
Check the current operational status and health metrics for any specific, hosted node with `metorial_get_server_status`.

### Execute Remote Tools
Run isolated tool schemas on a dedicated serverless container using `metorial_invoke_server_tool`.

## Use Cases

### Debugging a production failure
The agent failed at 3 AM, costing money but not completing the task. Instead of guessing, the engineer runs `metorial_list_traces` to see every recent run. They then use `metorial_get_trace_details` on the failing UUID to pinpoint that Tool X exceeded its memory limit in Step 4.

### Scaling a successful agent
The marketing team launches a campaign, causing the agent's load to spike. The ops engineer uses `metorial_get_usage_metrics` to see that latency is climbing and costs are rising. They then use `metorial_deploy_server` to automatically scale up the compute matrices.

### Auditing decommissioned services
A project was shelved, leaving three unused servers running in the cloud, draining funds. The architect uses `metorial_list_servers` to find the IDs and then calls `metorial_delete_server` for each one, immediately stopping the costs.

### Testing a new tool integration
A developer writes a new data fetching module. They don't want it affecting production. They use `metorial_deploy_server` to create a sandbox environment, then test the module using `metorial_invoke_server_tool`, ensuring it works perfectly before going live.

## Benefits

- **Prevent Cost Overruns:** Don't wait for the bill. Use `metorial_get_usage_metrics` to track token usage, latency, and compute costs in real-time, so you can predict scaling needs before they hit your budget.
- **Pinpoint Failures Fast:** When an agent fails, don't just see an error code. Run `metorial_get_trace_details` to get a linear breakdown of the entire execution path and identify exactly which step broke.
- **Manage Agent Growth Safely:** Need to spin up new logic? Use `metorial_deploy_server`. It provisions the necessary compute matrices, ensuring your agent has a safe place to run without manual setup.
- **Maintain a Clean Environment:** Don't leave zombie servers running. Periodically check with `metorial_list_servers` and use `metorial_delete_server` to terminate unused endpoints, saving money and keeping your inventory clean.
- **Validate Logic Before Go-Live:** Before pointing the agent at live data, run a test execution using `metorial_invoke_server_tool`. This validates the tool schema runs correctly in an isolated container.
- **Full Operational Picture:** Use `metorial_list_traces` to build historical reports. You can see every single execution and its associated resource usage over weeks or months.

## How It Works

The bottom line is that you get full control over the entire agent execution lifecycle—from spinning up compute to shutting it down and auditing its cost.

1. First, secure your connection by providing the `METORIAL_API_KEY` and `METORIAL_WORKSPACE_ID` to authenticate.
2. Next, run an agent trace. This deploys your MCP configurations directly against Metorial's server mesh for a test run.
3. Finally, request diagnostic audits. The system filters node logs, providing transparent visibility into operational costs and logic states.

## Frequently Asked Questions

**How do I check if my deployed server is running correctly using metorial_get_server_status?**
Run `metorial_get_server_status` and look for the 'Healthy' status code. This confirms the node is active and ready to accept requests, which is more reliable than just checking a list.

**What is the difference between metorial_list_servers and metorial_list_traces?**
`metorial_list_servers` gives you an inventory of *what* servers exist. `metorial_list_traces` provides a list of past *actions*, showing you which tools ran, when they ran, and their associated usage metrics.

**Do I need to use metorial_get_usage_metrics every time my agent runs?**
Yes. Running `metorial_get_usage_metrics` is mandatory for cost control. It aggregates data on latency and token usage, preventing unexpected billing spikes.

**How do I safely shut down old agents with metorial_delete_server?**
First, use `metorial_list_servers` to get the full list of IDs. Then, pass those specific IDs into `metorial_delete_server`. This ensures you terminate only the intended, idle servers.

**Can I test a new tool without deploying a whole server with metorial_invoke_server_tool?**
Yes. `metorial_invoke_server_tool` is designed for exactly that—running an isolated tool schema inside a container, letting you validate the logic without creating permanent infrastructure.

**What happens when I use `metorial_deploy_server` to provision a new serverless matrix?**
The tool immediately initiates the provisioning process. You receive a unique deployment ID and status updates while the system builds and maps your container mesh. This tells you if the resource allocation was successful.

**How can I analyze a failed run when calling `metorial_get_trace_details`?**
The trace details provide a full breakdown of the execution path, even where it fails. You'll get stack traces and context data showing exactly which step or function caused the logic error.

**Does `metorial_list_servers` show all server instances, including old or decommissioned ones?**
No, this tool only enumerates active endpoints within your Metorial workspace. It filters out any resources that have been flagged as idle or shut down.

**Can I automatically deploy a new MCP logic container natively using Metorial?**
Yes! Utilize `deploy_server` explicit limits passing configurations to provision instances dynamically spinning up natively isolated.

**Is it possible to track the detailed error bounds of a specific proxy execution?**
Yes! Interrogating the UUID via `get_trace_details` dumps end-to-end telemetry bounds explicitly isolating variables successfully.

**Does the system aggregate LLM latency usage inherently?**
Exactly, call `get_usage_metrics` declaring explicitly bounding day limits to receive grouped logic matrices seamlessly.