Skip to main content
Glama
meilisearch

Meilisearch MCP Server

Official
by meilisearch

get-keys

Retrieve a list of API keys for the Meilisearch MCP Server to manage access and permissions efficiently using customizable offset and limit parameters.

Instructions

Get list of API keys

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
limitNo
offsetNo

Implementation Reference

  • Executes the 'get-keys' tool by calling the MeilisearchClient's keys.get_keys method and returning the formatted result as text content.
    elif name == "get-keys": keys = self.meili_client.keys.get_keys(arguments) return [types.TextContent(type="text", text=f"API keys: {keys}")]
  • Registers the 'get-keys' tool in the MCP server's list_tools handler, defining its name, description, and input schema.
    types.Tool( name="get-keys", description="Get list of API keys", inputSchema={ "type": "object", "properties": { "offset": {"type": "integer"}, "limit": {"type": "integer"}, }, "additionalProperties": False, }, ),
  • Defines the input schema for the 'get-keys' tool, allowing optional offset and limit parameters.
    inputSchema={ "type": "object", "properties": { "offset": {"type": "integer"}, "limit": {"type": "integer"}, }, "additionalProperties": False, },
  • KeyManager helper method that wraps the Meilisearch SDK's get_keys call with error handling.
    def get_keys(self, parameters: Optional[Dict[str, Any]] = None) -> Dict[str, Any]: """Get list of API keys""" try: return self.client.get_keys(parameters) except Exception as e: raise Exception(f"Failed to get keys: {str(e)}")
  • Initializes the KeyManager instance on the MeilisearchClient.
    self.keys = KeyManager(self.client)

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/meilisearch/meilisearch-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server