logflare-mcp
logflare-mcp
Logflare管理API用のMCPサーバーです。ソース、エンドポイント、およびアドホックSQLクエリツールを、stdio経由でMCPクライアント(Claude Code、Claude Desktop、Cursorなど)に公開します。
公式の @modelcontextprotocol/sdk を基盤として構築されており、サードパーティの認証プロキシを介さず、Logflareの公開REST APIと直接通信します。
ツール
ツール | 説明 |
| APIキーで利用可能なすべてのソースを一覧表示 |
| トークンで単一のソースを取得 |
| ソースの推論されたフィールド型 |
| ソースからの最新イベント |
| 保存されたクエリエンドポイント |
| UUIDまたは名前で保存されたエンドポイントをパラメータ付きで実行 |
| アドホックなBigQuery / Postgres / ClickHouse SQLを実行 |
Related MCP server: Sumo Logic MCP Server
インストール
git clone git@github.com:fasterv410/logflare-mcp.git
cd logflare-mcp
pnpm install
pnpm build設定
Logflare APIキーを https://logflare.app/access-tokens から取得してください。
cp .env.example .env
# edit .env and paste your key変数 | 必須 | デフォルト | 備考 |
| はい | — | アクセストークン |
| いいえ |
| セルフホスト版Logflare用 |
| いいえ |
| レガシーキーの場合は |
| いいえ | — | ツール引数が省略された場合のデフォルトソース |
Claude Codeへの登録
claude mcp add logflare -- node /absolute/path/to/logflare-mcp/dist/index.jsまたは ~/.claude.json に手動で追加します:
{
"mcpServers": {
"logflare": {
"command": "node",
"args": ["/absolute/path/to/logflare-mcp/dist/index.js"],
"env": {
"LOGFLARE_API_KEY": "lf-xxxxxxxx",
"LOGFLARE_DEFAULT_SOURCE_TOKEN": "optional-uuid"
}
}
}
}Claude Desktopへの登録
~/Library/Application Support/Claude/claude_desktop_config.json を編集します:
{
"mcpServers": {
"logflare": {
"command": "node",
"args": ["/absolute/path/to/logflare-mcp/dist/index.js"],
"env": { "LOGFLARE_API_KEY": "lf-xxxxxxxx" }
}
}
}開発
pnpm dev # tsx watch mode
pnpm build # emit dist/
pnpm typecheckシェルからスモークテストを実行:
LOGFLARE_API_KEY=xxx printf '%s\n' \
'{"jsonrpc":"2.0","id":1,"method":"initialize","params":{"protocolVersion":"2024-11-05","capabilities":{},"clientInfo":{"name":"t","version":"0"}}}' \
'{"jsonrpc":"2.0","method":"notifications/initialized"}' \
'{"jsonrpc":"2.0","id":2,"method":"tools/list"}' \
| node dist/index.js注意事項
認証はデフォルトで
Authorization: Bearer <key>(LogflareのOpenAPI仕様に準拠)となります。レガシーなX-API-KEYヘッダーを使用する場合はLOGFLARE_AUTH_STYLE=x-api-keyを設定してください。execute_queryはbq_sql、pg_sql、ch_sqlのいずれか1つのみを受け付けます。execute_queryよりも、保存されたエンドポイントを使用するquery_endpointを優先してください。保存されたエンドポイントは、Logflare側でのパラメータ検証とキャッシュが利用可能です。
ライセンス
MIT
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Related MCP Servers
- AlicenseNot gradedqualityDmaintenanceEnables interaction with InfluxDB v3 (Core/Enterprise/Cloud Dedicated) through MCP clients. Supports database management, data querying and writing, schema inspection, and token administration operations.1,176MIT
- AlicenseNot gradedqualityFmaintenanceEnables interaction with Sumo Logic's REST APIs through MCP, allowing log search, dashboard management, metrics querying, collector and monitor operations.5MIT
- FlicenseNot gradedqualityCmaintenanceEnables querying Humio/LogScale dashboards and executing search queries via MCP, with multi-cluster support and configurable time ranges.1
- AlicenseNot gradedqualityCmaintenanceExposes configured log files as MCP tools, enabling agents to list, query, and follow logs from local and SSH sources.MIT
Related MCP Connectors
MCP server for interacting with the Supabase platform
Query metrics, targets, entities, and team data in your Steep workspace via MCP.
MCP server for managing Prisma Postgres.
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/fasterv410/logflare-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server