steampipe-mcp

steampipe-mcp

steampipe-mcp

Category
访问服务器

README

Steampipe Model Context Protocol (MCP) Server

Unlock the power of AI-driven infrastructure analysis with Steampipe! This Model Context Protocol server seamlessly connects AI assistants like Claude to your cloud infrastructure data, enabling natural language exploration and analysis of your entire cloud estate.

Steampipe MCP bridges AI assistants and your infrastructure data, allowing natural language:

  • Queries across AWS, Azure, GCP and 100+ cloud services
  • Security and compliance analysis
  • Cost and resource optimization
  • Query development assistance

Works with both local Steampipe installations and Turbot Pipes workspaces, providing safe, read-only access to all your cloud and SaaS data.

Installation

Prerequisites

  • Node.js v16 or higher (includes npx)
  • For local use: Steampipe installed and running (steampipe service start)
  • For Turbot Pipes: A Turbot Pipes workspace and connection string

Configuration

Add Steampipe MCP to your AI assistant's configuration file:

{
  "mcpServers": {
    "steampipe": {
      "command": "npx",
      "args": [
        "-y",
        "@turbot/steampipe-mcp"
      ]
    }
  }
}

By default, this connects to your local Steampipe installation at postgresql://steampipe@localhost:9193/steampipe. Make sure to run steampipe service start first.

To connect to a Turbot Pipes workspace instead, add your connection string to the args:

{
  "mcpServers": {
    "steampipe": {
      "command": "npx",
      "args": [
        "-y",
        "@turbot/steampipe-mcp",
        "postgresql://my_name:my_pw@workspace-name.usea1.db.pipes.turbot.com:9193/abc123"
      ]
    }
  }
}

AI Assistant Setup

Assistant Config File Location Setup Guide
Claude Desktop claude_desktop_config.json Claude Desktop MCP Guide →
Cursor ~/.cursor/mcp.json Cursor MCP Guide →

Save the configuration file and restart your AI assistant for the changes to take effect.

Prompting Guide

First, run the best_practices prompt included in the MCP server to teach your LLM how best to work with Steampipe. Then, ask anything!

Explore your cloud infrastructure:

What AWS accounts can you see?

Simple, specific questions work well:

Show me all S3 buckets that were created in the last week

Generate infrastructure reports:

List my EC2 instances with their attached EBS volumes

Dive into security analysis:

Find any IAM users with access keys that haven't been rotated in the last 90 days

Get compliance insights:

Show me all EC2 instances that don't comply with our tagging standards

Explore potential risks:

Analyze my S3 buckets for security risks including public access, logging, and encryption

Remember to:

  • Be specific about which cloud resources you want to analyze (EC2, S3, IAM, etc.)
  • Mention regions or accounts if you're interested in specific ones
  • Start with simple queries before adding complex conditions
  • Use natural language - the LLM will handle the SQL translation
  • Be bold and exploratory - the LLM can help you discover insights across your entire infrastructure!

Capabilities

Tools

  • steampipe_query

    • Query cloud and security logs with SQL.
    • For best performance: use CTEs instead of joins, limit columns requested.
    • All queries are read-only and use PostgreSQL syntax.
    • Input: sql (string): The SQL query to execute using PostgreSQL syntax
  • steampipe_table_list

    • List all available Steampipe tables.
    • Optional input: schema (string): Filter tables by specific schema
    • Optional input: filter (string): Filter tables by ILIKE pattern (e.g. '%ec2%')
  • steampipe_table_show

    • Get detailed information about a specific table, including column definitions, data types, and descriptions.
    • Input: name (string): The name of the table to show details for (can be schema qualified e.g. 'aws_account' or 'aws.aws_account')
    • Optional input: schema (string): The schema containing the table
  • steampipe_plugin_list

    • List all Steampipe plugins installed on the system. Plugins provide access to different data sources like AWS, GCP, or Azure.
    • No input parameters required
  • steampipe_plugin_show

    • Get details for a specific Steampipe plugin installation, including version, memory limits, and configuration.
    • Input: name (string): Name of the plugin to show details for

Prompts

  • best_practices
    • Best practices for working with Steampipe data
    • Provides detailed guidance on:
      • Response style and formatting conventions
      • Using CTEs (WITH clauses) vs joins
      • SQL syntax and style conventions
      • Column selection and optimization
      • Schema exploration and understanding
      • Query structure and organization
      • Performance considerations and caching
      • Error handling and troubleshooting

Resources

  • status
    • Represents the current state of the Steampipe connection
    • Properties include:
      • connection_string: The current database connection string
      • status: The connection state (connected/disconnected)

This resource enables AI tools to check and verify the connection status to your Steampipe instance.

Development

Clone and Setup

  1. Clone the repository and navigate to the directory:
git clone https://github.com/turbot/steampipe-mcp.git
cd steampipe-mcp
  1. Install dependencies:
npm install
  1. Build the project:
npm run build

Testing

To test your local development build with AI tools that support MCP, update your MCP configuration to use the local dist/index.js instead of the npm package. For example:

{
  "mcpServers": {
    "steampipe": {
      "command": "node",
      "args": [
        "/absolute/path/to/steampipe-mcp/dist/index.js",
        "postgresql://steampipe@localhost:9193/steampipe"
      ]
    }
  }
}

Or, use the MCP Inspector to validate the server implementation:

npx @modelcontextprotocol/inspector dist/index.js

Environment Variables

The following environment variables can be used to configure the MCP server:

  • STEAMPIPE_MCP_LOG_LEVEL: Control server logging verbosity (default: info)
  • STEAMPIPE_MCP_WORKSPACE_DATABASE: Override the default Steampipe connection string (default: postgresql://steampipe@localhost:9193/steampipe)

Open Source & Contributing

This repository is published under the Apache 2.0 license. Please see our code of conduct. We look forward to collaborating with you!

Steampipe is a product produced from this open source software, exclusively by Turbot HQ, Inc. It is distributed under our commercial terms. Others are allowed to make their own distribution of the software, but they cannot use any of the Turbot trademarks, cloud services, etc. You can learn more in our Open Source FAQ.

Get Involved

Join #steampipe on Slack →

Want to help but don't know where to start? Pick up one of the help wanted issues:

推荐服务器

Baidu Map

Baidu Map

百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。

官方
精选
JavaScript
Playwright MCP Server

Playwright MCP Server

一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。

官方
精选
TypeScript
Magic Component Platform (MCP)

Magic Component Platform (MCP)

一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。

官方
精选
本地
TypeScript
Audiense Insights MCP Server

Audiense Insights MCP Server

通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。

官方
精选
本地
TypeScript
VeyraX

VeyraX

一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。

官方
精选
本地
graphlit-mcp-server

graphlit-mcp-server

模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。

官方
精选
TypeScript
Kagi MCP Server

Kagi MCP Server

一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。

官方
精选
Python
e2b-mcp-server

e2b-mcp-server

使用 MCP 通过 e2b 运行代码。

官方
精选
Neon MCP Server

Neon MCP Server

用于与 Neon 管理 API 和数据库交互的 MCP 服务器

官方
精选
Exa MCP Server

Exa MCP Server

模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。

官方
精选