stdout-mcp-server

Integrations

  • Provides support for capturing stdout logs from applications running on Unix/Linux systems through a named pipe at /tmp/stdout_pipe.

  • Enables monitoring of application output on macOS systems through a named pipe at /tmp/stdout_pipe, allowing real-time log capture and analysis.

  • Serves as a runtime requirement for the server with Node.js v18 or newer needed to run the MCP server.

stdout-mcp-server

名前付きパイプシステムを介して標準出力ログをキャプチャおよび管理するモデルコンテキストプロトコル(MCP)サーバー。このサーバーは特に以下の用途に役立ちます。

  • 複数のプロセスまたはアプリケーションからログをキャプチャし、Cursor IDE でデバッグできるようにします。
  • アプリケーションの出力をリアルタイムで監視し、ログを照会、フィルタリング、分析するための MCP インターフェースを提供します。

仕組み

  1. サーバーは特定の場所に名前付きパイプを作成します (Unix/MacOS の場合は/tmp/stdout_pipe 、Windows の場合は\\.\pipe\stdout_pipe )
  2. どのアプリケーションも、標準出力リダイレクトを使用してこのパイプにログを書き込むことができます。例:
your_application | tee /tmp/stdout_pipe # or your_application > /tmp/stdout_pipe
  1. サーバーはパイプを監視し、すべての受信ログをキャプチャし、最後の100エントリの履歴を維持します。
  2. MCPツールを使用すると、これらのログを照会、フィルタリング、分析できます。

システム要件

インストールする前に、次のものを用意してください。

  • Node.js v18以降

インストールオプション

オプション1: カーソルへのインストール

  1. カーソルを開き、 Cursor > Settings > MCP Serversに移動します。
  2. 「新しいMCPサーバーを追加」をクリックします
  3. 次の構成で MCP 設定ファイルを更新します。
name: stdout-mcp-server type: command command: npx stdout-mcp-server

オプション2: 他のMCPクライアントへのインストール

他のMCPクライアントへのインストール

macOS/Linuxの場合:

{ "mcpServers": { "stdio-mcp-server": { "command": "npx", "args": [ "stdio-mcp-server" ] } } }

Windowsの場合:

{ "mcpServers": { "mcp-installer": { "command": "cmd.exe", "args": ["/c", "npx", "stdio-mcp-server"] } } }

使用例

アプリケーションログのリダイレクト

アプリケーションの出力をパイプに送信するには:

# Unix/MacOS your_application > /tmp/stdout_pipe # Windows (PowerShell) your_application > \\.\pipe\stdout_pipe

複数のアプリケーションの監視

複数のソースからログをリダイレクトできます。

# Application 1 app1 > /tmp/stdout_pipe & # Application 2 app2 > /tmp/stdout_pipe &

ログのクエリ

AI は MCP クライアントのget-logsツールを使用してログを取得およびフィルタリングします。

// Get last 50 logs get-logs() // Get last 100 logs containing "error" get-logs({ lines: 100, filter: "error" }) // Get logs since a specific timestamp get-logs({ since: 1648675200000 }) // Unix timestamp in milliseconds

特徴

  • 名前付きパイプの作成と監視
  • リアルタイムのログキャプチャと保存
  • MCPツールによるログのフィルタリングと取得
  • 設定可能なログ履歴(デフォルト: 100 エントリ)
  • クロスプラットフォーム サポート (Windows および Unix ベースのシステム)

名前付きパイプの場所

  • Windows: \\.\pipe\stdout_pipe
  • Unix/MacOS: /tmp/stdout_pipe

利用可能なツール

ログを取得する

オプションのフィルタリングを使用して名前付きパイプからログを取得します。

パラメータ:

  • lines (オプション、デフォルト:50):返されるログ行数
  • filter (オプション):ログをフィルタリングするテキスト
  • since (オプション): ログを取得するタイムスタンプ

応答例:

// Response format { content: [{ type: "text", text: "[2024-03-20T10:15:30.123Z] Application started\n[2024-03-20T10:15:31.456Z] Connected to database" }] }

ライセンス

MITライセンス

-
security - not tested
F
license - not found
-
quality - not tested

名前付きパイプを介して stdout ログをキャプチャおよび管理し、アプリケーション出力を Cursor IDE などの AI ツールでクエリおよびデバッグに使用できるようにするモデル コンテキスト プロトコル サーバー。

  1. How It Works
    1. System Requirements
      1. Installation Options
        1. Option 1: Installation in Cursor
        2. Option 2: Installation in other MCP clients
      2. Installation in other MCP clients
        1. Usage Examples
          1. Redirecting Application Logs
          2. Monitoring Multiple Applications
          3. Querying Logs
        2. Features
          1. Named Pipe Locations
            1. Available Tools
              1. get-logs
            2. License
              ID: evmwj4zgd3