# generated by fastapi-codegen:
# filename: openapi.yaml
# timestamp: 2025-06-29T04:59:29+00:00
import argparse
import json
import os
from typing import *
from typing import Optional
from autogen.mcp.mcp_proxy import MCPProxy
from autogen.mcp.mcp_proxy.security import BaseSecurity
from fastapi import Query
from models import (
IndexesBooksDocumentsDeleteBatchPostRequest,
IndexesBooksDocumentsPostRequest,
IndexesBooksDocumentsPutRequest,
IndexesBooksPatchRequest,
IndexesBooksSearchPostRequest,
IndexesBooksSettingsDisplayedAttributesPutRequest,
IndexesBooksSettingsFacetingPatchRequest,
IndexesBooksSettingsFilterableAttributesPutRequest,
IndexesBooksSettingsPaginationPatchRequest,
IndexesBooksSettingsPatchRequest,
IndexesBooksSettingsRankingRulesPutRequest,
IndexesBooksSettingsSearchableAttributesPutRequest,
IndexesBooksSettingsSortableAttributesPutRequest,
IndexesBooksSettingsStopWordsGetRequest,
IndexesBooksSettingsStopWordsPutRequest,
IndexesBooksSettingsSynonymsPutRequest,
IndexesBooksSettingsTypoTolerancePatchRequest,
IndexesPostRequest,
IndexesSwapIndexesPostRequest,
KeysPostRequest,
KeysWYZjGJyBcdb0621b97999c233246a8ec0a35d0fcd9a6417ef8ccee0c8978b64b123af2ddPatchRequest,
)
app = MCPProxy(
contact={},
title='Meilisearch v1.0',
version='1.0.0',
servers=[{'url': 'http://localhost:7700/'}],
)
@app.post(
'/dumps', description=""" Create a dump """, tags=['index_operations_overview']
)
def create_a_dump():
"""
Create a dump
"""
raise RuntimeError("Should be patched by MCPProxy and never executed")
@app.get('/health', description=""" Health """, tags=['system_health_checks'])
def health():
"""
Health
"""
raise RuntimeError("Should be patched by MCPProxy and never executed")
@app.get(
'/indexes',
description=""" Get indexes """,
tags=[
'index_management',
'document_management',
'search_query_operations',
'pagination_settings_management',
],
)
def get_indexes(offset: Optional[str] = None, limit: Optional[str] = None):
"""
Get indexes
"""
raise RuntimeError("Should be patched by MCPProxy and never executed")
@app.post(
'/indexes',
description=""" Create index with primary key """,
tags=['index_management', 'index_operations_overview'],
)
def create_index_with_primary_key(body: IndexesPostRequest = None):
"""
Create index with primary key
"""
raise RuntimeError("Should be patched by MCPProxy and never executed")
@app.delete(
'/indexes/books',
description=""" Delete an index """,
tags=['index_management', 'index_operations_overview'],
)
def delete_an_index():
"""
Delete an index
"""
raise RuntimeError("Should be patched by MCPProxy and never executed")
@app.get(
'/indexes/books',
description=""" Show index """,
tags=['index_management', 'index_operations_overview'],
)
def show_index():
"""
Show index
"""
raise RuntimeError("Should be patched by MCPProxy and never executed")
@app.patch(
'/indexes/books',
description=""" Can only change the document identifier if it has not already been added before. """,
tags=['index_management', 'document_management', 'index_operations_overview'],
)
def udpate_index(body: IndexesBooksPatchRequest = None):
"""
Udpate index
"""
raise RuntimeError("Should be patched by MCPProxy and never executed")
@app.delete(
'/indexes/books/documents',
description=""" Delete all documents """,
tags=['document_management', 'task_operations'],
)
def delete_all_documents():
"""
Delete all documents
"""
raise RuntimeError("Should be patched by MCPProxy and never executed")
@app.get(
'/indexes/books/documents',
description=""" Get documents """,
tags=[
'document_management',
'search_query_operations',
'pagination_settings_management',
],
)
def get_documents(
limit: Optional[str] = None,
offset: Optional[str] = None,
fields: Optional[str] = None,
):
"""
Get documents
"""
raise RuntimeError("Should be patched by MCPProxy and never executed")
@app.post(
'/indexes/books/documents',
description=""" Add or replace documents """,
tags=['document_management'],
)
def add_or_replace_documents(
primary_key: Optional[str] = Query(None, alias='primaryKey'),
body: IndexesBooksDocumentsPostRequest = None,
):
"""
Add or replace documents
"""
raise RuntimeError("Should be patched by MCPProxy and never executed")
@app.put(
'/indexes/books/documents',
description=""" Add or update documents """,
tags=['document_management', 'index_management'],
)
def add_or_update_documents(
primary_key: Optional[str] = Query(None, alias='primaryKey'),
body: IndexesBooksDocumentsPutRequest = None,
):
"""
Add or update documents
"""
raise RuntimeError("Should be patched by MCPProxy and never executed")
@app.delete(
'/indexes/books/documents/1',
description=""" Delete one document """,
tags=['document_management', 'task_operations'],
)
def delete_one_document():
"""
Delete one document
"""
raise RuntimeError("Should be patched by MCPProxy and never executed")
@app.get(
'/indexes/books/documents/2',
description=""" Get one document """,
tags=['document_management'],
)
def get_one_document(fields: Optional[str] = None):
"""
Get one document
"""
raise RuntimeError("Should be patched by MCPProxy and never executed")
@app.post(
'/indexes/books/documents/delete-batch',
description=""" Delete documents """,
tags=['document_management', 'index_operations_overview'],
)
def delete_documents(body: IndexesBooksDocumentsDeleteBatchPostRequest = None):
"""
Delete documents
"""
raise RuntimeError("Should be patched by MCPProxy and never executed")
@app.get(
'/indexes/books/search',
description=""" Search in index """,
tags=[
'search_query_operations',
'advanced_index_settings',
'pagination_settings_management',
],
)
def search_in_index(
q: Optional[str] = None,
offset: Optional[str] = None,
limit: Optional[str] = None,
attributes_to_retrieve: Optional[str] = Query(None, alias='attributesToRetrieve'),
attributes_to_crop: Optional[str] = Query(None, alias='attributesToCrop'),
attributes_to_highlight: Optional[str] = Query(None, alias='attributesToHighlight'),
crop_length: Optional[str] = Query(None, alias='cropLength'),
crop_marker: Optional[str] = Query(None, alias='cropMarker'),
filter: Optional[str] = None,
show_matches_position: Optional[str] = Query(None, alias='showMatchesPosition'),
facets: Optional[str] = None,
sort: Optional[str] = None,
highlight_pre_tag: Optional[str] = Query(None, alias='highlightPreTag'),
highlight_post_tag: Optional[str] = Query(None, alias='highlightPostTag'),
matching_strategy: Optional[str] = Query(None, alias='matchingStrategy'),
page: Optional[str] = None,
hits_per_page: Optional[str] = Query(None, alias='hitsPerPage'),
):
"""
Search in index
"""
raise RuntimeError("Should be patched by MCPProxy and never executed")
@app.post(
'/indexes/books/search',
description=""" Search in index """,
tags=['search_query_operations', 'document_management'],
)
def search_in_index1(body: IndexesBooksSearchPostRequest = None):
"""
Search in index
"""
raise RuntimeError("Should be patched by MCPProxy and never executed")
@app.delete(
'/indexes/books/settings',
description=""" Reset all settings """,
tags=['index_settings_handling', 'pagination_settings_management'],
)
def reset_all_settings():
"""
Reset all settings
"""
raise RuntimeError("Should be patched by MCPProxy and never executed")
@app.get(
'/indexes/books/settings',
description=""" Get all settings """,
tags=['index_settings_handling', 'advanced_index_settings'],
)
def get_all_settings():
"""
Get all settings
"""
raise RuntimeError("Should be patched by MCPProxy and never executed")
@app.patch(
'/indexes/books/settings',
description=""" Update settings """,
tags=['index_settings_handling', 'advanced_index_settings'],
)
def update_settings(body: IndexesBooksSettingsPatchRequest = None):
"""
Update settings
"""
raise RuntimeError("Should be patched by MCPProxy and never executed")
@app.delete(
'/indexes/books/settings/displayed-attributes',
description=""" Reset displayed attributes """,
tags=['index_settings_handling'],
)
def reset_displayed_attributes():
"""
Reset displayed attributes
"""
raise RuntimeError("Should be patched by MCPProxy and never executed")
@app.get(
'/indexes/books/settings/displayed-attributes',
description=""" Get displayed attributes """,
tags=['index_settings_handling', 'document_management'],
)
def get_displayed_attributes():
"""
Get displayed attributes
"""
raise RuntimeError("Should be patched by MCPProxy and never executed")
@app.put(
'/indexes/books/settings/displayed-attributes',
description=""" Update displayed attributes """,
tags=['index_settings_handling', 'advanced_index_settings'],
)
def update_displayed_attributes(
body: IndexesBooksSettingsDisplayedAttributesPutRequest = None,
):
"""
Update displayed attributes
"""
raise RuntimeError("Should be patched by MCPProxy and never executed")
@app.delete(
'/indexes/books/settings/distinct-attribute',
description=""" Reset distinct attribute """,
tags=['index_settings_handling', 'document_management'],
)
def reset_distinct_attribute():
"""
Reset distinct attribute
"""
raise RuntimeError("Should be patched by MCPProxy and never executed")
@app.get(
'/indexes/books/settings/distinct-attribute',
description=""" Get distinct attribute """,
tags=['index_settings_handling', 'advanced_index_settings'],
)
def get_distinct_attribute():
"""
Get distinct attribute
"""
raise RuntimeError("Should be patched by MCPProxy and never executed")
@app.put(
'/indexes/books/settings/distinct-attribute',
description=""" Update distinct attribute """,
tags=['index_settings_handling', 'document_management'],
)
def update_distinct_attribute():
"""
Update distinct attribute
"""
raise RuntimeError("Should be patched by MCPProxy and never executed")
@app.delete(
'/indexes/books/settings/faceting',
description=""" Reset faceting """,
tags=['index_settings_handling'],
)
def reset_faceting():
"""
Reset faceting
"""
raise RuntimeError("Should be patched by MCPProxy and never executed")
@app.get(
'/indexes/books/settings/faceting',
description=""" Get faceting """,
tags=['index_settings_handling', 'search_query_operations'],
)
def get_faceting():
"""
Get faceting
"""
raise RuntimeError("Should be patched by MCPProxy and never executed")
@app.patch(
'/indexes/books/settings/faceting',
description=""" Update faceting """,
tags=['index_settings_handling', 'advanced_index_settings'],
)
def update_faceting(body: IndexesBooksSettingsFacetingPatchRequest = None):
"""
Update faceting
"""
raise RuntimeError("Should be patched by MCPProxy and never executed")
@app.delete(
'/indexes/books/settings/filterable-attributes',
description=""" Reset filterable attributes """,
tags=['index_settings_handling', 'advanced_index_settings'],
)
def reset_filterable_attributes():
"""
Reset filterable attributes
"""
raise RuntimeError("Should be patched by MCPProxy and never executed")
@app.get(
'/indexes/books/settings/filterable-attributes',
description=""" Get filterable attributes """,
tags=['index_settings_handling', 'advanced_index_settings'],
)
def get_filterable_attributes():
"""
Get filterable attributes
"""
raise RuntimeError("Should be patched by MCPProxy and never executed")
@app.put(
'/indexes/books/settings/filterable-attributes',
description=""" Update filterable attributes """,
tags=['index_settings_handling', 'advanced_index_settings'],
)
def update_filterable_attributes(
body: IndexesBooksSettingsFilterableAttributesPutRequest = None,
):
"""
Update filterable attributes
"""
raise RuntimeError("Should be patched by MCPProxy and never executed")
@app.delete(
'/indexes/books/settings/pagination',
description=""" Reset pagination """,
tags=['pagination_settings_management'],
)
def reset_pagination():
"""
Reset pagination
"""
raise RuntimeError("Should be patched by MCPProxy and never executed")
@app.get(
'/indexes/books/settings/pagination',
description=""" Get pagination """,
tags=['pagination_settings_management'],
)
def get_pagination():
"""
Get pagination
"""
raise RuntimeError("Should be patched by MCPProxy and never executed")
@app.patch(
'/indexes/books/settings/pagination',
description=""" Update pagination """,
tags=['pagination_settings_management', 'index_settings_handling'],
)
def update_pagination(body: IndexesBooksSettingsPaginationPatchRequest = None):
"""
Update pagination
"""
raise RuntimeError("Should be patched by MCPProxy and never executed")
@app.delete(
'/indexes/books/settings/ranking-rules',
description=""" Reset ranking rules """,
tags=['index_settings_handling', 'advanced_index_settings'],
)
def reset_ranking_rules():
"""
Reset ranking rules
"""
raise RuntimeError("Should be patched by MCPProxy and never executed")
@app.get(
'/indexes/books/settings/ranking-rules',
description=""" Get ranking rules """,
tags=['advanced_index_settings'],
)
def get_ranking_rules():
"""
Get ranking rules
"""
raise RuntimeError("Should be patched by MCPProxy and never executed")
@app.put(
'/indexes/books/settings/ranking-rules',
description=""" Update ranking rules """,
tags=['index_settings_handling', 'advanced_index_settings'],
)
def update_ranking_rules(body: IndexesBooksSettingsRankingRulesPutRequest = None):
"""
Update ranking rules
"""
raise RuntimeError("Should be patched by MCPProxy and never executed")
@app.delete(
'/indexes/books/settings/searchable-attributes',
description=""" Reset searchable attributes """,
tags=['index_settings_handling', 'advanced_index_settings'],
)
def reset_searchable_attributes():
"""
Reset searchable attributes
"""
raise RuntimeError("Should be patched by MCPProxy and never executed")
@app.get(
'/indexes/books/settings/searchable-attributes',
description=""" Get searchable attributes """,
tags=['index_settings_handling', 'advanced_index_settings'],
)
def get_searchable_attributes():
"""
Get searchable attributes
"""
raise RuntimeError("Should be patched by MCPProxy and never executed")
@app.put(
'/indexes/books/settings/searchable-attributes',
description=""" Update searchable attributes """,
tags=['index_settings_handling'],
)
def update_searchable_attributes(
body: IndexesBooksSettingsSearchableAttributesPutRequest = None,
):
"""
Update searchable attributes
"""
raise RuntimeError("Should be patched by MCPProxy and never executed")
@app.delete(
'/indexes/books/settings/sortable-attributes',
description=""" Reset sortable attributes """,
tags=['index_settings_handling', 'advanced_index_settings'],
)
def reset_sortable_attributes():
"""
Reset sortable attributes
"""
raise RuntimeError("Should be patched by MCPProxy and never executed")
@app.get(
'/indexes/books/settings/sortable-attributes',
description=""" Get sortable attributes """,
tags=['index_settings_handling', 'advanced_index_settings'],
)
def get_sortable_attributes():
"""
Get sortable attributes
"""
raise RuntimeError("Should be patched by MCPProxy and never executed")
@app.put(
'/indexes/books/settings/sortable-attributes',
description=""" Update sortable attributes """,
tags=['index_settings_handling', 'advanced_index_settings'],
)
def update_sortable_attributes(
body: IndexesBooksSettingsSortableAttributesPutRequest = None,
):
"""
Update sortable attributes
"""
raise RuntimeError("Should be patched by MCPProxy and never executed")
@app.delete(
'/indexes/books/settings/stop-words',
description=""" Reset stop-words """,
tags=['index_settings_handling', 'advanced_index_settings'],
)
def reset_stop_words():
"""
Reset stop-words
"""
raise RuntimeError("Should be patched by MCPProxy and never executed")
@app.get(
'/indexes/books/settings/stop-words',
description=""" Get stop-words """,
tags=['index_settings_handling', 'advanced_index_settings'],
)
def get_stop_words(body: IndexesBooksSettingsStopWordsGetRequest = None):
"""
Get stop-words
"""
raise RuntimeError("Should be patched by MCPProxy and never executed")
@app.put(
'/indexes/books/settings/stop-words',
description=""" Update stop-words """,
tags=['index_settings_handling', 'advanced_index_settings'],
)
def update_stop_words(body: IndexesBooksSettingsStopWordsPutRequest = None):
"""
Update stop-words
"""
raise RuntimeError("Should be patched by MCPProxy and never executed")
@app.delete(
'/indexes/books/settings/synonyms',
description=""" Reset synonyms """,
tags=['advanced_index_settings', 'index_settings_handling'],
)
def reset_synonyms():
"""
Reset synonyms
"""
raise RuntimeError("Should be patched by MCPProxy and never executed")
@app.get(
'/indexes/books/settings/synonyms',
description=""" Get synonyms """,
tags=['advanced_index_settings'],
)
def get_synonyms():
"""
Get synonyms
"""
raise RuntimeError("Should be patched by MCPProxy and never executed")
@app.put(
'/indexes/books/settings/synonyms',
description=""" Update synonyms """,
tags=['index_settings_handling', 'advanced_index_settings'],
)
def update_synonyms(body: IndexesBooksSettingsSynonymsPutRequest = None):
"""
Update synonyms
"""
raise RuntimeError("Should be patched by MCPProxy and never executed")
@app.delete(
'/indexes/books/settings/typo-tolerance',
description=""" Reset typo-tolerance """,
tags=['index_settings_handling', 'advanced_index_settings'],
)
def reset_typo_tolerance():
"""
Reset typo-tolerance
"""
raise RuntimeError("Should be patched by MCPProxy and never executed")
@app.get(
'/indexes/books/settings/typo-tolerance',
description=""" Get typo-tolerance """,
tags=['advanced_index_settings', 'search_query_operations'],
)
def get_typo_tolerance():
"""
Get typo-tolerance
"""
raise RuntimeError("Should be patched by MCPProxy and never executed")
@app.patch(
'/indexes/books/settings/typo-tolerance',
description=""" Update typo-tolerance """,
tags=['index_settings_handling', 'advanced_index_settings'],
)
def update_typo_tolerance(body: IndexesBooksSettingsTypoTolerancePatchRequest = None):
"""
Update typo-tolerance
"""
raise RuntimeError("Should be patched by MCPProxy and never executed")
@app.get(
'/indexes/books/stats',
description=""" Stats of an index """,
tags=['index_operations_overview', 'system_health_checks'],
)
def stats_of_an_index():
"""
Stats of an index
"""
raise RuntimeError("Should be patched by MCPProxy and never executed")
@app.post(
'/indexes/swap-indexes',
description=""" Swap indexes """,
tags=['index_management', 'index_operations_overview'],
)
def swap_indexes(body: IndexesSwapIndexesPostRequest = None):
"""
Swap indexes
"""
raise RuntimeError("Should be patched by MCPProxy and never executed")
@app.get('/keys', description=""" Get keys """, tags=['api_key_operations'])
def get_keys(offset: Optional[str] = None, limit: Optional[str] = None):
"""
Get keys
"""
raise RuntimeError("Should be patched by MCPProxy and never executed")
@app.post('/keys', description=""" Create a key """, tags=['api_key_operations'])
def create_a_key(body: KeysPostRequest = None):
"""
Create a key
"""
raise RuntimeError("Should be patched by MCPProxy and never executed")
@app.get(
'/keys/L8l05tFb188aab693735bbaf1f898b9902fb39f865160d39dddba2b47b940115a0430705',
description=""" Get one key """,
tags=['api_key_operations'],
)
def get_one_key():
"""
Get one key
"""
raise RuntimeError("Should be patched by MCPProxy and never executed")
@app.delete(
'/keys/kN2aK9EO8a7b627e425717d9196c8081552ca004e513545ed178f8a56981dbd3080d4a5b',
description=""" Delete a key """,
tags=['api_key_operations', 'document_management'],
)
def delete_a_key():
"""
Delete a key
"""
raise RuntimeError("Should be patched by MCPProxy and never executed")
@app.patch(
'/keys/wYZjGJyBcdb0621b97999c233246a8ec0a35d0fcd9a6417ef8ccee0c8978b64b123af2dd',
description=""" Update a key """,
tags=['api_key_operations'],
)
def update_a_key(
body: KeysWYZjGJyBcdb0621b97999c233246a8ec0a35d0fcd9a6417ef8ccee0c8978b64b123af2ddPatchRequest = None,
):
"""
Update a key
"""
raise RuntimeError("Should be patched by MCPProxy and never executed")
@app.get(
'/stats',
description=""" Global stats """,
tags=['index_operations_overview', 'system_health_checks'],
)
def global_stats():
"""
Global stats
"""
raise RuntimeError("Should be patched by MCPProxy and never executed")
@app.delete(
'/tasks',
description=""" Delete tasks """,
tags=['task_operations', 'document_management'],
)
def delete_tasks(
uids: Optional[str] = None,
index_uids: Optional[str] = Query(None, alias='indexUids'),
types: Optional[str] = None,
statuses: Optional[str] = None,
before_enqueued_at: Optional[str] = Query(None, alias='beforeEnqueuedAt'),
after_enqueued_at: Optional[str] = Query(None, alias='afterEnqueuedAt'),
before_started_at: Optional[str] = Query(None, alias='beforeStartedAt'),
after_started_at: Optional[str] = Query(None, alias='afterStartedAt'),
before_finished_at: Optional[str] = Query(None, alias='beforeFinishedAt'),
after_finished_at: Optional[str] = Query(None, alias='afterFinishedAt'),
canceled_by: Optional[str] = Query(None, alias='canceledBy'),
limit: Optional[str] = None,
from_: Optional[str] = Query(None, alias='from'),
):
"""
Delete tasks
"""
raise RuntimeError("Should be patched by MCPProxy and never executed")
@app.get('/tasks', description=""" Get all tasks """, tags=['task_operations'])
def get_all_tasks(
uids: Optional[str] = None,
index_uids: Optional[str] = Query(None, alias='indexUids'),
types: Optional[str] = None,
statuses: Optional[str] = None,
before_enqueued_at: Optional[str] = Query(None, alias='beforeEnqueuedAt'),
after_enqueued_at: Optional[str] = Query(None, alias='afterEnqueuedAt'),
before_started_at: Optional[str] = Query(None, alias='beforeStartedAt'),
after_started_at: Optional[str] = Query(None, alias='afterStartedAt'),
before_finished_at: Optional[str] = Query(None, alias='beforeFinishedAt'),
after_finished_at: Optional[str] = Query(None, alias='afterFinishedAt'),
canceled_by: Optional[str] = Query(None, alias='canceledBy'),
limit: Optional[str] = None,
from_: Optional[str] = Query(None, alias='from'),
):
"""
Get all tasks
"""
raise RuntimeError("Should be patched by MCPProxy and never executed")
@app.get('/tasks/0', description=""" Get one task """, tags=['task_operations'])
def get_one_task():
"""
Get one task
"""
raise RuntimeError("Should be patched by MCPProxy and never executed")
@app.post('/tasks/cancel', description=""" Cancel tasks """, tags=['task_operations'])
def cancel_tasks(
uids: Optional[str] = None,
index_uids: Optional[str] = Query(None, alias='indexUids'),
types: Optional[str] = None,
statuses: Optional[str] = None,
before_enqueued_at: Optional[str] = Query(None, alias='beforeEnqueuedAt'),
after_enqueued_at: Optional[str] = Query(None, alias='afterEnqueuedAt'),
before_started_at: Optional[str] = Query(None, alias='beforeStartedAt'),
after_started_at: Optional[str] = Query(None, alias='afterStartedAt'),
before_finished_at: Optional[str] = Query(None, alias='beforeFinishedAt'),
after_finished_at: Optional[str] = Query(None, alias='afterFinishedAt'),
canceled_by: Optional[str] = Query(None, alias='canceledBy'),
limit: Optional[str] = None,
from_: Optional[str] = Query(None, alias='from'),
):
"""
Cancel tasks
"""
raise RuntimeError("Should be patched by MCPProxy and never executed")
@app.get('/version', description=""" Version """, tags=['api_system_version'])
def version():
"""
Version
"""
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)