How it worksFeaturesDocsEarly accessGitHubDashboard

How to create SQL Query Optimizer using MCP

Optimize slow SQL queries for performance. This guide creates the SQL Query Optimizer prompt from Arthur's template catalog, sets up a blank MCP server, and links the prompt so any connected AI client can use it.

Steps

  1. Go to Prompt Templates and search for SQL Query Optimizer.

    Open the Prompt Templates catalog

    Search the catalog for the SQL Query Optimizer template

  2. Click Use template on the SQL Query Optimizer card and review the prefilled name, description, and content preview.

    Open the SQL Query Optimizer template with its prefilled name and content preview

    Create the SQL Query Optimizer prompt in the shared library

  3. Click Create prompt — the prompt is added to your shared library.

    Start creating the MCP server that will expose the prompt

  4. Go to New server, choose Blank / Static as the source, and click Next.

    Choose the Blank / Static source — no external connection is needed for a prompt-only server

    Advance to the server details step

    Name the server after the prompt it will expose

    Create the blank MCP server

    Open the server's Prompts tab

  5. Name the server (for example, SQL Query Optimizer Server) and click Create server.

    Open the prompt-library picker

  6. On the server's Prompts tab, click Add prompt, search for SQL Query Optimizer, and click Add.

    Search the library for the SQL Query Optimizer prompt

    Link the SQL Query Optimizer prompt to the server

    Close the picker and show the linked prompt on the Prompts tab

  7. Open the server's Connect section and click Share the MCP swagger documentation — Arthur generates the public documentation link and QR code for this server.

    Open the server's Connect section, where the MCP endpoint and its documentation live

    Open the MCP swagger documentation share panel

    Show the generated swagger documentation link and QR code for this server

Confirm it worked

The SQL Query Optimizer prompt appears on the server's Prompts tab, and the Connect section offers the server's MCP swagger documentation — a shareable page with setup instructions for any AI client. A connected client can now fetch the prompt through this server.

Good to know

  • Analyzes SQL queries for performance issues and rewrites them with indexing and optimization suggestions.
  • Arguments detected from the template: {{database}}, {{schema}}, {{query}} — callers fill these in when invoking the prompt.
  • Editing the prompt in the shared library updates it on every server where it's linked.

Related

Tutorial video