1. Overview

The Secure MCP Gateway serves as the central interoperability layer in the TMX Agentic Finance architecture. It implements the Aggregator Pattern, acting as a unified Model Context Protocol (MCP) server that sits between the TMX Agent Core (the client) and multiple specialized MCP Servers (Wallet, Payment, Core Banking Sidecar).

Its primary responsibilities are:

  1. Schema Aggregation: Dynamically discovering and merging tools/resources from downstream servers.
  2. Request Routing: Directing tool execution requests to the appropriate downstream provider.
  3. Security & Governance: Enforcing PII redaction, authentication, and audit logging before requests leave the secure zone.

2. Architecture: The Aggregator Pattern

The Gateway functions as a Reverse Proxy for MCP traffic. To the Agent Core, the Gateway appears as a single MCP server with a vast capability set. To the downstream MCP servers, the Gateway appears as a standard MCP client.

image.png

3. Schema Aggregation Strategy

The Gateway aggregates schemas (Tools, Resources, Prompts) using a dynamic discovery and namespacing mechanism.

3.1 Dynamic Discovery

On initialization (and periodically via background polling), the Gateway iterates through its configured downstream servers:

  1. Establishes a connection (Transport Layer: SSE for remote, Stdio for local/sidecar).
  2. Queries capabilities: tools/listresources/list
  3. Validates the received schemas against strict allow-lists (security policy).

3.2 Namespace Collision Handling

To prevent naming conflicts (e.g., both Wallet and Core having a get_balance tool), the Gateway enforces a Namespacing Strategy: