Get the FREE Ultimate OpenClaw Setup Guide →

steampipe

An MCP server that allows Claude to query Steampipe PostgreSQL databases directly. Connect Claude to your Steampipe instance to easily analyze data from AWS, GCP, and other cloud providers through natural language.

Installation
Run this command in your terminal to add the MCP server to Claude Code.
Run in terminal:
Command
claude mcp add --transport stdio andrew-kurin-steampipe-mcp-server uvx steampipe-mcp-server --database-url postgresql://steampipe:password@localhost:9193/steampipe \
  --env STEAMPIPE_MCP_DATABASE_URL="postgresql://steampipe:password@localhost:9193/steampipe"

How to use

The Steampipe MCP Server provides a PostgreSQL-backed interface to Steampipe data, exposing a small set of tools that let you run read-only SQL queries, discover tables, and inspect schemas across Steampipe connections. Tools include: query for executing SQL and returning JSON results; list_all_tables for enumerating all tables across schemas in the current search path; list_tables_in_schema to focus on a single schema; and get_table_schema to fetch column names and data types for a specific table (formatted as schema.table). The server is designed to be used from Claude Desktop or other MCP clients, enabling natural-language prompts to generate SQL against Steampipe data without exposing every underlying table directly.

To use the tools, ensure your Steampipe instance is running and your MCP server is configured with the correct database URL. The steampipe namespace will expose the tools, and you can compose prompts like: "In steampipe using aws_all schema, list all EC2 instances" or "show me the schema for steampipe.aws_all.ec2_instance". The server executes read-only queries against the Steampipe database URL and returns structured JSON results suitable for downstream processing.

When you start Claude Desktop with the steampipe MCP server configured, you’ll access the steampipe namespace tools within the MCP Inspector. Use query to fetch data, or use the schema discovery tools (list_all_tables and list_tables_in_schema) to explore only the relevant tables, which helps keep responses concise and relevant to your prompt.

How to install

Prerequisites

  • Python 3.8+ and pip
  • uv (the MCP runtime) installed (via uvx)
  • A running Steampipe instance with its PostgreSQL connection string available

Step-by-step

  1. Install uv and the MCP runtime (if not already installed):

    • Install uvx globally (example using pipx if you prefer): pipx install uvx
  2. Ensure Steampipe is running and accessible:

    • Start Steampipe (as per your platform): steampipe service start
    • Retrieve the database URL from Steampipe: steampipe service status
  3. Run the MCP server using uvx with the Steampipe database URL:

    • You can run directly from the command line (example): uvx steampipe-mcp-server --database-url postgresql://steampipe:password@localhost:9193/steampipe
  4. Alternative: configure Claude Desktop with the provided mcp_config (see README example) and ensure the environment variable is set:

    • Set STEAMPIPE_MCP_DATABASE_URL to your database URL (optional if you pass --database-url above): export STEAMPIPE_MCP_DATABASE_URL=postgresql://steampipe:password@localhost:9193/steampipe
    • Then run the server as above or rely on Claude Desktop to spawn it via uvx.
  5. Verify installation:

    • Use the MCP inspector or run a simple query via the query tool to ensure the server returns JSON results.

Additional notes

Tips and common issues:

  • Make sure the database URL uses the postgresql:// scheme. The README notes that PostgreSQL URLs with this scheme are required for proper operation.
  • If you rely on Claude Desktop config, you can place the Steampipe database URL in a .env file as STEAMPIPE_MCP_DATABASE_URL so the server automatically picks it up on startup.
  • The available tools (query, list_all_tables, list_tables_in_schema, get_table_schema) are read-only and designed to help you explore Steampipe tables without dumping everything. Use list_tables_in_schema to limit results when a single schema is of interest.
  • When using list_all_tables, be mindful of large Steampipe configurations; filtering via list_tables_in_schema is recommended for performance.
  • If you encounter environment variable issues, ensure the process has access to the .env file or that you export the variable in the shell from which you launch the MCP server.

Related MCP Servers

Sponsor this space

Reach thousands of developers