Skip to main content
Glama
elgentos

Magento 2 Development MCP Server

by elgentos

sys-store-config-base-url-list

Retrieve and display all base URL configurations for Magento 2 stores to manage site access points and verify correct storefront URLs across development environments.

Instructions

List all base URLs for Magento 2 stores

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
formatNoOutput formattable

Implementation Reference

  • Handler function that executes the `magerun2 sys:store:config:base-url:list` command based on the provided format (table, json, csv), processes the result using executeMagerun2Command, and returns formatted content or an error response.
    async ({ format = "table" }) => { const command = `magerun2 sys:store:config:base-url:list --format=${format}`; const result = await executeMagerun2Command(command, format === "json"); if (!result.success) { return { content: [{ type: "text", text: result.error }], isError: true }; } const responseText = format === "json" ? `Base URL list (${format} format):\n\n${JSON.stringify(result.data, null, 2)}` : `Base URL list (${format} format):\n\n${result.data}`; return { content: [{ type: "text", text: responseText }] }; }
  • Tool metadata including title, description, and inputSchema defining the optional 'format' parameter with enum values table/json/csv defaulting to table.
    { title: "Store Config Base URL List", description: "List all base URLs for Magento 2 stores", inputSchema: { format: z.enum(["table", "json", "csv"]) .default("table") .describe("Output format") } },
  • src/index.ts:1247-1283 (registration)
    Registration of the tool using server.registerTool, including the tool name, schema/metadata, and inline handler function.
    server.registerTool( "sys-store-config-base-url-list", { title: "Store Config Base URL List", description: "List all base URLs for Magento 2 stores", inputSchema: { format: z.enum(["table", "json", "csv"]) .default("table") .describe("Output format") } }, async ({ format = "table" }) => { const command = `magerun2 sys:store:config:base-url:list --format=${format}`; const result = await executeMagerun2Command(command, format === "json"); if (!result.success) { return { content: [{ type: "text", text: result.error }], isError: true }; } const responseText = format === "json" ? `Base URL list (${format} format):\n\n${JSON.stringify(result.data, null, 2)}` : `Base URL list (${format} format):\n\n${result.data}`; return { content: [{ type: "text", text: responseText }] }; } );

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/elgentos/magento2-dev-mcp'

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