# generated by fastapi-codegen:
# filename: openapi.yaml
# timestamp: 2025-06-29T04:13:12+00:00
import argparse
import json
import os
from typing import *
from typing import Optional, Union
from autogen.mcp.mcp_proxy import MCPProxy
from autogen.mcp.mcp_proxy.security import APIKeyHeader, BaseSecurity
from fastapi import Query
from pydantic import SecretStr
from models import (
AddUserResponse,
Allowance,
Chorelist,
Day,
Day2,
Field201Share,
Field403,
Field405,
Field412,
Field449,
InlineResponse201,
InlineResponse202,
InlineResponse2011,
Link,
Nodata,
Priority,
Scope,
Scope2,
Scope3,
Scope4,
Section,
Success,
Tool,
TransactionType,
Userlist,
WhereDay,
Wishlist,
)
app = MCPProxy(
contact={'email': 'helpdesk@kumpeapps.com'},
description='KKid API. Due to security concerns all calls to this API requires authentication. If you have access then you may use your KumpeApps username/password to authenticate. To gain access please use the contact developer link below.',
license={
'name': 'Apache 2.0',
'url': 'http://www.apache.org/licenses/LICENSE-2.0.html',
},
termsOfService='https://app.termly.io/document/terms-of-use-for-website/27691a60-60fc-4eff-943f-ca52df024bfe',
title='KumpeApps API',
version='5.0.0',
servers=[
{
'description': 'Production Server',
'url': 'https://restapi.kumpeapps.com/{version}',
'variables': {'version': {'default': 'v5', 'enum': ['v5']}},
},
{
'description': 'Pre-Production Server',
'url': 'https://restapi.preprod.kumpeapps.com/{version}',
'variables': {'version': {'default': 'v5', 'enum': ['v5']}},
},
],
)
@app.patch(
'/appkey',
description=""" Pass an app key to mark it as compromised. This may be submitted by the app owner or a concerned party that has optained the compromised app key. """,
tags=['api_key_management'],
)
def appkey_patch(app_key: str, comments: Optional[str] = None):
"""
Compromise app key
"""
raise RuntimeError("Should be patched by MCPProxy and never executed")
@app.post(
'/appkey',
description=""" Request a new app key by passing username and password for app account """,
tags=['api_key_management', 'user_account_management'],
)
def appkey_post(
username: str,
password: SecretStr = ...,
supports_yubikey: bool = Query(..., alias='supportsYubikey'),
):
"""
Request app key
"""
raise RuntimeError("Should be patched by MCPProxy and never executed")
@app.put(
'/appkey',
description=""" Pass your app key to deactivate the key """,
tags=['api_key_management'],
security=[
APIKeyHeader(name="X-Auth"),
],
)
def appkey_put(app_key: str):
"""
Deactivate app key
"""
raise RuntimeError("Should be patched by MCPProxy and never executed")
@app.patch(
'/authentication/appkey',
description=""" Pass an app key to mark it as compromised. This may be submitted by the app owner or a concerned party that has optained the compromised app key. """,
tags=['api_key_management'],
)
def auth_appkey_patch(app_key: str, comments: Optional[str] = None):
"""
Compromise app key
"""
raise RuntimeError("Should be patched by MCPProxy and never executed")
@app.post(
'/authentication/appkey',
description=""" Request a new app key by passing username and password for app account """,
tags=['api_key_management', 'user_account_management'],
)
def auth_appkey_post(
username: str,
password: SecretStr = ...,
supports_yubikey: bool = Query(..., alias='supportsYubikey'),
):
"""
Request app key
"""
raise RuntimeError("Should be patched by MCPProxy and never executed")
@app.put(
'/authentication/appkey',
description=""" Pass your app key to deactivate the key """,
tags=['api_key_management'],
security=[
APIKeyHeader(name="X-Auth"),
],
)
def auth_appkey_put(app_key: str):
"""
Deactivate app key
"""
raise RuntimeError("Should be patched by MCPProxy and never executed")
@app.get(
'/authentication/authkey',
description=""" Obtain auth key for user that has provided their username and password to login to your app. (or to obtain an auth key for a script like IFTTT) """,
tags=['api_key_management', 'user_account_management'],
security=[
APIKeyHeader(name="X-Auth"),
],
)
def auth_authkey_get(
username: str,
password: SecretStr = ...,
otp: Optional[SecretStr] = None,
device_name: Optional[str] = Query(None, alias='deviceName'),
identifier_for_vendor: Optional[str] = Query(None, alias='identifierForVendor'),
):
"""
Request auth key for user (login user)
"""
raise RuntimeError("Should be patched by MCPProxy and never executed")
@app.patch(
'/authentication/authkey',
description=""" Mark user auth key as compromised """,
tags=['api_key_management'],
)
def auth_authkey_patch(auth_key: SecretStr, comments: Optional[str] = None):
"""
Compromise auth key
"""
raise RuntimeError("Should be patched by MCPProxy and never executed")
@app.post(
'/authentication/authkey',
description=""" Obtain auth key for user that has provided their username and password to login to your app. (or to obtain an auth key for a script like IFTTT) """,
tags=['api_key_management', 'user_account_management'],
security=[
APIKeyHeader(name="X-Auth"),
],
)
def auth_authkey_post(
username: str, password: SecretStr = ..., otp: Optional[SecretStr] = None
):
"""
Request auth key for user (login user)
"""
raise RuntimeError("Should be patched by MCPProxy and never executed")
@app.put(
'/authentication/authkey',
description=""" Deactivate auth key for user logging them out of your application """,
tags=['api_key_management', 'user_account_management'],
security=[
APIKeyHeader(name="X-Auth"),
],
)
def auth_authkey_put(auth_key: SecretStr):
"""
Deactivate auth key (logout)
"""
raise RuntimeError("Should be patched by MCPProxy and never executed")
@app.get(
'/authentication/verifyotp',
description=""" Verifies YubiKey OTP for authenticated user """,
tags=['api_key_management', 'user_account_management'],
security=[
APIKeyHeader(name="X-Auth"),
],
)
def auth_verifyotp_get(otp: str):
"""
Verifies YubiKey OTP for authenticated user
"""
raise RuntimeError("Should be patched by MCPProxy and never executed")
@app.get(
'/authkey',
description=""" Obtain auth key for user that has provided their username and password to login to your app. (or to obtain an auth key for a script like IFTTT) """,
tags=['api_key_management', 'user_account_management'],
security=[
APIKeyHeader(name="X-Auth"),
],
)
def authkey_get(
username: str, password: SecretStr = ..., otp: Optional[SecretStr] = None
):
"""
Request auth key for user (login user)
"""
raise RuntimeError("Should be patched by MCPProxy and never executed")
@app.patch(
'/authkey',
description=""" Mark user auth key as compromised """,
tags=['api_key_management'],
)
def authkey_patch(auth_key: SecretStr, comments: Optional[str] = None):
"""
Compromise auth key
"""
raise RuntimeError("Should be patched by MCPProxy and never executed")
@app.post(
'/authkey',
description=""" Obtain auth key for user that has provided their username and password to login to your app. (or to obtain an auth key for a script like IFTTT) """,
tags=['api_key_management', 'user_account_management'],
security=[
APIKeyHeader(name="X-Auth"),
],
)
def authkey_post(
username: str, password: SecretStr = ..., otp: Optional[SecretStr] = None
):
"""
Request auth key for user (login user)
"""
raise RuntimeError("Should be patched by MCPProxy and never executed")
@app.put(
'/authkey',
description=""" Deactivate auth key for user logging them out of your application """,
tags=['api_key_management', 'user_account_management'],
security=[
APIKeyHeader(name="X-Auth"),
],
)
def authkey_put(auth_key: SecretStr):
"""
Deactivate auth key (logout)
"""
raise RuntimeError("Should be patched by MCPProxy and never executed")
@app.get(
'/kkid/allowance',
description=""" By passing in the appropriate options, you can view allowance balance and allowance transactions for a given user provided that they are within the masterID account of the authenticated user.
""",
tags=['child_allowance_handling', 'user_account_management'],
security=[
APIKeyHeader(name="X-Auth"),
],
)
def kkid_allowance_get(
kid_user_id: int = Query(..., alias='kidUserId'),
transaction_days: Optional[int] = Query(None, alias='transactionDays'),
):
"""
returns allowance balance and allowance transactions
"""
raise RuntimeError("Should be patched by MCPProxy and never executed")
@app.post(
'/kkid/allowance',
description=""" By passing in the appropriate options, you can add an allowance transaction to a given user.
""",
tags=['child_allowance_handling', 'user_account_management'],
security=[
APIKeyHeader(name="X-Auth"),
],
)
def kkid_allowance_post(
kid_user_id: int = Query(..., alias='kidUserId'),
amount: float = ...,
description: str = ...,
transaction_type: TransactionType = Query(..., alias='transactionType'),
):
"""
adds new allowance transaction to kidUserID
"""
raise RuntimeError("Should be patched by MCPProxy and never executed")
@app.post(
'/kkid/apns',
tags=['push_notification_handling', 'child_allowance_handling'],
security=[
APIKeyHeader(name="X-Auth"),
],
)
def kkid_apns_post(
kid_user_id: int = Query(..., alias='kidUserId'),
tool: Tool = ...,
token: Optional[str] = None,
devicename: Optional[str] = None,
title: Optional[str] = None,
message: Optional[str] = None,
badge: Optional[int] = None,
sound: Optional[str] = None,
section: Optional[Section] = None,
priority: Optional[Priority] = None,
):
"""
subscribes/unsubscribes/registers for apns push notifications
"""
raise RuntimeError("Should be patched by MCPProxy and never executed")
@app.delete(
'/kkid/chorelist',
description=""" By passing in the appropriate options, you can delete a chore for the given chore id under authenticated user's master account
""",
tags=['chore_assignment_management'],
security=[
APIKeyHeader(name="X-Auth"),
],
)
def kkid_chorelist_delete(id_chore_list: int = Query(..., alias='idChoreList')):
"""
deletes chore for given chore id
"""
raise RuntimeError("Should be patched by MCPProxy and never executed")
@app.get(
'/kkid/chorelist',
description=""" By passing in the appropriate options, you can search for
chores assigned to a given user within the authenticated user's master account
""",
tags=['chore_assignment_management', 'user_account_management'],
security=[
APIKeyHeader(name="X-Auth"),
],
)
def kkid_chorelist_get(
kid_username: Optional[str] = Query(None, alias='kidUsername'),
day: Optional[Day] = None,
status: Optional[str] = None,
block_dash: Optional[bool] = Query(None, alias='blockDash'),
optional: Optional[bool] = None,
can_steal: Optional[bool] = Query(None, alias='canSteal'),
include_calendar: Optional[bool] = Query(None, alias='includeCalendar'),
):
"""
returns list of chores for given user
"""
raise RuntimeError("Should be patched by MCPProxy and never executed")
@app.post(
'/kkid/chorelist',
description=""" By passing in the appropriate options, you can add a chore to given kid username under authenticated user's master account
""",
tags=['chore_assignment_management', 'child_allowance_handling'],
security=[
APIKeyHeader(name="X-Auth"),
],
)
def kkid_chorelist_post(
kid_username: str = Query(..., alias='kidUsername'),
day: Optional[Day2] = None,
nfc_tag: Optional[str] = Query(None, alias='nfcTag'),
status: Optional[str] = None,
chore_name: str = Query(..., alias='choreName'),
chore_description: Optional[str] = Query(None, alias='choreDescription'),
chore_number: Optional[int] = Query(None, alias='choreNumber'),
block_dash: Optional[bool] = Query(None, alias='blockDash'),
one_time: Optional[bool] = Query(None, alias='oneTime'),
extra_allowance: Optional[int] = Query(None, alias='extraAllowance'),
optional: Optional[bool] = None,
reassignable: Optional[bool] = None,
can_steal: Optional[bool] = Query(None, alias='canSteal'),
start_date: Optional[str] = Query(None, alias='startDate'),
notes: Optional[str] = None,
require_object_detection: Optional[bool] = Query(
None, alias='requireObjectDetection'
),
object_detection_tag: Optional[str] = Query(None, alias='objectDetectionTag'),
updated_by_automation: Optional[bool] = Query(None, alias='updatedByAutomation'),
ai_icon: Optional[str] = Query(None, alias='aiIcon'),
is_calendar: Optional[bool] = Query(None, alias='isCalendar'),
):
"""
adds chore for given user
"""
raise RuntimeError("Should be patched by MCPProxy and never executed")
@app.put(
'/kkid/chorelist',
description=""" By passing in the appropriate options, you can update the fields of a specific core within the authenticated user's master account
""",
tags=['chore_assignment_management'],
security=[
APIKeyHeader(name="X-Auth"),
],
)
def kkid_chorelist_put(
id_chore_list: int = Query(..., alias='idChoreList'),
status: Optional[str] = None,
stolen: Optional[bool] = None,
stolen_by: Optional[str] = Query(None, alias='stolenBy'),
nfc_tag: Optional[str] = Query(None, alias='nfcTag'),
notes: Optional[str] = None,
latitude: Optional[int] = None,
longitude: Optional[int] = None,
altitude: Optional[int] = None,
updated_by_automation: Optional[bool] = Query(None, alias='updatedByAutomation'),
where_day: Optional[WhereDay] = Query(None, alias='whereDay'),
where_status: Optional[str] = Query(None, alias='whereStatus'),
where_name: Optional[str] = Query(None, alias='whereName'),
):
"""
updates chore for given chore id
"""
raise RuntimeError("Should be patched by MCPProxy and never executed")
@app.post(
'/kkid/masteruser',
description=""" By passing in the appropriate variables this method creates a new user with master account access. (The use of this method is restricted to Superusers ONLY)
""",
tags=['user_account_management'],
security=[
APIKeyHeader(name="X-Auth"),
],
)
def kkid_masteruser_post(
username: str,
password: SecretStr = ...,
email: str = ...,
first_name: str = Query(..., alias='firstName'),
last_name: str = Query(..., alias='lastName'),
):
"""
adds new master user account
"""
raise RuntimeError("Should be patched by MCPProxy and never executed")
@app.get(
'/kkid/share',
description=""" Create share link """,
tags=['user_account_management'],
security=[
APIKeyHeader(name="X-Auth"),
],
)
def kkid_share_get(
link_user_id: str = Query(..., alias='linkUserId'),
link: Link = ...,
scope: Scope = ...,
scope2: Optional[Scope2] = None,
scope3: Optional[Scope3] = None,
scope4: Optional[Scope4] = None,
):
"""
Create Share Link
"""
raise RuntimeError("Should be patched by MCPProxy and never executed")
@app.get(
'/kkid/user',
description=""" Gets user info for authenticated user """,
tags=['user_account_management'],
security=[
APIKeyHeader(name="X-Auth"),
],
)
def kkid_user_get(enable_bool: Optional[bool] = Query(None, alias='enableBool')):
"""
Gets user info
"""
raise RuntimeError("Should be patched by MCPProxy and never executed")
@app.delete(
'/kkid/userlist',
description=""" By passing in the appropriate variables this method deletes the specified user. (This function is restricted to Superusers ONLY)
""",
tags=['user_account_management'],
security=[
APIKeyHeader(name="X-Auth"),
],
)
def kkid_userlist_delete(user_i_d: int = Query(..., alias='userID')):
"""
deletes user
"""
raise RuntimeError("Should be patched by MCPProxy and never executed")
@app.get(
'/kkid/userlist',
description=""" By passing in the appropriate options, you can search for
users within the authenticated user's master account
""",
tags=[
'user_account_management',
'child_allowance_handling',
'chore_assignment_management',
],
security=[
APIKeyHeader(name="X-Auth"),
],
)
def kkid_userlist_get(
is_child: Optional[bool] = Query(None, alias='isChild'),
is_active: Optional[bool] = Query(None, alias='isActive'),
is_admin: Optional[bool] = Query(None, alias='isAdmin'),
enable_allowance: Optional[bool] = Query(None, alias='enableAllowance'),
enable_chores: Optional[bool] = Query(None, alias='enableChores'),
user_i_d: Optional[int] = Query(None, alias='userID'),
username: Optional[str] = None,
email: Optional[str] = None,
):
"""
returns list of users
"""
raise RuntimeError("Should be patched by MCPProxy and never executed")
@app.post(
'/kkid/userlist',
description=""" By passing in the appropriate variables this method creates a new user and assigns it to the master account of the authenticated user. By default this user will have chores and allowance access.
""",
tags=['user_account_management'],
security=[
APIKeyHeader(name="X-Auth"),
],
)
def kkid_userlist_post(
username: str,
password: SecretStr = ...,
email: str = ...,
first_name: str = Query(..., alias='firstName'),
last_name: str = Query(..., alias='lastName'),
):
"""
adds new child user
"""
raise RuntimeError("Should be patched by MCPProxy and never executed")
@app.put(
'/kkid/userlist',
description=""" By passing in the appropriate variables this method updates the user's profile
""",
tags=['user_account_management'],
security=[
APIKeyHeader(name="X-Auth"),
],
)
def kkid_userlist_put(
user_i_d: int = Query(..., alias='userID'),
username: str = ...,
email: str = ...,
first_name: str = Query(..., alias='firstName'),
last_name: str = Query(..., alias='lastName'),
emoji: Optional[str] = None,
tmdb_key: Optional[str] = Query(None, alias='tmdbKey'),
enable_wish_list: Optional[bool] = Query(None, alias='enableWishList'),
enable_chores: Optional[bool] = Query(None, alias='enableChores'),
enable_allowance: Optional[bool] = Query(None, alias='enableAllowance'),
enable_admin: Optional[bool] = Query(None, alias='enableAdmin'),
enable_tmdb: Optional[bool] = Query(None, alias='enableTmdb'),
enable_object_detection: Optional[bool] = Query(
None, alias='enableObjectDetection'
),
):
"""
updates user
"""
raise RuntimeError("Should be patched by MCPProxy and never executed")
@app.delete(
'/kkid/wishlist',
tags=['wishlist_item_management'],
security=[
APIKeyHeader(name="X-Auth"),
],
)
def kkid_wishlist_delete(wish_id: int = Query(..., alias='wishId')):
"""
Delete item from wishlist
"""
raise RuntimeError("Should be patched by MCPProxy and never executed")
@app.get(
'/kkid/wishlist',
tags=['wishlist_item_management'],
security=[
APIKeyHeader(name="X-Auth"),
],
)
def kkid_wishlist_get(kid_user_id: Optional[int] = Query(None, alias='kidUserId')):
"""
Get list of wishlist items
"""
raise RuntimeError("Should be patched by MCPProxy and never executed")
@app.post(
'/kkid/wishlist',
tags=['wishlist_item_management'],
security=[
APIKeyHeader(name="X-Auth"),
],
)
def kkid_wishlist_post(
kid_user_id: int = Query(..., alias='kidUserId'),
title: str = ...,
description: Optional[str] = None,
priority: Optional[int] = None,
link: Optional[str] = None,
):
"""
Add item to kid's wishlist
"""
raise RuntimeError("Should be patched by MCPProxy and never executed")
@app.put(
'/kkid/wishlist',
tags=['wishlist_item_management'],
security=[
APIKeyHeader(name="X-Auth"),
],
)
def kkid_wishlist_put(
wish_id: int = Query(..., alias='wishId'),
title: Optional[str] = None,
description: Optional[str] = None,
priority: Optional[int] = None,
link: Optional[str] = None,
):
"""
Update item on kid's wishlist
"""
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)