main.py•35 kB
# generated by fastapi-codegen:
# filename: openapi.yaml
# timestamp: 2025-06-29T11:18:29+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, HTTPBasic
from fastapi import Path, Query
from pydantic import conint, constr
from starlette.requests import Request
from models import (
ChallengeEnumChallengeStatuses,
ChallengeEnumListOrders,
FormEnumFormTypes,
V2AttemptsGetResponse,
V2ServicesGetResponse,
V2ServicesServiceSidEntitiesGetResponse,
V2ServicesServiceSidEntitiesIdentityChallengesGetResponse,
V2ServicesServiceSidEntitiesIdentityFactorsGetResponse,
V2ServicesServiceSidMessagingConfigurationsGetResponse,
V2ServicesServiceSidRateLimitsGetResponse,
V2ServicesServiceSidRateLimitsRateLimitSidBucketsGetResponse,
V2ServicesServiceSidWebhooksGetResponse,
V2TemplatesGetResponse,
VerificationAttemptEnumChannels,
VerificationAttemptEnumConversionStatus,
VerificationAttemptsSummaryEnumChannels,
VerifyV2Form,
VerifyV2Safelist,
VerifyV2Service,
VerifyV2ServiceAccessToken,
VerifyV2ServiceEntity,
VerifyV2ServiceEntityChallenge,
VerifyV2ServiceEntityChallengeNotification,
VerifyV2ServiceEntityFactor,
VerifyV2ServiceEntityNewFactor,
VerifyV2ServiceMessagingConfiguration,
VerifyV2ServiceRateLimit,
VerifyV2ServiceRateLimitBucket,
VerifyV2ServiceVerification,
VerifyV2ServiceVerificationCheck,
VerifyV2ServiceWebhook,
VerifyV2VerificationAttempt,
VerifyV2VerificationAttemptsSummary,
)
app = MCPProxy(
contact={
'email': 'support@twilio.com',
'name': 'Twilio Support',
'url': 'https://support.twilio.com',
},
description='This is the public Twilio REST API.',
license={
'name': 'Apache 2.0',
'url': 'https://www.apache.org/licenses/LICENSE-2.0.html',
},
termsOfService='https://www.twilio.com/legal/tos',
title='Twilio - Verify',
version='1.42.0',
servers=[{'url': 'https://verify.twilio.com'}],
)
@app.get(
'/v2/Attempts',
description=""" List all the verification attempts for a given Account. """,
tags=['verification_attempt_management', 'verification_handling'],
security=[
HTTPBasic(name="None"),
],
)
def list_verification_attempt(
date_created_after: Optional[datetime] = Query(None, alias='DateCreatedAfter'),
date_created_before: Optional[datetime] = Query(None, alias='DateCreatedBefore'),
channel_data__to: Optional[str] = Query(None, alias='ChannelData.To'),
country: Optional[str] = Query(None, alias='Country'),
channel: Optional[VerificationAttemptEnumChannels] = Query(None, alias='Channel'),
verify_service_sid: Optional[
constr(pattern=r'^VA[0-9a-fA-F]{32}$', min_length=34, max_length=34)
] = Query(None, alias='VerifyServiceSid'),
verification_sid: Optional[
constr(pattern=r'^VE[0-9a-fA-F]{32}$', min_length=34, max_length=34)
] = Query(None, alias='VerificationSid'),
status: Optional[VerificationAttemptEnumConversionStatus] = Query(
None, alias='Status'
),
page_size: Optional[conint(ge=1, le=1000)] = Query(None, alias='PageSize'),
page: Optional[conint(ge=0)] = Query(None, alias='Page'),
page_token: Optional[str] = Query(None, alias='PageToken'),
):
raise RuntimeError("Should be patched by MCPProxy and never executed")
@app.get(
'/v2/Attempts/Summary',
description=""" Get a summary of how many attempts were made and how many were converted. """,
tags=['verification_attempt_management', 'verification_handling'],
security=[
HTTPBasic(name="None"),
],
)
def fetch_verification_attempts_summary(
verify_service_sid: Optional[
constr(pattern=r'^VA[0-9a-fA-F]{32}$', min_length=34, max_length=34)
] = Query(None, alias='VerifyServiceSid'),
date_created_after: Optional[datetime] = Query(None, alias='DateCreatedAfter'),
date_created_before: Optional[datetime] = Query(None, alias='DateCreatedBefore'),
country: Optional[str] = Query(None, alias='Country'),
channel: Optional[VerificationAttemptsSummaryEnumChannels] = Query(
None, alias='Channel'
),
destination_prefix: Optional[str] = Query(None, alias='DestinationPrefix'),
):
raise RuntimeError("Should be patched by MCPProxy and never executed")
@app.get(
'/v2/Attempts/{Sid}',
description=""" Fetch a specific verification attempt. """,
tags=['verification_handling'],
security=[
HTTPBasic(name="None"),
],
)
def fetch_verification_attempt(
sid: constr(pattern=r'^VL[0-9a-fA-F]{32}$', min_length=34, max_length=34) = Path(
..., alias='Sid'
)
):
raise RuntimeError("Should be patched by MCPProxy and never executed")
@app.get(
'/v2/Forms/{FormType}',
description=""" Fetch the forms for a specific Form Type. """,
tags=['verification_handling'],
security=[
HTTPBasic(name="None"),
],
)
def fetch_form(form_type: FormEnumFormTypes = Path(..., alias='FormType')):
raise RuntimeError("Should be patched by MCPProxy and never executed")
@app.post(
'/v2/SafeList/Numbers',
description=""" Add a new phone number to SafeList. """,
tags=['verification_attempt_management', 'verification_handling'],
security=[
HTTPBasic(name="None"),
],
)
def create_safelist(request: Request):
raise RuntimeError("Should be patched by MCPProxy and never executed")
@app.delete(
'/v2/SafeList/Numbers/{PhoneNumber}',
description=""" Remove a phone number from SafeList. """,
tags=['safelist_management'],
security=[
HTTPBasic(name="None"),
],
)
def delete_safelist(phone_number: str = Path(..., alias='PhoneNumber')):
raise RuntimeError("Should be patched by MCPProxy and never executed")
@app.get(
'/v2/SafeList/Numbers/{PhoneNumber}',
description=""" Check if a phone number exists in SafeList. """,
tags=['safelist_management'],
security=[
HTTPBasic(name="None"),
],
)
def fetch_safelist(phone_number: str = Path(..., alias='PhoneNumber')):
raise RuntimeError("Should be patched by MCPProxy and never executed")
@app.get(
'/v2/Services',
description=""" Retrieve a list of all Verification Services for an account. """,
tags=['verification_attempt_management', 'verification_handling'],
security=[
HTTPBasic(name="None"),
],
)
def list_service(
page_size: Optional[conint(ge=1, le=1000)] = Query(None, alias='PageSize'),
page: Optional[conint(ge=0)] = Query(None, alias='Page'),
page_token: Optional[str] = Query(None, alias='PageToken'),
):
raise RuntimeError("Should be patched by MCPProxy and never executed")
@app.post(
'/v2/Services',
description=""" Create a new Verification Service. """,
tags=['verification_handling'],
security=[
HTTPBasic(name="None"),
],
)
def create_service(request: Request):
raise RuntimeError("Should be patched by MCPProxy and never executed")
@app.post(
'/v2/Services/{ServiceSid}/AccessTokens',
description=""" Create a new enrollment Access Token for the Entity """,
tags=['service_management'],
security=[
HTTPBasic(name="None"),
],
)
def create_access_token(
service_sid: constr(
pattern=r'^VA[0-9a-fA-F]{32}$', min_length=34, max_length=34
) = Path(..., alias='ServiceSid'),
request: Request = ...,
):
raise RuntimeError("Should be patched by MCPProxy and never executed")
@app.get(
'/v2/Services/{ServiceSid}/AccessTokens/{Sid}',
description=""" Fetch an Access Token for the Entity """,
tags=['verification_handling', 'verification_attempt_management'],
security=[
HTTPBasic(name="None"),
],
)
def fetch_access_token(
service_sid: constr(
pattern=r'^VA[0-9a-fA-F]{32}$', min_length=34, max_length=34
) = Path(..., alias='ServiceSid'),
sid: constr(pattern=r'^YK[0-9a-fA-F]{32}$', min_length=34, max_length=34) = Path(
..., alias='Sid'
),
):
raise RuntimeError("Should be patched by MCPProxy and never executed")
@app.get(
'/v2/Services/{ServiceSid}/Entities',
description=""" Retrieve a list of all Entities for a Service. """,
tags=['verification_attempt_management', 'verification_handling'],
security=[
HTTPBasic(name="None"),
],
)
def list_entity(
service_sid: constr(
pattern=r'^VA[0-9a-fA-F]{32}$', min_length=34, max_length=34
) = Path(..., alias='ServiceSid'),
page_size: Optional[conint(ge=1, le=1000)] = Query(None, alias='PageSize'),
page: Optional[conint(ge=0)] = Query(None, alias='Page'),
page_token: Optional[str] = Query(None, alias='PageToken'),
):
raise RuntimeError("Should be patched by MCPProxy and never executed")
@app.post(
'/v2/Services/{ServiceSid}/Entities',
description=""" Create a new Entity for the Service """,
tags=['verification_handling', 'service_management'],
security=[
HTTPBasic(name="None"),
],
)
def create_entity(
service_sid: constr(
pattern=r'^VA[0-9a-fA-F]{32}$', min_length=34, max_length=34
) = Path(..., alias='ServiceSid'),
request: Request = ...,
):
raise RuntimeError("Should be patched by MCPProxy and never executed")
@app.delete(
'/v2/Services/{ServiceSid}/Entities/{Identity}',
description=""" Delete a specific Entity. """,
tags=['service_management', 'entity_management'],
security=[
HTTPBasic(name="None"),
],
)
def delete_entity(
service_sid: constr(
pattern=r'^VA[0-9a-fA-F]{32}$', min_length=34, max_length=34
) = Path(..., alias='ServiceSid'),
identity: str = Path(..., alias='Identity'),
):
raise RuntimeError("Should be patched by MCPProxy and never executed")
@app.get(
'/v2/Services/{ServiceSid}/Entities/{Identity}',
description=""" Fetch a specific Entity. """,
tags=['service_management', 'entity_management'],
security=[
HTTPBasic(name="None"),
],
)
def fetch_entity(
service_sid: constr(
pattern=r'^VA[0-9a-fA-F]{32}$', min_length=34, max_length=34
) = Path(..., alias='ServiceSid'),
identity: str = Path(..., alias='Identity'),
):
raise RuntimeError("Should be patched by MCPProxy and never executed")
@app.get(
'/v2/Services/{ServiceSid}/Entities/{Identity}/Challenges',
description=""" Retrieve a list of all Challenges for a Factor. """,
tags=[
'verification_attempt_management',
'challenge_handling',
'verification_handling',
],
security=[
HTTPBasic(name="None"),
],
)
def list_challenge(
service_sid: constr(
pattern=r'^VA[0-9a-fA-F]{32}$', min_length=34, max_length=34
) = Path(..., alias='ServiceSid'),
identity: str = Path(..., alias='Identity'),
factor_sid: Optional[
constr(pattern=r'^YF[0-9a-fA-F]{32}$', min_length=34, max_length=34)
] = Query(None, alias='FactorSid'),
status: Optional[ChallengeEnumChallengeStatuses] = Query(None, alias='Status'),
order: Optional[ChallengeEnumListOrders] = Query(None, alias='Order'),
page_size: Optional[conint(ge=1, le=1000)] = Query(None, alias='PageSize'),
page: Optional[conint(ge=0)] = Query(None, alias='Page'),
page_token: Optional[str] = Query(None, alias='PageToken'),
):
raise RuntimeError("Should be patched by MCPProxy and never executed")
@app.post(
'/v2/Services/{ServiceSid}/Entities/{Identity}/Challenges',
description=""" Create a new Challenge for the Factor """,
tags=['verification_handling'],
security=[
HTTPBasic(name="None"),
],
)
def create_challenge(
service_sid: constr(
pattern=r'^VA[0-9a-fA-F]{32}$', min_length=34, max_length=34
) = Path(..., alias='ServiceSid'),
identity: str = Path(..., alias='Identity'),
request: Request = ...,
):
raise RuntimeError("Should be patched by MCPProxy and never executed")
@app.post(
'/v2/Services/{ServiceSid}/Entities/{Identity}/Challenges/{ChallengeSid}/Notifications',
description=""" Create a new Notification for the corresponding Challenge """,
tags=[
'verification_attempt_management',
'verification_handling',
'challenge_handling',
],
security=[
HTTPBasic(name="None"),
],
)
def create_notification(
service_sid: constr(
pattern=r'^VA[0-9a-fA-F]{32}$', min_length=34, max_length=34
) = Path(..., alias='ServiceSid'),
identity: str = Path(..., alias='Identity'),
challenge_sid: constr(
pattern=r'^YC[0-9a-fA-F]{32}$', min_length=34, max_length=34
) = Path(..., alias='ChallengeSid'),
request: Request = ...,
):
raise RuntimeError("Should be patched by MCPProxy and never executed")
@app.get(
'/v2/Services/{ServiceSid}/Entities/{Identity}/Challenges/{Sid}',
description=""" Fetch a specific Challenge. """,
tags=['verification_attempt_management', 'verification_handling'],
security=[
HTTPBasic(name="None"),
],
)
def fetch_challenge(
service_sid: constr(
pattern=r'^VA[0-9a-fA-F]{32}$', min_length=34, max_length=34
) = Path(..., alias='ServiceSid'),
identity: str = Path(..., alias='Identity'),
sid: constr(pattern=r'^YC[0-9a-fA-F]{32}$', min_length=34, max_length=34) = Path(
..., alias='Sid'
),
):
raise RuntimeError("Should be patched by MCPProxy and never executed")
@app.post(
'/v2/Services/{ServiceSid}/Entities/{Identity}/Challenges/{Sid}',
description=""" Verify a specific Challenge. """,
tags=['verification_attempt_management', 'verification_handling'],
security=[
HTTPBasic(name="None"),
],
)
def update_challenge(
service_sid: constr(
pattern=r'^VA[0-9a-fA-F]{32}$', min_length=34, max_length=34
) = Path(..., alias='ServiceSid'),
identity: str = Path(..., alias='Identity'),
sid: constr(pattern=r'^YC[0-9a-fA-F]{32}$', min_length=34, max_length=34) = Path(
..., alias='Sid'
),
request: Request = ...,
):
raise RuntimeError("Should be patched by MCPProxy and never executed")
@app.get(
'/v2/Services/{ServiceSid}/Entities/{Identity}/Factors',
description=""" Retrieve a list of all Factors for an Entity. """,
tags=['verification_attempt_management', 'verification_handling'],
security=[
HTTPBasic(name="None"),
],
)
def list_factor(
service_sid: constr(
pattern=r'^VA[0-9a-fA-F]{32}$', min_length=34, max_length=34
) = Path(..., alias='ServiceSid'),
identity: str = Path(..., alias='Identity'),
page_size: Optional[conint(ge=1, le=1000)] = Query(None, alias='PageSize'),
page: Optional[conint(ge=0)] = Query(None, alias='Page'),
page_token: Optional[str] = Query(None, alias='PageToken'),
):
raise RuntimeError("Should be patched by MCPProxy and never executed")
@app.post(
'/v2/Services/{ServiceSid}/Entities/{Identity}/Factors',
description=""" Create a new Factor for the Entity """,
tags=['verification_handling'],
security=[
HTTPBasic(name="None"),
],
)
def create_new_factor(
service_sid: constr(
pattern=r'^VA[0-9a-fA-F]{32}$', min_length=34, max_length=34
) = Path(..., alias='ServiceSid'),
identity: str = Path(..., alias='Identity'),
request: Request = ...,
):
raise RuntimeError("Should be patched by MCPProxy and never executed")
@app.delete(
'/v2/Services/{ServiceSid}/Entities/{Identity}/Factors/{Sid}',
description=""" Delete a specific Factor. """,
tags=['service_management', 'verification_handling'],
security=[
HTTPBasic(name="None"),
],
)
def delete_factor(
service_sid: constr(
pattern=r'^VA[0-9a-fA-F]{32}$', min_length=34, max_length=34
) = Path(..., alias='ServiceSid'),
identity: str = Path(..., alias='Identity'),
sid: constr(pattern=r'^YF[0-9a-fA-F]{32}$', min_length=34, max_length=34) = Path(
..., alias='Sid'
),
):
raise RuntimeError("Should be patched by MCPProxy and never executed")
@app.get(
'/v2/Services/{ServiceSid}/Entities/{Identity}/Factors/{Sid}',
description=""" Fetch a specific Factor. """,
tags=['service_management', 'entity_management', 'verification_handling'],
security=[
HTTPBasic(name="None"),
],
)
def fetch_factor(
service_sid: constr(
pattern=r'^VA[0-9a-fA-F]{32}$', min_length=34, max_length=34
) = Path(..., alias='ServiceSid'),
identity: str = Path(..., alias='Identity'),
sid: constr(pattern=r'^YF[0-9a-fA-F]{32}$', min_length=34, max_length=34) = Path(
..., alias='Sid'
),
):
raise RuntimeError("Should be patched by MCPProxy and never executed")
@app.post(
'/v2/Services/{ServiceSid}/Entities/{Identity}/Factors/{Sid}',
description=""" Update a specific Factor. This endpoint can be used to Verify a Factor if passed an `AuthPayload` param. """,
tags=['verification_handling', 'verification_attempt_management'],
security=[
HTTPBasic(name="None"),
],
)
def update_factor(
service_sid: constr(
pattern=r'^VA[0-9a-fA-F]{32}$', min_length=34, max_length=34
) = Path(..., alias='ServiceSid'),
identity: str = Path(..., alias='Identity'),
sid: constr(pattern=r'^YF[0-9a-fA-F]{32}$', min_length=34, max_length=34) = Path(
..., alias='Sid'
),
request: Request = ...,
):
raise RuntimeError("Should be patched by MCPProxy and never executed")
@app.get(
'/v2/Services/{ServiceSid}/MessagingConfigurations',
description=""" Retrieve a list of all Messaging Configurations for a Service. """,
tags=['verification_attempt_management', 'verification_handling'],
security=[
HTTPBasic(name="None"),
],
)
def list_messaging_configuration(
service_sid: constr(
pattern=r'^VA[0-9a-fA-F]{32}$', min_length=34, max_length=34
) = Path(..., alias='ServiceSid'),
page_size: Optional[conint(ge=1, le=1000)] = Query(None, alias='PageSize'),
page: Optional[conint(ge=0)] = Query(None, alias='Page'),
page_token: Optional[str] = Query(None, alias='PageToken'),
):
raise RuntimeError("Should be patched by MCPProxy and never executed")
@app.post(
'/v2/Services/{ServiceSid}/MessagingConfigurations',
description=""" Create a new MessagingConfiguration for a service. """,
tags=['service_management'],
security=[
HTTPBasic(name="None"),
],
)
def create_messaging_configuration(
service_sid: constr(
pattern=r'^VA[0-9a-fA-F]{32}$', min_length=34, max_length=34
) = Path(..., alias='ServiceSid'),
request: Request = ...,
):
raise RuntimeError("Should be patched by MCPProxy and never executed")
@app.delete(
'/v2/Services/{ServiceSid}/MessagingConfigurations/{Country}',
description=""" Delete a specific MessagingConfiguration. """,
tags=['service_management'],
security=[
HTTPBasic(name="None"),
],
)
def delete_messaging_configuration(
service_sid: constr(
pattern=r'^VA[0-9a-fA-F]{32}$', min_length=34, max_length=34
) = Path(..., alias='ServiceSid'),
country: str = Path(..., alias='Country'),
):
raise RuntimeError("Should be patched by MCPProxy and never executed")
@app.get(
'/v2/Services/{ServiceSid}/MessagingConfigurations/{Country}',
description=""" Fetch a specific MessagingConfiguration. """,
tags=['service_management', 'entity_management'],
security=[
HTTPBasic(name="None"),
],
)
def fetch_messaging_configuration(
service_sid: constr(
pattern=r'^VA[0-9a-fA-F]{32}$', min_length=34, max_length=34
) = Path(..., alias='ServiceSid'),
country: str = Path(..., alias='Country'),
):
raise RuntimeError("Should be patched by MCPProxy and never executed")
@app.post(
'/v2/Services/{ServiceSid}/MessagingConfigurations/{Country}',
description=""" Update a specific MessagingConfiguration """,
tags=['service_management', 'verification_handling'],
security=[
HTTPBasic(name="None"),
],
)
def update_messaging_configuration(
service_sid: constr(
pattern=r'^VA[0-9a-fA-F]{32}$', min_length=34, max_length=34
) = Path(..., alias='ServiceSid'),
country: str = Path(..., alias='Country'),
request: Request = ...,
):
raise RuntimeError("Should be patched by MCPProxy and never executed")
@app.get(
'/v2/Services/{ServiceSid}/RateLimits',
description=""" Retrieve a list of all Rate Limits for a service. """,
tags=['service_management', 'entity_management'],
security=[
HTTPBasic(name="None"),
],
)
def list_rate_limit(
service_sid: constr(
pattern=r'^VA[0-9a-fA-F]{32}$', min_length=34, max_length=34
) = Path(..., alias='ServiceSid'),
page_size: Optional[conint(ge=1, le=1000)] = Query(None, alias='PageSize'),
page: Optional[conint(ge=0)] = Query(None, alias='Page'),
page_token: Optional[str] = Query(None, alias='PageToken'),
):
raise RuntimeError("Should be patched by MCPProxy and never executed")
@app.post(
'/v2/Services/{ServiceSid}/RateLimits',
description=""" Create a new Rate Limit for a Service """,
tags=['verification_handling'],
security=[
HTTPBasic(name="None"),
],
)
def create_rate_limit(
service_sid: constr(
pattern=r'^VA[0-9a-fA-F]{32}$', min_length=34, max_length=34
) = Path(..., alias='ServiceSid'),
request: Request = ...,
):
raise RuntimeError("Should be patched by MCPProxy and never executed")
@app.get(
'/v2/Services/{ServiceSid}/RateLimits/{RateLimitSid}/Buckets',
description=""" Retrieve a list of all Buckets for a Rate Limit. """,
tags=['rate_limit_handling', 'service_management'],
security=[
HTTPBasic(name="None"),
],
)
def list_bucket(
service_sid: constr(
pattern=r'^VA[0-9a-fA-F]{32}$', min_length=34, max_length=34
) = Path(..., alias='ServiceSid'),
rate_limit_sid: constr(
pattern=r'^RK[0-9a-fA-F]{32}$', min_length=34, max_length=34
) = Path(..., alias='RateLimitSid'),
page_size: Optional[conint(ge=1, le=1000)] = Query(None, alias='PageSize'),
page: Optional[conint(ge=0)] = Query(None, alias='Page'),
page_token: Optional[str] = Query(None, alias='PageToken'),
):
raise RuntimeError("Should be patched by MCPProxy and never executed")
@app.post(
'/v2/Services/{ServiceSid}/RateLimits/{RateLimitSid}/Buckets',
description=""" Create a new Bucket for a Rate Limit """,
tags=['rate_limit_handling'],
security=[
HTTPBasic(name="None"),
],
)
def create_bucket(
service_sid: constr(
pattern=r'^VA[0-9a-fA-F]{32}$', min_length=34, max_length=34
) = Path(..., alias='ServiceSid'),
rate_limit_sid: constr(
pattern=r'^RK[0-9a-fA-F]{32}$', min_length=34, max_length=34
) = Path(..., alias='RateLimitSid'),
request: Request = ...,
):
raise RuntimeError("Should be patched by MCPProxy and never executed")
@app.delete(
'/v2/Services/{ServiceSid}/RateLimits/{RateLimitSid}/Buckets/{Sid}',
description=""" Delete a specific Bucket. """,
tags=['service_management', 'rate_limit_handling'],
security=[
HTTPBasic(name="None"),
],
)
def delete_bucket(
service_sid: constr(
pattern=r'^VA[0-9a-fA-F]{32}$', min_length=34, max_length=34
) = Path(..., alias='ServiceSid'),
rate_limit_sid: constr(
pattern=r'^RK[0-9a-fA-F]{32}$', min_length=34, max_length=34
) = Path(..., alias='RateLimitSid'),
sid: constr(pattern=r'^BL[0-9a-fA-F]{32}$', min_length=34, max_length=34) = Path(
..., alias='Sid'
),
):
raise RuntimeError("Should be patched by MCPProxy and never executed")
@app.get(
'/v2/Services/{ServiceSid}/RateLimits/{RateLimitSid}/Buckets/{Sid}',
description=""" Fetch a specific Bucket. """,
tags=['rate_limit_handling', 'service_management'],
security=[
HTTPBasic(name="None"),
],
)
def fetch_bucket(
service_sid: constr(
pattern=r'^VA[0-9a-fA-F]{32}$', min_length=34, max_length=34
) = Path(..., alias='ServiceSid'),
rate_limit_sid: constr(
pattern=r'^RK[0-9a-fA-F]{32}$', min_length=34, max_length=34
) = Path(..., alias='RateLimitSid'),
sid: constr(pattern=r'^BL[0-9a-fA-F]{32}$', min_length=34, max_length=34) = Path(
..., alias='Sid'
),
):
raise RuntimeError("Should be patched by MCPProxy and never executed")
@app.post(
'/v2/Services/{ServiceSid}/RateLimits/{RateLimitSid}/Buckets/{Sid}',
description=""" Update a specific Bucket. """,
tags=[
'verification_attempt_management',
'rate_limit_handling',
'verification_handling',
],
security=[
HTTPBasic(name="None"),
],
)
def update_bucket(
service_sid: constr(
pattern=r'^VA[0-9a-fA-F]{32}$', min_length=34, max_length=34
) = Path(..., alias='ServiceSid'),
rate_limit_sid: constr(
pattern=r'^RK[0-9a-fA-F]{32}$', min_length=34, max_length=34
) = Path(..., alias='RateLimitSid'),
sid: constr(pattern=r'^BL[0-9a-fA-F]{32}$', min_length=34, max_length=34) = Path(
..., alias='Sid'
),
request: Request = ...,
):
raise RuntimeError("Should be patched by MCPProxy and never executed")
@app.delete(
'/v2/Services/{ServiceSid}/RateLimits/{Sid}',
description=""" Delete a specific Rate Limit. """,
tags=['service_management'],
security=[
HTTPBasic(name="None"),
],
)
def delete_rate_limit(
service_sid: constr(
pattern=r'^VA[0-9a-fA-F]{32}$', min_length=34, max_length=34
) = Path(..., alias='ServiceSid'),
sid: constr(pattern=r'^RK[0-9a-fA-F]{32}$', min_length=34, max_length=34) = Path(
..., alias='Sid'
),
):
raise RuntimeError("Should be patched by MCPProxy and never executed")
@app.get(
'/v2/Services/{ServiceSid}/RateLimits/{Sid}',
description=""" Fetch a specific Rate Limit. """,
tags=['service_management', 'entity_management'],
security=[
HTTPBasic(name="None"),
],
)
def fetch_rate_limit(
service_sid: constr(
pattern=r'^VA[0-9a-fA-F]{32}$', min_length=34, max_length=34
) = Path(..., alias='ServiceSid'),
sid: constr(pattern=r'^RK[0-9a-fA-F]{32}$', min_length=34, max_length=34) = Path(
..., alias='Sid'
),
):
raise RuntimeError("Should be patched by MCPProxy and never executed")
@app.post(
'/v2/Services/{ServiceSid}/RateLimits/{Sid}',
description=""" Update a specific Rate Limit. """,
tags=['service_management', 'verification_handling'],
security=[
HTTPBasic(name="None"),
],
)
def update_rate_limit(
service_sid: constr(
pattern=r'^VA[0-9a-fA-F]{32}$', min_length=34, max_length=34
) = Path(..., alias='ServiceSid'),
sid: constr(pattern=r'^RK[0-9a-fA-F]{32}$', min_length=34, max_length=34) = Path(
..., alias='Sid'
),
request: Request = ...,
):
raise RuntimeError("Should be patched by MCPProxy and never executed")
@app.post(
'/v2/Services/{ServiceSid}/VerificationCheck',
description=""" challenge a specific Verification Check. """,
tags=['service_management'],
security=[
HTTPBasic(name="None"),
],
)
def create_verification_check(
service_sid: constr(
pattern=r'^VA[0-9a-fA-F]{32}$', min_length=34, max_length=34
) = Path(..., alias='ServiceSid'),
request: Request = ...,
):
raise RuntimeError("Should be patched by MCPProxy and never executed")
@app.post(
'/v2/Services/{ServiceSid}/Verifications',
description=""" Create a new Verification using a Service """,
tags=['service_management'],
security=[
HTTPBasic(name="None"),
],
)
def create_verification(
service_sid: constr(
pattern=r'^VA[0-9a-fA-F]{32}$', min_length=34, max_length=34
) = Path(..., alias='ServiceSid'),
request: Request = ...,
):
raise RuntimeError("Should be patched by MCPProxy and never executed")
@app.get(
'/v2/Services/{ServiceSid}/Verifications/{Sid}',
description=""" Fetch a specific Verification """,
tags=['service_management'],
security=[
HTTPBasic(name="None"),
],
)
def fetch_verification(
service_sid: constr(
pattern=r'^VA[0-9a-fA-F]{32}$', min_length=34, max_length=34
) = Path(..., alias='ServiceSid'),
sid: str = Path(..., alias='Sid'),
):
raise RuntimeError("Should be patched by MCPProxy and never executed")
@app.post(
'/v2/Services/{ServiceSid}/Verifications/{Sid}',
description=""" Update a Verification status """,
tags=['service_management', 'entity_management'],
security=[
HTTPBasic(name="None"),
],
)
def update_verification(
service_sid: constr(
pattern=r'^VA[0-9a-fA-F]{32}$', min_length=34, max_length=34
) = Path(..., alias='ServiceSid'),
sid: str = Path(..., alias='Sid'),
request: Request = ...,
):
raise RuntimeError("Should be patched by MCPProxy and never executed")
@app.get(
'/v2/Services/{ServiceSid}/Webhooks',
description=""" Retrieve a list of all Webhooks for a Service. """,
tags=['verification_attempt_management', 'verification_handling'],
security=[
HTTPBasic(name="None"),
],
)
def list_webhook(
service_sid: constr(
pattern=r'^VA[0-9a-fA-F]{32}$', min_length=34, max_length=34
) = Path(..., alias='ServiceSid'),
page_size: Optional[conint(ge=1, le=1000)] = Query(None, alias='PageSize'),
page: Optional[conint(ge=0)] = Query(None, alias='Page'),
page_token: Optional[str] = Query(None, alias='PageToken'),
):
raise RuntimeError("Should be patched by MCPProxy and never executed")
@app.post(
'/v2/Services/{ServiceSid}/Webhooks',
description=""" Create a new Webhook for the Service """,
tags=['service_management', 'verification_handling'],
security=[
HTTPBasic(name="None"),
],
)
def create_webhook(
service_sid: constr(
pattern=r'^VA[0-9a-fA-F]{32}$', min_length=34, max_length=34
) = Path(..., alias='ServiceSid'),
request: Request = ...,
):
raise RuntimeError("Should be patched by MCPProxy and never executed")
@app.delete(
'/v2/Services/{ServiceSid}/Webhooks/{Sid}',
description=""" Delete a specific Webhook. """,
tags=['verification_attempt_management', 'verification_handling'],
security=[
HTTPBasic(name="None"),
],
)
def delete_webhook(
service_sid: constr(
pattern=r'^VA[0-9a-fA-F]{32}$', min_length=34, max_length=34
) = Path(..., alias='ServiceSid'),
sid: constr(pattern=r'^YW[0-9a-fA-F]{32}$', min_length=34, max_length=34) = Path(
..., alias='Sid'
),
):
raise RuntimeError("Should be patched by MCPProxy and never executed")
@app.get(
'/v2/Services/{ServiceSid}/Webhooks/{Sid}',
description=""" Fetch a specific Webhook. """,
tags=['verification_attempt_management', 'verification_handling'],
security=[
HTTPBasic(name="None"),
],
)
def fetch_webhook(
service_sid: constr(
pattern=r'^VA[0-9a-fA-F]{32}$', min_length=34, max_length=34
) = Path(..., alias='ServiceSid'),
sid: constr(pattern=r'^YW[0-9a-fA-F]{32}$', min_length=34, max_length=34) = Path(
..., alias='Sid'
),
):
raise RuntimeError("Should be patched by MCPProxy and never executed")
@app.post(
'/v2/Services/{ServiceSid}/Webhooks/{Sid}',
tags=[
'verification_attempt_management',
'verification_handling',
'entity_management',
],
security=[
HTTPBasic(name="None"),
],
)
def update_webhook(
service_sid: constr(
pattern=r'^VA[0-9a-fA-F]{32}$', min_length=34, max_length=34
) = Path(..., alias='ServiceSid'),
sid: constr(pattern=r'^YW[0-9a-fA-F]{32}$', min_length=34, max_length=34) = Path(
..., alias='Sid'
),
request: Request = ...,
):
raise RuntimeError("Should be patched by MCPProxy and never executed")
@app.delete(
'/v2/Services/{Sid}',
description=""" Delete a specific Verification Service Instance. """,
tags=['verification_handling'],
security=[
HTTPBasic(name="None"),
],
)
def delete_service(
sid: constr(pattern=r'^VA[0-9a-fA-F]{32}$', min_length=34, max_length=34) = Path(
..., alias='Sid'
)
):
raise RuntimeError("Should be patched by MCPProxy and never executed")
@app.get(
'/v2/Services/{Sid}',
description=""" Fetch specific Verification Service Instance. """,
tags=['verification_handling'],
security=[
HTTPBasic(name="None"),
],
)
def fetch_service(
sid: constr(pattern=r'^VA[0-9a-fA-F]{32}$', min_length=34, max_length=34) = Path(
..., alias='Sid'
)
):
raise RuntimeError("Should be patched by MCPProxy and never executed")
@app.post(
'/v2/Services/{Sid}',
description=""" Update a specific Verification Service. """,
tags=['verification_handling'],
security=[
HTTPBasic(name="None"),
],
)
def update_service(
sid: constr(pattern=r'^VA[0-9a-fA-F]{32}$', min_length=34, max_length=34) = Path(
..., alias='Sid'
),
request: Request = ...,
):
raise RuntimeError("Should be patched by MCPProxy and never executed")
@app.get(
'/v2/Templates',
description=""" List all the available templates for a given Account. """,
tags=['verification_attempt_management', 'verification_handling'],
security=[
HTTPBasic(name="None"),
],
)
def list_verification_template(
friendly_name: Optional[str] = Query(None, alias='FriendlyName'),
page_size: Optional[conint(ge=1, le=1000)] = Query(None, alias='PageSize'),
page: Optional[conint(ge=0)] = Query(None, alias='Page'),
page_token: Optional[str] = Query(None, alias='PageToken'),
):
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)