MetorialDocs

Keep secrets and sensitive data inside your network

Use a Metorial Outpost to redact, block, and log MCP traffic inside your network, choose how much message data Metorial stores, or self-host Metorial.

To keep sensitive data inside your network while using Metorial, run an Outpost: an open-source (Apache 2.0) proxy you deploy in your own network that connects out to Metorial, so nothing inbound is exposed. Its middleware can redact arguments, strip results, block tools, and log every MCP message to your own systems before anything reaches Metorial. Pair it with the project's Data Retention level (Full, Intent only, or None) to control what Metorial stores, or run Metorial yourself through self-hosting or on-prem hosting.

What you'll learn

  • Which controls keep which data on your side
  • How to set up an MCP proxy Outpost with redaction
  • How retention, encryption keys, and regions fit in

Choose the controls you need

GoalControl
Redact or block data before it leaves your networkOutpost with MCP proxy middleware
Reach internal systems without opening inbound accessOutpost
Keep a copy of all MCP traffic in your own log systemOutpost loggers: Datadog, Splunk, Elasticsearch, HTTP, OpenTelemetry
Limit what Metorial stores about sessionsProject Data Retention level
Control the keys that encrypt stored credentialsYour own AWS KMS keys; custom encryption keys as a plan add-on
Keep data in a regionEU or US regions
Run everything on your infrastructureSelf-hosting or on-prem hosting

Set up an MCP proxy Outpost

Create the Outpost

In organization settings, open Outposts and select Create Outpost. Enter a name and a description.

Grant it access

Open the Outpost and go to its Access tab. For each Metorial instance that should use it, select Proxy MCP connections (required). Select Proxy outpost registrations only if you plan to nest another Outpost behind this one. Select Save Access.

Create a credential

On the Overview tab, select Create Credential, give it a name and an optional expiry date, and copy the credential into a secret manager. Metorial cannot show it again, and an expired credential stops the Outpost from connecting.

Write the proxy

Install @metorial/mcp-proxy and add middleware for what should never leave your network. This example removes an apiKey argument from one tool before the call is forwarded:

import { McpProxy, mcpMiddleware, assertToolName } from '@metorial/mcp-proxy';

let redactApiKey = mcpMiddleware({
  handle: async (message, call) => {
    assertToolName(message, 'call_external_api');
    let { apiKey, ...rest } = message.params.arguments ?? {};
    return call({ ...message, params: { ...message.params, arguments: rest } });
  }
});

await McpProxy.create({
  outpostCredential: process.env.METORIAL_OUTPOST_CREDENTIAL!,
  baseUrl: 'https://mcp.example.com',
  proxy: { port: 8080 },
  middleware: [redactApiKey]
});

baseUrl is the address your clients use to reach the Outpost.

Package and deploy it

Build the script into a container image and deploy it on Kubernetes or another platform inside your network. The Outpost registers itself with Metorial and opens the connection outward, so it works behind a firewall or NAT.

Point clients at it

To make Magic MCP URLs use your Outpost's host, set it as the custom origin in the Magic MCP URL section of your Workforce settings. The connection path stays the same.

The Outpost repository has examples for redacting tool arguments, redacting tool results, blocking a dangerous tool, redacting prompt arguments, restricting resource access, audit logging, and combining several middlewares.

Choose how much Metorial stores

In project settings, open Security, then Data Retention:

LevelWhat is stored
FullMessage contents and tool calls are stored in full
Intent onlyTool names and the operation descriptions and rationale that agents provide, but not message contents
NoneMessage contents, tool identity, and tool calls are never stored

The level applies to sessions started after you save. Running sessions keep the level they started with, and existing logs are removed on their normal schedule. With None, session logs are empty and tool call analytics and Protoguard prompt scanning are not available. You can also turn off Store tool call attachments. Reduced retention levels depend on your plan.

How credentials are protected

Provider credentials are stored in Metorial Vault, encrypted, and resolved at the gateway only when a call is allowed. They are not passed to the model, the AI client, or the user. You can import your own AWS KMS keys so stored secrets are encrypted under keys you control, and every operation on a KMS-protected secret is logged. Under Support Access in organization settings, you grant Metorial support access for a limited time, extend or revoke it, and see a history of every grant.

Run Metorial yourself

The Metorial Platform is open source and can be self-hosted with Docker Compose; see Self-host Metorial with Docker Compose. For production deployments with strict compliance needs, Metorial offers on-prem hosting in your own cloud or data center with dedicated support and SLAs.

FAQ

Does an Outpost need inbound firewall rules?

No. The Outpost connects out to Metorial over a signed, authenticated channel, so it works behind a firewall or NAT with nothing inbound exposed. Your clients connect to the Outpost inside your network.

Can we stop certain fields from ever reaching Metorial?

Yes. Outpost middleware runs before a request is forwarded, so it can remove arguments, rewrite results, or refuse a tool call entirely. A refused call is never sent to Metorial.

Can Metorial run with zero message retention?

Yes, with the None retention level, on plans that include reduced retention. Sessions and connections are still recorded, but message contents, tool identity, and tool calls are not.

Where does Metorial store data in the cloud?

Choose the EU or US region. For data that must never leave your perimeter, use self-hosting or on-prem hosting.