MCP GlitchTip

MCP GlitchTip

Integrates GlitchTip error monitoring with AI assistants, enabling them to fetch, analyze, and debug issues from your GlitchTip instance.

Category
访问服务器

README

MCP GlitchTip

An MCP (Model Context Protocol) server that integrates GlitchTip error monitoring with AI assistants like Claude. This allows AI to analyze and help resolve errors from your GlitchTip instance.

What it does

This MCP server enables AI assistants to:

  • Fetch and analyze current issues from your GlitchTip instance
  • Get detailed error context including stack traces, user data, and breadcrumbs
  • Help debug and suggest solutions based on error patterns

Example Use Case

User: "Check GlitchTip for any payment-related errors"

AI Assistant:
- Fetches all unresolved issues from GlitchTip
- Identifies payment component errors
- Analyzes stack traces and error patterns
- Suggests specific fixes based on the error context

Quick Start

1. Get Your GlitchTip Credentials

You'll need:

  • Authentication: Either an API token (recommended) or Session ID Cookie
  • Organization Slug: Your organization identifier in GlitchTip
  • Base URL (optional): Your GlitchTip instance URL if self-hosted

Authentication Options

Option 1: API Token (Recommended)

  1. Log in to your GlitchTip instance
  2. Go to /profile/auth-tokens
  3. Create a new API token with appropriate permissions
  4. Copy the token for use as GLITCHTIP_TOKEN

Option 2: Session ID

  1. Log in to your GlitchTip instance
  2. Open browser developer tools (F12)
  3. Go to Application/Storage > Cookies
  4. Find the sessionid cookie value
  5. Copy this value for use as GLITCHTIP_SESSION_ID

2. Configure Your Project

Create a .mcp.json file in your project root:

{
  "mcpServers": {
    "glitchtip": {
      "command": "npx",
      "args": ["-y", "mcp-glitchtip"],
      "env": {
        "GLITCHTIP_TOKEN": "your-api-token-here",
        "GLITCHTIP_ORGANIZATION": "your-org-slug",
        "GLITCHTIP_BASE_URL": "https://app.glitchtip.com"
      }
    }
  }
}

Note: Add .mcp.json to your .gitignore to keep credentials secure:

echo ".mcp.json" >> .gitignore

3. Open Your Project in Claude Desktop

When you open your project folder in Claude Desktop, it will automatically detect the .mcp.json configuration and connect to your GlitchTip instance.

Configuration Options

Environment Variable Required Description Default
GLITCHTIP_TOKEN Yes* Your GlitchTip API token (recommended) -
GLITCHTIP_SESSION_ID Yes* Your GlitchTip session cookie -
GLITCHTIP_ORGANIZATION Yes Organization slug from GlitchTip URL -
GLITCHTIP_BASE_URL No GlitchTip instance URL https://app.glitchtip.com

*Either GLITCHTIP_TOKEN or GLITCHTIP_SESSION_ID is required. If both are provided, GLITCHTIP_TOKEN takes priority.

Self-Hosted GlitchTip

If you're using a self-hosted GlitchTip instance, update the GLITCHTIP_BASE_URL:

"GLITCHTIP_BASE_URL": "https://glitchtip.your-domain.com"

Available Tools

glitchtip_issues

Fetches all issues from GlitchTip (unresolved by default).

Usage: "Show me all GlitchTip errors"

glitchtip_latest_event

Gets the most recent event for a specific issue with full error context.

Parameters:

  • issueId: The issue ID to get details for

Usage: "Get details for GlitchTip issue #123"

Available Resources

glitchtip://issues

A resource endpoint that provides all current issues in JSON format.

Example Workflows

Debugging a Production Error

User: "Check GlitchTip for recent 500 errors"

AI: [Fetches issues] I found 3 recent 500 errors:
1. DatabaseConnectionError in /api/users
2. TimeoutError in payment processing
3. ValidationError in checkout flow

User: "Show me details about the payment timeout"

AI: [Gets latest event] The TimeoutError occurs when...
[Provides stack trace analysis and suggested fixes]

Monitoring Error Trends

User: "What are the most frequent errors in GlitchTip?"

AI: [Analyzes issue counts] The top errors by frequency are:
1. CORS policy errors (145 occurrences)
2. Missing authentication token (89 occurrences)
3. Rate limit exceeded (67 occurrences)

Development

Building from Source

git clone https://github.com/coffebar/mcp-glitchtip.git
cd mcp-glitchtip
npm install
npm run build

Development Mode

npm run watch  # Auto-rebuild on changes

Testing with MCP Inspector

npm run inspector

Set the required environment variables before running the inspector:

export GLITCHTIP_TOKEN="your-api-token"
# OR export GLITCHTIP_SESSION_ID="your-session-id"
export GLITCHTIP_ORGANIZATION="your-org"
npm run inspector

Troubleshooting

Authentication Errors

If you see "Authentication failed. Check your token or session ID":

  1. If using a token: Verify it's valid and has appropriate permissions
  2. If using a session ID: Your session may have expired - get a new session ID from GlitchTip
  3. Verify you're using the correct organization slug
  4. Check if your GlitchTip instance requires additional authentication headers

Connection Errors

If you see "Failed to connect to GlitchTip":

  1. Verify your GLITCHTIP_BASE_URL is correct
  2. Check if you're behind a proxy or firewall
  3. Ensure your GlitchTip instance is accessible from your network

No Issues Found

If the tool returns empty results:

  1. Verify there are actually issues in your GlitchTip project
  2. Check if your organization slug is correct
  3. Ensure your session has permission to view the issues

Security Notes

  • Never commit .mcp.json to version control - it contains sensitive credentials
  • For team usage, each developer should use their own API token or session ID

Contributing

Contributions are welcome! Please:

  1. Fork the repository
  2. Create a feature branch
  3. Make your changes
  4. Add tests if applicable
  5. Submit a pull request

License

MIT License - see LICENSE file for details.

Support

推荐服务器

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 模型以安全和受控的方式获取实时的网络信息。

官方
精选