Performance Studio CLI

A SQL Server execution plan analyzer with 30 rules, missing index detection and an MCP server so an agent can review plans

  • 250 ★ on the repository
  • Last commit
  • MIT
CLI

Broad access

Why this level

  • Runs your query on the SQL Server to capture an actual plan, and a call with --query can run any query text
  • Takes the server login and password through flags, a .env file or the OS store and hands them to the connection driver
  • The built-in MCP server exposes plans and Query Store data to the agent while it is enabled in settings
All reasons and checks

erikdarlingdata/performancestudio

Install

Manual install

dotnet tool install -g PerformanceStudio.Cli

Requires the .NET 10 runtime. Check the install with planview analyze --help.

Access and checks

How we review

Broad accessThe tool can change data, run commands or handle secrets.

  • Runs your query on the SQL Server to capture an actual plan, and a call with --query can run any query text
  • Takes the server login and password through flags, a .env file or the OS store and hands them to the connection driver
  • The built-in MCP server exposes plans and Query Store data to the agent while it is enabled in settings

This is third-party code. Review the repository files before installing.

What it does

Performance Studio parses SQL Server execution plans and finds the causes of slow queries. The planview command reads a `.sqlplan` file from SSMS or Azure Data Studio, or connects to a server, captures the plan itself and analyzes it. The result comes as JSON with the operator tree or as a text report with Info, Warning and Critical findings and ready CREATE INDEX statements for missing indexes. Thirty rules catch hash and sort spills to tempdb, parallel skew, key and RID lookups, late filters, parameter sniffing, scalar functions and implicit conversions. Batch mode takes a folder of `.sql` files and saves a plan, a JSON file and a text report for each query. The planview query-store command picks the heaviest queries by CPU, duration or reads from Query Store. The bundle also includes an Avalonia desktop app for Windows, macOS and Linux and an extension for SSMS 21 and 22. The app draws the plan graphically, compares two plans and can build a repro script for the query. The built-in MCP server gives Claude Code or Cursor 13 tools to analyze loaded plans.

Who it is for. For database administrators and SQL Server developers who want plan analysis from a terminal, CI or an agent without clicking through SSMS.

Good fit when

  • A query got slow and you need to see from a saved `.sqlplan` where it spills to tempdb or reads extra rows
  • A CI pipeline should run a folder of queries through planview and keep the JSON findings to compare between builds
  • You ask Claude Code to analyze the plans open in the app and suggest indexes through the built-in MCP server
  • You need to compare two plans of one query before and after a fix and see which metrics got worse
  • You want the heaviest queries in Query Store by CPU, duration or reads without writing DMV queries

Not a fit when

  • You work with PostgreSQL, MySQL or another database: the tool reads SQL Server plans only
  • You need general agent access to data and arbitrary SQL: a database MCP server fits that, while here Query Store is read through a built-in query with no arbitrary SQL
  • The query must not run on a production server but you want an actual plan: capturing it really executes the query, so the --estimated mode is safer
  • You are on Linux and want passwords in the system store: planview credential exits with an error there

Example request

Analyze slow-query.sqlplan: show the critical warnings, the most expensive operators and which indexes are worth creating

Limitations

The CLI needs the .NET 10 runtime; building sources requires the .NET 10 SDK. Packaged desktop builds are self-contained. Start with a .sqlplan file without database access. Live actual-plan capture executes the query with the SQL Server account’s privileges, so use a test environment or restricted account first.

Plans may contain SQL text, parameter values and object names. MCP passes this information to the agent’s model. The desktop HTTP server is disabled by default and listens on localhost; the separate CLI mode uses stdio. Linux has no supported OS credential store, so choose another secret-input method.

How to disable. dotnet tool uninstall -g PerformanceStudio.Cli removes the console tool. Set mcp_enabled to false in ~/.planview/settings.json to switch off the app's MCP server, and claude mcp remove performance-studio drops the Claude Code connection.

FAQ

How do I install planview to analyze SQL Server plans?

Run dotnet tool install -g PerformanceStudio.Cli, which needs the .NET 10 runtime. For CI, install into a folder with --tool-path and pin the version with --version. dotnet tool update -g PerformanceStudio.Cli updates it.

How do I connect the Performance Studio MCP server to Claude Code?

Enable the server in ~/.planview/settings.json with mcp_enabled: true and mcp_port: 5152, then run claude mcp add --transport http --scope user performance-studio http://localhost:5152/. The server listens on localhost only and is off by default.

Will planview run my query on the server?

Actual-plan capture executes the query. The `--estimated` flag obtains an estimated plan without execution. Both modes still require considering server access and disclosure of SQL text.

Which warnings does the plan analysis report?

Thirty rules cover hash, sort and exchange spills to tempdb, parallel skew, key and RID lookups, late filters, nested loop concerns, parameter sniffing, scalar functions, implicit conversions and anti-patterns such as OPTIMIZE FOR UNKNOWN. A warning includes severity and context; an operator node ID is included when the finding refers to a specific operator.

Where does planview keep SQL Server passwords?

planview credential add stores the password in Windows Credential Manager or the macOS Keychain, and nothing is written to disk in plaintext. Linux has no store, so pass the login and password through --password-stdin or a `.env` file.

Discussion

No questions or reviews yet.

CLI tools

MySQL MCP Server Pro

mysql_mcp_server_pro

A MySQL MCP server that runs SQL under access roles, finds tables by comments and analyzes locks, indexes and query plans

MCP serverBroad access249Repository stars

A monitoring platform for SQL Server, MySQL and PostgreSQL with an 11-tool MCP: the agent reads metrics, not the databases.

MCP serverExtended access99Repository stars
Official

A desktop SQL workspace with a built-in MCP server: the agent reads the schema and runs queries in the same client you already use

MCP serverBroad access5.5KRepository stars
Official

An agent queries GreptimeDB metrics, logs and traces with SQL, TQL and RANGE, with write protection and data masking

MCP serverExtended access29Repository stars
Official

MCP server and Claude Code plugin for SQL: validation, formatting, linting and injection scanning across eight dialects.

MCP serverExtended access124Repository stars

sqlsure checks SQL against declared schema facts and catches join fan-out double-counting before the query runs.

SkillMinimal access99Repository stars

Comparison with similar tools

Cards that share the main search query, and how they differ.

ToolOfficialAuthenticationRepository starsMain difference
Performance Studio (this card)no250
Microsoft SQL Server MCP Servernokey is optional404an MCP server for queries and schema, with no execution plan analysis
DBHubnonot required3,839a general MCP server for several databases that does not analyze plans or Query Store

README in short

Alongside analysis, the desktop application compares plans and prepares query reproduction material. The project uses MIT and provides archives for Windows, macOS and Linux.

README badge

Report a problem