tailpipe-mcp
Connects AI assistants to cloud and SaaS logs via Tailpipe, enabling natural language querying and analysis of log data.
README
Tailpipe Model Context Protocol (MCP) Server
Unlock the power of AI-driven log analysis with Tailpipe! This Model Context Protocol server seamlessly connects AI assistants like Claude to your cloud and SaaS logs, enabling natural language exploration and analysis of your entire data estate.
Tailpipe MCP bridges AI assistants and your log data, allowing natural language:
- Queries across CloudTrail, Kubernetes, and other cloud service logs
- Security incident investigation and analysis
- Cost and performance insights
- Query development assistance
Works with your local Tailpipe init SQL scripts, providing safe, read-only access to all your cloud and SaaS log data.
Installation
Prerequisites
Configuration
Add Tailpipe MCP to your AI assistant's configuration file:
{
"mcpServers": {
"tailpipe": {
"command": "npx",
"args": [
"-y",
"@turbot/tailpipe-mcp"
]
}
}
}
By default, this will use the Tailpipe CLI to discover your init SQL script. Make sure Tailpipe is installed and configured first.
To connect to a specific init SQL script instead, add the path to the args:
{
"mcpServers": {
"tailpipe": {
"command": "npx",
"args": [
"-y",
"@turbot/tailpipe-mcp",
"/path/to/your/tailpipe_init_YYYYMMDDHHMMSS.sql"
]
}
}
}
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
Ask anything about your log data!
Explore your log data:
What tables do we have available in Tailpipe?
Simple, specific questions work well:
Show me all S3 bucket creation events from CloudTrail in the last 24 hours
Generate security reports:
What were my top 10 AWS services by cost last month?
Dive into incident analysis:
Find any IAM users created outside working hours (9am-5pm) in the last week
Get timeline insights:
Give me a timeline of the session where Venu created the IAM access key
Explore potential risks:
Analyze our cloudtrail errors for any specific security risks
Remember to:
- Be specific about the time period you're interested in
- Mention the type of data you want to analyze (CloudTrail events, cost data, etc.)
- Start with simple queries before adding complex conditions
- Use natural language - the LLM will handle the SQL translation
- Be bold and exploratory, it's amazing what the LLM will discover and achieve!
Capabilities
Tools
Database Operations:
-
tailpipe_query
- Run a read-only Tailpipe SQL query using DuckDB syntax
- Input:
sql(string): The SQL query to execute
-
tailpipe_connect
- Initialize or refresh the DuckDB session from a Tailpipe init SQL script
- Optional input:
init_script_path(string): Path to the init SQL script to use. If not provided, refreshes the current connection.
Data Structure Operations:
-
tailpipe_partition_list
- List all available Tailpipe partitions with simple statistics
- No input parameters required
-
tailpipe_partition_show
- Show details of a specific Tailpipe partition
- Input:
name(string): Name of the partition to show details for
-
tailpipe_table_list
- List all available Tailpipe tables
- No input parameters required
-
tailpipe_table_show
- Show details of a specific Tailpipe table and its columns
- Input:
name(string): Name of the table to show details for
Plugin Operations:
-
tailpipe_plugin_list
- List all Tailpipe plugins installed on the system
- No input parameters required
-
tailpipe_plugin_show
- Get details for a specific Tailpipe plugin installation
- Input:
name(string): Name of the plugin to show details for
Source Operations:
-
tailpipe_source_list
- List all Tailpipe sources available on the system
- No input parameters required
-
tailpipe_source_show
- Get details for a specific Tailpipe source
- Input:
name(string): Name of the source to show details for
Resources
- status
- Represents the current state of the Tailpipe connection
- Properties include:
- Init script path in use
- Server configuration
- Runtime environment
This resource enables AI tools to check and verify the connection status to your Tailpipe session.
Development
Clone and Setup
- Clone the repository and navigate to the directory:
git clone https://github.com/turbot/tailpipe-mcp.git
cd tailpipe-mcp
- Install dependencies:
npm install
- 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": {
"tailpipe": {
"command": "node",
"args": [
"/absolute/path/to/tailpipe-mcp/dist/index.js",
"/path/to/your/tailpipe_init_YYYYMMDDHHMMSS.sql"
]
}
}
}
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:
TAILPIPE_MCP_INIT_SCRIPT_PATH: Specify the Tailpipe init SQL script path (alternative to command line argument)TAILPIPE_MCP_LOG_LEVEL: Control logging verbosity (default:info)debug: Show all messages (most verbose)info: Show informational, warning, and error messageswarn: Show only warning and error messageserror: Show only error messages
TAILPIPE_MCP_MEMORY_MAX_MB: Maximum memory buffer size in megabytes for command execution
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!
Tailpipe 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
Want to help but don't know where to start? Pick up one of the help wanted issues:
推荐服务器
Baidu Map
百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。
Playwright MCP Server
一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。
Magic Component Platform (MCP)
一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。
Audiense Insights MCP Server
通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。
VeyraX
一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。
graphlit-mcp-server
模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。
Kagi MCP Server
一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。
e2b-mcp-server
使用 MCP 通过 e2b 运行代码。
Neon MCP Server
用于与 Neon 管理 API 和数据库交互的 MCP 服务器
Exa MCP Server
模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。