Skip to main content
OpenSRE connects to X’s official Model Context Protocol (MCP) server, exposing X’s API — tweet search, timelines, user profiles, likes, retweets, bookmarks, and posting — as tools the agent can call while investigating an incident. Unlike PostHog or Sentry’s always-on hosted MCP servers, XMCP is designed to run locally: you clone the xmcp repo, supply your own X API credentials, and run the server yourself. OpenSRE connects to that local endpoint (or a tunneled URL if you need remote access, e.g. via ngrok).

Tools

The agent typically calls list_x_tools first to discover what is available, then call_x_tool with the chosen tool name and arguments. Pass name_filter (space- or comma-separated terms, e.g. "search tweet") to narrow a large tool list, and include_schema=true on a narrowed list to fetch the full input schema for the tool you intend to call.

Prerequisites

  • A running instance of xmcp with your own X API credentials configured (X_BEARER_TOKEN, and OAuth1/OAuth2 credentials if you need write access such as posting)
  • Network access from OpenSRE to the xmcp server’s URL (local by default; tunnel it if OpenSRE runs elsewhere)
XMCP authenticates to the X API using its own environment (X_BEARER_TOKEN, OAuth credentials) at startup. OpenSRE does not need to know your X API credentials for streamable-http/sse connections to an already-running server — it only needs the server’s URL. An optional auth token can be set if your endpoint sits behind an authenticating tunnel or proxy.

Setup

Option 1: Interactive CLI

You’ll be prompted for the xmcp server URL (defaults to http://127.0.0.1:8000/mcp) and, optionally, an auth token if the endpoint is tunneled behind an authenticating proxy.

Option 2: Environment variables

Add to your .env:
To have OpenSRE launch the local xmcp server itself instead of connecting to one you already started, use stdio mode:

Option 3: Persistent store

Verify

A successful check connects to the MCP server and reports how many tools it discovered. If it fails, confirm the xmcp server is running and reachable at the configured URL, and that its own X API credentials (X_BEARER_TOKEN) are valid.