Steampipe について
Steampipe は、LLM と Steampipe をつなぐ Python 製の MCP サーバーです。MCP クライアントから設定済みプラグインのデータをクエリしたいユーザー向けです。
主な機能
- 01Steampipe クエリの実行
- 02クエリ結果の JSON 返却
- 03設定済み Steampipe プラグインの利用
活用シーン
- 01GitHub リポジトリデータの検索
- 02設定済みプラグインデータの取得
MCP 対応
MCP クライアントに `run_steampipe_query` ツールを公開します。受け取ったクエリを Steampipe に渡し、結果を返します。
設定
ローカルサーバーの設定はどのクライアントでも共通です。コピーしてクライアントの MCP 設定ファイルに貼り付けてください。
このサーバーのパッケージやリモートエンドポイントはまだ取得できていません。プロジェクトの README の手順に従ってください。
ツール
ローカルサーバーのツールはマシン上で起動して初めて取得できます。メンテナーはまだツール一覧を提供していません。
詳細
Steampipe MCP
これはシンプルな Steampipe MCP サーバーです。AI モデルと Steampipe ツールをつなぐブリッジとして機能します。
前提条件
- Python 3.10 以降がインストールされていること。
- uv(お気に入りです)と mcp[cli] がインストールされていること
- Steampipe がインストールされ、動作していること。
- Steampipe プラグイン(例:github)が設定され、必要な認証情報(例:~/.steampipe/config/github.spc 内のトークン)が用意されていること。
- MCP をサポートする LLM。ここでは Claude を使用しています。
- MCP Inspector の利用、および一部の MCP サーバーの実行に必要となる Node.js と npx がインストールされていること。
MCP Interceptor の実行
MCP サーバーが期待どおりに動作しているかをテストするための、優れたツールです。
- Interceptor の実行
npx -y @modelcontextprotocol/inspector uv --directory . run steampipe_mcp_server.py - A browser window should open with the MCP Inspector UI (usually at http://localhost:XXXX).
- Wait for the "Connected" status on the left panel.
- Go to the Tools tab.
- You should see the run_steampipe_query tool listed with its description.
- Click on the tool name.
- In the "Arguments" JSON input field, enter a valid Steampipe query:
{
"query": "select name, fork_count from github_my_repository "
}
- execute and view the json results
Running the tool
Pretty straightforward. Just run the interceptor and make sure the tool is working from the directory. Then add the server configuration to the respective LLM and select the tool from the LLM.
TroubleShooting
- If the tool is not found in the interceptor then that means @mcp.tool() decorator has some issue.
- Execution error - Look at the "Result" in the Inspector and the server logs (stderr) in your terminal. Did Steampipe run? Was there a SQL error? A timeout? A JSON parsing error? Adjust the Python script accordingly.
tail -f ~/Library/Logs/Claude/mcp.log
tail -f ~/Library/Logs/Claude/mcp-server-steampipe.log
Security Risk Claude blindly executes your sql query in this POC so there is possibility to generate and execute arbitary SQL Queries via Steampipe using your configured credentials.
コメント
AI アプリケーションが外部のツールやデータソースに統一的な方法で接続するためのオープンなプロトコルです。クライアントはモデルとの対話を担い、MCP サーバーはツール・リソース・プロンプトテンプレートを提供します。標準メッセージでやり取りするため、1 つのサーバーを複数のクライアントで再利用できます。