main.py•30.8 kB
# generated by fastapi-codegen:
# filename: openapi.yaml
# timestamp: 2025-06-29T07:53:33+00:00
import argparse
import json
import os
from datetime import datetime
from typing import *
from typing import Optional, Union
from autogen.mcp.mcp_proxy import MCPProxy
from autogen.mcp.mcp_proxy.security import BaseSecurity, UnsuportedSecurityStub
from fastapi import Header, Path, Query
from pydantic import constr
from models import (
File,
OBErrorResponse1,
OBReadAccount6,
OBReadBalance1,
OBReadBeneficiary5,
OBReadConsent1,
OBReadConsentResponse1,
OBReadDirectDebit2,
OBReadOffer1,
OBReadParty2,
OBReadParty3,
OBReadProduct2,
OBReadScheduledPayment3,
OBReadStandingOrder6,
OBReadStatement2,
OBReadTransaction6,
)
app = MCPProxy(
contact={'email': 'ServiceDesk@openbanking.org.uk', 'name': 'Service Desk'},
description='Swagger for Account and Transaction API Specification',
license={
'name': 'open-licence',
'url': 'https://www.openbanking.org.uk/open-licence',
},
termsOfService='https://www.openbanking.org.uk/terms',
title='Account and Transaction API Specification',
version='3.1.7',
servers=[{'url': 'https://openbanking.org.uk'}, {'url': '/open-banking/v3.1/aisp'}],
)
@app.post(
'/account-access-consents',
tags=['account_access_management'],
security=[
UnsuportedSecurityStub(name="None"),
],
)
def create_account_access_consents(
x_fapi_auth_date: Optional[
constr(
pattern=r'^(Mon|Tue|Wed|Thu|Fri|Sat|Sun), \d{2} (Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec) \d{4} \d{2}:\d{2}:\d{2} (GMT|UTC)$'
)
] = Header(None, alias='x-fapi-auth-date'),
x_fapi_customer_ip_address: Optional[str] = Header(
None, alias='x-fapi-customer-ip-address'
),
x_fapi_interaction_id: Optional[str] = Header(None, alias='x-fapi-interaction-id'),
authorization: str = Header(..., alias='Authorization'),
x_customer_user_agent: Optional[str] = Header(None, alias='x-customer-user-agent'),
body: OBReadConsent1 = ...,
):
"""
Create Account Access Consents
"""
raise RuntimeError("Should be patched by MCPProxy and never executed")
@app.delete(
'/account-access-consents/{ConsentId}',
tags=['account_access_management'],
security=[
UnsuportedSecurityStub(name="None"),
],
)
def delete_account_access_consents_consent_id(
consent_id: str = Path(..., alias='ConsentId'),
x_fapi_auth_date: Optional[
constr(
pattern=r'^(Mon|Tue|Wed|Thu|Fri|Sat|Sun), \d{2} (Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec) \d{4} \d{2}:\d{2}:\d{2} (GMT|UTC)$'
)
] = Header(None, alias='x-fapi-auth-date'),
x_fapi_customer_ip_address: Optional[str] = Header(
None, alias='x-fapi-customer-ip-address'
),
x_fapi_interaction_id: Optional[str] = Header(None, alias='x-fapi-interaction-id'),
authorization: str = Header(..., alias='Authorization'),
x_customer_user_agent: Optional[str] = Header(None, alias='x-customer-user-agent'),
):
"""
Delete Account Access Consents
"""
raise RuntimeError("Should be patched by MCPProxy and never executed")
@app.get(
'/account-access-consents/{ConsentId}',
tags=['account_access_management'],
security=[
UnsuportedSecurityStub(name="None"),
],
)
def get_account_access_consents_consent_id(
consent_id: str = Path(..., alias='ConsentId'),
x_fapi_auth_date: Optional[
constr(
pattern=r'^(Mon|Tue|Wed|Thu|Fri|Sat|Sun), \d{2} (Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec) \d{4} \d{2}:\d{2}:\d{2} (GMT|UTC)$'
)
] = Header(None, alias='x-fapi-auth-date'),
x_fapi_customer_ip_address: Optional[str] = Header(
None, alias='x-fapi-customer-ip-address'
),
x_fapi_interaction_id: Optional[str] = Header(None, alias='x-fapi-interaction-id'),
authorization: str = Header(..., alias='Authorization'),
x_customer_user_agent: Optional[str] = Header(None, alias='x-customer-user-agent'),
):
"""
Get Account Access Consents
"""
raise RuntimeError("Should be patched by MCPProxy and never executed")
@app.get(
'/accounts',
tags=['account_details_retrieval'],
security=[
UnsuportedSecurityStub(name="None"),
],
)
def get_accounts(
x_fapi_auth_date: Optional[
constr(
pattern=r'^(Mon|Tue|Wed|Thu|Fri|Sat|Sun), \d{2} (Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec) \d{4} \d{2}:\d{2}:\d{2} (GMT|UTC)$'
)
] = Header(None, alias='x-fapi-auth-date'),
x_fapi_customer_ip_address: Optional[str] = Header(
None, alias='x-fapi-customer-ip-address'
),
x_fapi_interaction_id: Optional[str] = Header(None, alias='x-fapi-interaction-id'),
authorization: str = Header(..., alias='Authorization'),
x_customer_user_agent: Optional[str] = Header(None, alias='x-customer-user-agent'),
):
"""
Get Accounts
"""
raise RuntimeError("Should be patched by MCPProxy and never executed")
@app.get(
'/accounts/{AccountId}',
tags=['account_details_retrieval'],
security=[
UnsuportedSecurityStub(name="None"),
],
)
def get_accounts_account_id(
account_id: str = Path(..., alias='AccountId'),
x_fapi_auth_date: Optional[
constr(
pattern=r'^(Mon|Tue|Wed|Thu|Fri|Sat|Sun), \d{2} (Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec) \d{4} \d{2}:\d{2}:\d{2} (GMT|UTC)$'
)
] = Header(None, alias='x-fapi-auth-date'),
x_fapi_customer_ip_address: Optional[str] = Header(
None, alias='x-fapi-customer-ip-address'
),
x_fapi_interaction_id: Optional[str] = Header(None, alias='x-fapi-interaction-id'),
authorization: str = Header(..., alias='Authorization'),
x_customer_user_agent: Optional[str] = Header(None, alias='x-customer-user-agent'),
):
"""
Get Accounts
"""
raise RuntimeError("Should be patched by MCPProxy and never executed")
@app.get(
'/accounts/{AccountId}/balances',
tags=['account_balance_retrieval', 'account_details_retrieval'],
security=[
UnsuportedSecurityStub(name="None"),
],
)
def get_accounts_account_id_balances(
account_id: str = Path(..., alias='AccountId'),
x_fapi_auth_date: Optional[
constr(
pattern=r'^(Mon|Tue|Wed|Thu|Fri|Sat|Sun), \d{2} (Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec) \d{4} \d{2}:\d{2}:\d{2} (GMT|UTC)$'
)
] = Header(None, alias='x-fapi-auth-date'),
x_fapi_customer_ip_address: Optional[str] = Header(
None, alias='x-fapi-customer-ip-address'
),
x_fapi_interaction_id: Optional[str] = Header(None, alias='x-fapi-interaction-id'),
authorization: str = Header(..., alias='Authorization'),
x_customer_user_agent: Optional[str] = Header(None, alias='x-customer-user-agent'),
):
"""
Get Balances
"""
raise RuntimeError("Should be patched by MCPProxy and never executed")
@app.get(
'/accounts/{AccountId}/beneficiaries',
tags=['account_details_retrieval', 'beneficiary_info_management'],
security=[
UnsuportedSecurityStub(name="None"),
],
)
def get_accounts_account_id_beneficiaries(
account_id: str = Path(..., alias='AccountId'),
x_fapi_auth_date: Optional[
constr(
pattern=r'^(Mon|Tue|Wed|Thu|Fri|Sat|Sun), \d{2} (Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec) \d{4} \d{2}:\d{2}:\d{2} (GMT|UTC)$'
)
] = Header(None, alias='x-fapi-auth-date'),
x_fapi_customer_ip_address: Optional[str] = Header(
None, alias='x-fapi-customer-ip-address'
),
x_fapi_interaction_id: Optional[str] = Header(None, alias='x-fapi-interaction-id'),
authorization: str = Header(..., alias='Authorization'),
x_customer_user_agent: Optional[str] = Header(None, alias='x-customer-user-agent'),
):
"""
Get Beneficiaries
"""
raise RuntimeError("Should be patched by MCPProxy and never executed")
@app.get(
'/accounts/{AccountId}/direct-debits',
tags=['direct_debit_info_management'],
security=[
UnsuportedSecurityStub(name="None"),
],
)
def get_accounts_account_id_direct_debits(
account_id: str = Path(..., alias='AccountId'),
x_fapi_auth_date: Optional[
constr(
pattern=r'^(Mon|Tue|Wed|Thu|Fri|Sat|Sun), \d{2} (Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec) \d{4} \d{2}:\d{2}:\d{2} (GMT|UTC)$'
)
] = Header(None, alias='x-fapi-auth-date'),
x_fapi_customer_ip_address: Optional[str] = Header(
None, alias='x-fapi-customer-ip-address'
),
x_fapi_interaction_id: Optional[str] = Header(None, alias='x-fapi-interaction-id'),
authorization: str = Header(..., alias='Authorization'),
x_customer_user_agent: Optional[str] = Header(None, alias='x-customer-user-agent'),
):
"""
Get Direct Debits
"""
raise RuntimeError("Should be patched by MCPProxy and never executed")
@app.get(
'/accounts/{AccountId}/offers',
tags=['user_offer_retrieval'],
security=[
UnsuportedSecurityStub(name="None"),
],
)
def get_accounts_account_id_offers(
account_id: str = Path(..., alias='AccountId'),
x_fapi_auth_date: Optional[
constr(
pattern=r'^(Mon|Tue|Wed|Thu|Fri|Sat|Sun), \d{2} (Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec) \d{4} \d{2}:\d{2}:\d{2} (GMT|UTC)$'
)
] = Header(None, alias='x-fapi-auth-date'),
x_fapi_customer_ip_address: Optional[str] = Header(
None, alias='x-fapi-customer-ip-address'
),
x_fapi_interaction_id: Optional[str] = Header(None, alias='x-fapi-interaction-id'),
authorization: str = Header(..., alias='Authorization'),
x_customer_user_agent: Optional[str] = Header(None, alias='x-customer-user-agent'),
):
"""
Get Offers
"""
raise RuntimeError("Should be patched by MCPProxy and never executed")
@app.get(
'/accounts/{AccountId}/parties',
tags=['account_access_management', 'account_details_retrieval'],
security=[
UnsuportedSecurityStub(name="None"),
],
)
def get_accounts_account_id_parties(
account_id: str = Path(..., alias='AccountId'),
x_fapi_auth_date: Optional[
constr(
pattern=r'^(Mon|Tue|Wed|Thu|Fri|Sat|Sun), \d{2} (Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec) \d{4} \d{2}:\d{2}:\d{2} (GMT|UTC)$'
)
] = Header(None, alias='x-fapi-auth-date'),
x_fapi_customer_ip_address: Optional[str] = Header(
None, alias='x-fapi-customer-ip-address'
),
x_fapi_interaction_id: Optional[str] = Header(None, alias='x-fapi-interaction-id'),
authorization: str = Header(..., alias='Authorization'),
x_customer_user_agent: Optional[str] = Header(None, alias='x-customer-user-agent'),
):
"""
Get Parties
"""
raise RuntimeError("Should be patched by MCPProxy and never executed")
@app.get(
'/accounts/{AccountId}/party',
tags=['account_access_management'],
security=[
UnsuportedSecurityStub(name="None"),
],
)
def get_accounts_account_id_party(
account_id: str = Path(..., alias='AccountId'),
x_fapi_auth_date: Optional[
constr(
pattern=r'^(Mon|Tue|Wed|Thu|Fri|Sat|Sun), \d{2} (Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec) \d{4} \d{2}:\d{2}:\d{2} (GMT|UTC)$'
)
] = Header(None, alias='x-fapi-auth-date'),
x_fapi_customer_ip_address: Optional[str] = Header(
None, alias='x-fapi-customer-ip-address'
),
x_fapi_interaction_id: Optional[str] = Header(None, alias='x-fapi-interaction-id'),
authorization: str = Header(..., alias='Authorization'),
x_customer_user_agent: Optional[str] = Header(None, alias='x-customer-user-agent'),
):
"""
Get Parties
"""
raise RuntimeError("Should be patched by MCPProxy and never executed")
@app.get(
'/accounts/{AccountId}/product',
tags=['product_info_retrieval'],
security=[
UnsuportedSecurityStub(name="None"),
],
)
def get_accounts_account_id_product(
account_id: str = Path(..., alias='AccountId'),
x_fapi_auth_date: Optional[
constr(
pattern=r'^(Mon|Tue|Wed|Thu|Fri|Sat|Sun), \d{2} (Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec) \d{4} \d{2}:\d{2}:\d{2} (GMT|UTC)$'
)
] = Header(None, alias='x-fapi-auth-date'),
x_fapi_customer_ip_address: Optional[str] = Header(
None, alias='x-fapi-customer-ip-address'
),
x_fapi_interaction_id: Optional[str] = Header(None, alias='x-fapi-interaction-id'),
authorization: str = Header(..., alias='Authorization'),
x_customer_user_agent: Optional[str] = Header(None, alias='x-customer-user-agent'),
):
"""
Get Products
"""
raise RuntimeError("Should be patched by MCPProxy and never executed")
@app.get(
'/accounts/{AccountId}/scheduled-payments',
tags=['scheduled_payment_info_management'],
security=[
UnsuportedSecurityStub(name="None"),
],
)
def get_accounts_account_id_scheduled_payments(
account_id: str = Path(..., alias='AccountId'),
x_fapi_auth_date: Optional[
constr(
pattern=r'^(Mon|Tue|Wed|Thu|Fri|Sat|Sun), \d{2} (Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec) \d{4} \d{2}:\d{2}:\d{2} (GMT|UTC)$'
)
] = Header(None, alias='x-fapi-auth-date'),
x_fapi_customer_ip_address: Optional[str] = Header(
None, alias='x-fapi-customer-ip-address'
),
x_fapi_interaction_id: Optional[str] = Header(None, alias='x-fapi-interaction-id'),
authorization: str = Header(..., alias='Authorization'),
x_customer_user_agent: Optional[str] = Header(None, alias='x-customer-user-agent'),
):
"""
Get Scheduled Payments
"""
raise RuntimeError("Should be patched by MCPProxy and never executed")
@app.get(
'/accounts/{AccountId}/standing-orders',
tags=['scheduled_payment_info_management'],
security=[
UnsuportedSecurityStub(name="None"),
],
)
def get_accounts_account_id_standing_orders(
account_id: str = Path(..., alias='AccountId'),
x_fapi_auth_date: Optional[
constr(
pattern=r'^(Mon|Tue|Wed|Thu|Fri|Sat|Sun), \d{2} (Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec) \d{4} \d{2}:\d{2}:\d{2} (GMT|UTC)$'
)
] = Header(None, alias='x-fapi-auth-date'),
x_fapi_customer_ip_address: Optional[str] = Header(
None, alias='x-fapi-customer-ip-address'
),
x_fapi_interaction_id: Optional[str] = Header(None, alias='x-fapi-interaction-id'),
authorization: str = Header(..., alias='Authorization'),
x_customer_user_agent: Optional[str] = Header(None, alias='x-customer-user-agent'),
):
"""
Get Standing Orders
"""
raise RuntimeError("Should be patched by MCPProxy and never executed")
@app.get(
'/accounts/{AccountId}/statements',
tags=['account_statement_retrieval', 'transaction_details_retrieval'],
security=[
UnsuportedSecurityStub(name="None"),
],
)
def get_accounts_account_id_statements(
account_id: str = Path(..., alias='AccountId'),
x_fapi_auth_date: Optional[
constr(
pattern=r'^(Mon|Tue|Wed|Thu|Fri|Sat|Sun), \d{2} (Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec) \d{4} \d{2}:\d{2}:\d{2} (GMT|UTC)$'
)
] = Header(None, alias='x-fapi-auth-date'),
x_fapi_customer_ip_address: Optional[str] = Header(
None, alias='x-fapi-customer-ip-address'
),
x_fapi_interaction_id: Optional[str] = Header(None, alias='x-fapi-interaction-id'),
authorization: str = Header(..., alias='Authorization'),
x_customer_user_agent: Optional[str] = Header(None, alias='x-customer-user-agent'),
from_statement_date_time: Optional[datetime] = Query(
None, alias='fromStatementDateTime'
),
to_statement_date_time: Optional[datetime] = Query(
None, alias='toStatementDateTime'
),
):
"""
Get Statements
"""
raise RuntimeError("Should be patched by MCPProxy and never executed")
@app.get(
'/accounts/{AccountId}/statements/{StatementId}',
tags=['account_statement_retrieval', 'transaction_details_retrieval'],
security=[
UnsuportedSecurityStub(name="None"),
],
)
def get_accounts_account_id_statements_statement_id(
statement_id: str = Path(..., alias='StatementId'),
account_id: str = Path(..., alias='AccountId'),
x_fapi_auth_date: Optional[
constr(
pattern=r'^(Mon|Tue|Wed|Thu|Fri|Sat|Sun), \d{2} (Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec) \d{4} \d{2}:\d{2}:\d{2} (GMT|UTC)$'
)
] = Header(None, alias='x-fapi-auth-date'),
x_fapi_customer_ip_address: Optional[str] = Header(
None, alias='x-fapi-customer-ip-address'
),
x_fapi_interaction_id: Optional[str] = Header(None, alias='x-fapi-interaction-id'),
authorization: str = Header(..., alias='Authorization'),
x_customer_user_agent: Optional[str] = Header(None, alias='x-customer-user-agent'),
):
"""
Get Statements
"""
raise RuntimeError("Should be patched by MCPProxy and never executed")
@app.get(
'/accounts/{AccountId}/statements/{StatementId}/file',
tags=['account_statement_retrieval', 'transaction_details_retrieval'],
security=[
UnsuportedSecurityStub(name="None"),
],
)
def get_accounts_account_id_statements_statement_id_file(
statement_id: str = Path(..., alias='StatementId'),
account_id: str = Path(..., alias='AccountId'),
x_fapi_auth_date: Optional[
constr(
pattern=r'^(Mon|Tue|Wed|Thu|Fri|Sat|Sun), \d{2} (Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec) \d{4} \d{2}:\d{2}:\d{2} (GMT|UTC)$'
)
] = Header(None, alias='x-fapi-auth-date'),
x_fapi_customer_ip_address: Optional[str] = Header(
None, alias='x-fapi-customer-ip-address'
),
x_fapi_interaction_id: Optional[str] = Header(None, alias='x-fapi-interaction-id'),
authorization: str = Header(..., alias='Authorization'),
x_customer_user_agent: Optional[str] = Header(None, alias='x-customer-user-agent'),
):
"""
Get Statements
"""
raise RuntimeError("Should be patched by MCPProxy and never executed")
@app.get(
'/accounts/{AccountId}/statements/{StatementId}/transactions',
tags=[
'transaction_details_retrieval',
'account_details_retrieval',
'account_statement_retrieval',
],
security=[
UnsuportedSecurityStub(name="None"),
],
)
def get_accounts_account_id_statements_statement_id_transactions(
statement_id: str = Path(..., alias='StatementId'),
account_id: str = Path(..., alias='AccountId'),
x_fapi_auth_date: Optional[
constr(
pattern=r'^(Mon|Tue|Wed|Thu|Fri|Sat|Sun), \d{2} (Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec) \d{4} \d{2}:\d{2}:\d{2} (GMT|UTC)$'
)
] = Header(None, alias='x-fapi-auth-date'),
x_fapi_customer_ip_address: Optional[str] = Header(
None, alias='x-fapi-customer-ip-address'
),
x_fapi_interaction_id: Optional[str] = Header(None, alias='x-fapi-interaction-id'),
authorization: str = Header(..., alias='Authorization'),
x_customer_user_agent: Optional[str] = Header(None, alias='x-customer-user-agent'),
):
"""
Get Transactions
"""
raise RuntimeError("Should be patched by MCPProxy and never executed")
@app.get(
'/accounts/{AccountId}/transactions',
tags=['account_details_retrieval', 'transaction_details_retrieval'],
security=[
UnsuportedSecurityStub(name="None"),
],
)
def get_accounts_account_id_transactions(
account_id: str = Path(..., alias='AccountId'),
x_fapi_auth_date: Optional[
constr(
pattern=r'^(Mon|Tue|Wed|Thu|Fri|Sat|Sun), \d{2} (Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec) \d{4} \d{2}:\d{2}:\d{2} (GMT|UTC)$'
)
] = Header(None, alias='x-fapi-auth-date'),
x_fapi_customer_ip_address: Optional[str] = Header(
None, alias='x-fapi-customer-ip-address'
),
x_fapi_interaction_id: Optional[str] = Header(None, alias='x-fapi-interaction-id'),
authorization: str = Header(..., alias='Authorization'),
x_customer_user_agent: Optional[str] = Header(None, alias='x-customer-user-agent'),
from_booking_date_time: Optional[datetime] = Query(
None, alias='fromBookingDateTime'
),
to_booking_date_time: Optional[datetime] = Query(None, alias='toBookingDateTime'),
):
"""
Get Transactions
"""
raise RuntimeError("Should be patched by MCPProxy and never executed")
@app.get(
'/balances',
tags=['account_balance_retrieval', 'account_details_retrieval'],
security=[
UnsuportedSecurityStub(name="None"),
],
)
def get_balances(
x_fapi_auth_date: Optional[
constr(
pattern=r'^(Mon|Tue|Wed|Thu|Fri|Sat|Sun), \d{2} (Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec) \d{4} \d{2}:\d{2}:\d{2} (GMT|UTC)$'
)
] = Header(None, alias='x-fapi-auth-date'),
x_fapi_customer_ip_address: Optional[str] = Header(
None, alias='x-fapi-customer-ip-address'
),
x_fapi_interaction_id: Optional[str] = Header(None, alias='x-fapi-interaction-id'),
authorization: str = Header(..., alias='Authorization'),
x_customer_user_agent: Optional[str] = Header(None, alias='x-customer-user-agent'),
):
"""
Get Balances
"""
raise RuntimeError("Should be patched by MCPProxy and never executed")
@app.get(
'/beneficiaries',
tags=['account_details_retrieval', 'beneficiary_info_management'],
security=[
UnsuportedSecurityStub(name="None"),
],
)
def get_beneficiaries(
x_fapi_auth_date: Optional[
constr(
pattern=r'^(Mon|Tue|Wed|Thu|Fri|Sat|Sun), \d{2} (Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec) \d{4} \d{2}:\d{2}:\d{2} (GMT|UTC)$'
)
] = Header(None, alias='x-fapi-auth-date'),
x_fapi_customer_ip_address: Optional[str] = Header(
None, alias='x-fapi-customer-ip-address'
),
x_fapi_interaction_id: Optional[str] = Header(None, alias='x-fapi-interaction-id'),
authorization: str = Header(..., alias='Authorization'),
x_customer_user_agent: Optional[str] = Header(None, alias='x-customer-user-agent'),
):
"""
Get Beneficiaries
"""
raise RuntimeError("Should be patched by MCPProxy and never executed")
@app.get(
'/direct-debits',
tags=['direct_debit_info_management'],
security=[
UnsuportedSecurityStub(name="None"),
],
)
def get_direct_debits(
x_fapi_auth_date: Optional[
constr(
pattern=r'^(Mon|Tue|Wed|Thu|Fri|Sat|Sun), \d{2} (Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec) \d{4} \d{2}:\d{2}:\d{2} (GMT|UTC)$'
)
] = Header(None, alias='x-fapi-auth-date'),
x_fapi_customer_ip_address: Optional[str] = Header(
None, alias='x-fapi-customer-ip-address'
),
x_fapi_interaction_id: Optional[str] = Header(None, alias='x-fapi-interaction-id'),
authorization: str = Header(..., alias='Authorization'),
x_customer_user_agent: Optional[str] = Header(None, alias='x-customer-user-agent'),
):
"""
Get Direct Debits
"""
raise RuntimeError("Should be patched by MCPProxy and never executed")
@app.get(
'/offers',
tags=['user_offer_retrieval'],
security=[
UnsuportedSecurityStub(name="None"),
],
)
def get_offers(
x_fapi_auth_date: Optional[
constr(
pattern=r'^(Mon|Tue|Wed|Thu|Fri|Sat|Sun), \d{2} (Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec) \d{4} \d{2}:\d{2}:\d{2} (GMT|UTC)$'
)
] = Header(None, alias='x-fapi-auth-date'),
x_fapi_customer_ip_address: Optional[str] = Header(
None, alias='x-fapi-customer-ip-address'
),
x_fapi_interaction_id: Optional[str] = Header(None, alias='x-fapi-interaction-id'),
authorization: str = Header(..., alias='Authorization'),
x_customer_user_agent: Optional[str] = Header(None, alias='x-customer-user-agent'),
):
"""
Get Offers
"""
raise RuntimeError("Should be patched by MCPProxy and never executed")
@app.get(
'/party',
tags=['account_access_management'],
security=[
UnsuportedSecurityStub(name="None"),
],
)
def get_party(
x_fapi_auth_date: Optional[
constr(
pattern=r'^(Mon|Tue|Wed|Thu|Fri|Sat|Sun), \d{2} (Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec) \d{4} \d{2}:\d{2}:\d{2} (GMT|UTC)$'
)
] = Header(None, alias='x-fapi-auth-date'),
x_fapi_customer_ip_address: Optional[str] = Header(
None, alias='x-fapi-customer-ip-address'
),
x_fapi_interaction_id: Optional[str] = Header(None, alias='x-fapi-interaction-id'),
authorization: str = Header(..., alias='Authorization'),
x_customer_user_agent: Optional[str] = Header(None, alias='x-customer-user-agent'),
):
"""
Get Parties
"""
raise RuntimeError("Should be patched by MCPProxy and never executed")
@app.get(
'/products',
tags=['product_info_retrieval'],
security=[
UnsuportedSecurityStub(name="None"),
],
)
def get_products(
x_fapi_auth_date: Optional[
constr(
pattern=r'^(Mon|Tue|Wed|Thu|Fri|Sat|Sun), \d{2} (Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec) \d{4} \d{2}:\d{2}:\d{2} (GMT|UTC)$'
)
] = Header(None, alias='x-fapi-auth-date'),
x_fapi_customer_ip_address: Optional[str] = Header(
None, alias='x-fapi-customer-ip-address'
),
x_fapi_interaction_id: Optional[str] = Header(None, alias='x-fapi-interaction-id'),
authorization: str = Header(..., alias='Authorization'),
x_customer_user_agent: Optional[str] = Header(None, alias='x-customer-user-agent'),
):
"""
Get Products
"""
raise RuntimeError("Should be patched by MCPProxy and never executed")
@app.get(
'/scheduled-payments',
tags=['scheduled_payment_info_management'],
security=[
UnsuportedSecurityStub(name="None"),
],
)
def get_scheduled_payments(
x_fapi_auth_date: Optional[
constr(
pattern=r'^(Mon|Tue|Wed|Thu|Fri|Sat|Sun), \d{2} (Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec) \d{4} \d{2}:\d{2}:\d{2} (GMT|UTC)$'
)
] = Header(None, alias='x-fapi-auth-date'),
x_fapi_customer_ip_address: Optional[str] = Header(
None, alias='x-fapi-customer-ip-address'
),
x_fapi_interaction_id: Optional[str] = Header(None, alias='x-fapi-interaction-id'),
authorization: str = Header(..., alias='Authorization'),
x_customer_user_agent: Optional[str] = Header(None, alias='x-customer-user-agent'),
):
"""
Get Scheduled Payments
"""
raise RuntimeError("Should be patched by MCPProxy and never executed")
@app.get(
'/standing-orders',
tags=['scheduled_payment_info_management', 'account_details_retrieval'],
security=[
UnsuportedSecurityStub(name="None"),
],
)
def get_standing_orders(
x_fapi_auth_date: Optional[
constr(
pattern=r'^(Mon|Tue|Wed|Thu|Fri|Sat|Sun), \d{2} (Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec) \d{4} \d{2}:\d{2}:\d{2} (GMT|UTC)$'
)
] = Header(None, alias='x-fapi-auth-date'),
x_fapi_customer_ip_address: Optional[str] = Header(
None, alias='x-fapi-customer-ip-address'
),
x_fapi_interaction_id: Optional[str] = Header(None, alias='x-fapi-interaction-id'),
authorization: str = Header(..., alias='Authorization'),
x_customer_user_agent: Optional[str] = Header(None, alias='x-customer-user-agent'),
):
"""
Get Standing Orders
"""
raise RuntimeError("Should be patched by MCPProxy and never executed")
@app.get(
'/statements',
tags=['transaction_details_retrieval', 'account_statement_retrieval'],
security=[
UnsuportedSecurityStub(name="None"),
],
)
def get_statements(
x_fapi_auth_date: Optional[
constr(
pattern=r'^(Mon|Tue|Wed|Thu|Fri|Sat|Sun), \d{2} (Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec) \d{4} \d{2}:\d{2}:\d{2} (GMT|UTC)$'
)
] = Header(None, alias='x-fapi-auth-date'),
x_fapi_customer_ip_address: Optional[str] = Header(
None, alias='x-fapi-customer-ip-address'
),
x_fapi_interaction_id: Optional[str] = Header(None, alias='x-fapi-interaction-id'),
authorization: str = Header(..., alias='Authorization'),
from_statement_date_time: Optional[datetime] = Query(
None, alias='fromStatementDateTime'
),
to_statement_date_time: Optional[datetime] = Query(
None, alias='toStatementDateTime'
),
x_customer_user_agent: Optional[str] = Header(None, alias='x-customer-user-agent'),
):
"""
Get Statements
"""
raise RuntimeError("Should be patched by MCPProxy and never executed")
@app.get(
'/transactions',
tags=['transaction_details_retrieval', 'account_details_retrieval'],
security=[
UnsuportedSecurityStub(name="None"),
],
)
def get_transactions(
x_fapi_auth_date: Optional[
constr(
pattern=r'^(Mon|Tue|Wed|Thu|Fri|Sat|Sun), \d{2} (Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec) \d{4} \d{2}:\d{2}:\d{2} (GMT|UTC)$'
)
] = Header(None, alias='x-fapi-auth-date'),
x_fapi_customer_ip_address: Optional[str] = Header(
None, alias='x-fapi-customer-ip-address'
),
x_fapi_interaction_id: Optional[str] = Header(None, alias='x-fapi-interaction-id'),
authorization: str = Header(..., alias='Authorization'),
x_customer_user_agent: Optional[str] = Header(None, alias='x-customer-user-agent'),
from_booking_date_time: Optional[datetime] = Query(
None, alias='fromBookingDateTime'
),
to_booking_date_time: Optional[datetime] = Query(None, alias='toBookingDateTime'),
):
"""
Get Transactions
"""
raise RuntimeError("Should be patched by MCPProxy and never executed")
if __name__ == "__main__":
parser = argparse.ArgumentParser(description="MCP Server")
parser.add_argument(
"transport",
choices=["stdio", "sse", "streamable-http"],
help="Transport mode (stdio, sse or streamable-http)",
)
args = parser.parse_args()
if "CONFIG_PATH" in os.environ:
config_path = os.environ["CONFIG_PATH"]
app.load_configuration(config_path)
if "CONFIG" in os.environ:
config = os.environ["CONFIG"]
app.load_configuration_from_string(config)
if "SECURITY" in os.environ:
security_params = BaseSecurity.parse_security_parameters_from_env(
os.environ,
)
app.set_security_params(security_params)
mcp_settings = json.loads(os.environ.get("MCP_SETTINGS", "{}"))
app.get_mcp(**mcp_settings).run(transport=args.transport)