Skip to content

MCP (Model Context Protocol)

The BFF Server exposes all its APIs as MCP tools, enabling AI models and agents to discover and interact with the backend through a standardized protocol.

The Model Context Protocol is a standardized protocol that enables AI models to interact with external tools and resources in a structured way. It acts as a bridge between AI models and the real world — allowing them to access databases, APIs, file systems, and other services through a consistent interface.

MCP servers provide three main types of capabilities:

  1. Resources — File-like data that can be read by clients (API responses, file contents)
  2. Tools — Functions that can be called by the LLM (with user approval)
  3. Prompts — Pre-written templates that help users accomplish specific tasks

The BFF Server uses Spring AI MCP to expose all APIs as MCP tools. This means any MCP-compatible AI client can discover and call m8ty APIs without custom integration code.

Spring AI provides:

  • MCP Server Boot Starters — Auto-configuration for exposing Spring services as MCP tools
  • Multiple transport mechanisms — STDIO, SSE, and Streamable-HTTP
  • MCP Java Annotations — Declarative way to mark methods as MCP tools

MCP architecture: AI client, BFF Server and backend systemsMCP architecture: AI client, BFF Server and backend systems

  1. The AI client connects to the m8ty MCP server endpoint
  2. It discovers available tools via the MCP catalog
  3. The LLM selects and calls tools based on user intent
  4. The BFF Server executes the API call and returns structured results

All m8ty REST API endpoints are exposed as MCP tools, including:

  • Account information (list, search, balance trends)
  • Transactions (search, details, forecast)
  • Payments (create, validate, approve)
  • Cards management
  • Portfolio and custody accounts
  • Securities and brokerage orders
  • Bank documents and secure mails
  • Feature flags and customer data

Any MCP-compatible client can connect to the BFF Server. The m8ty_client_mcprag Dart package provides additional capabilities for semantic tool search via embeddings — allowing clients to find the most relevant API tool by describing what they need in natural language.