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.
What is MCP?
Section titled “What is MCP?”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:
- Resources — File-like data that can be read by clients (API responses, file contents)
- Tools — Functions that can be called by the LLM (with user approval)
- Prompts — Pre-written templates that help users accomplish specific tasks
Spring AI MCP Integration
Section titled “Spring AI MCP Integration”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
Architecture
Section titled “Architecture”How it works
Section titled “How it works”- The AI client connects to the m8ty MCP server endpoint
- It discovers available tools via the MCP catalog
- The LLM selects and calls tools based on user intent
- The BFF Server executes the API call and returns structured results
Available MCP Tools
Section titled “Available MCP Tools”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
Client Integration
Section titled “Client Integration”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.
Further Reading
Section titled “Further Reading”© m8ty GmbH 2023 · m8ty.eu
