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
Go to Prompt Templates and search for SQL Query Optimizer.


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


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

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





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

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



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.



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