Expand description
X (Twitter) MCP Server
A Model Context Protocol (MCP) server that provides access to X (Twitter) API for basic utilities like posting tweets, getting user information, and more.
§Features
- User Information: Get user profiles by username or ID
- Tweet Operations: Post tweets, reply to tweets, get specific tweets
- Search: Search for tweets with various filters
- User Timeline: Get a user’s recent tweets
- OAuth 1.0a: Secure authentication with X API
§Usage
use x_mcp_server::XMcpServer;
#[tokio::main]
async fn main() -> Result<(), Box<dyn std::error::Error>> {
// Create and run server (requires X_BEARER_TOKEN env var)
let server = XMcpServer::from_env()?;
server.run_stdio().await?;
Ok(())
}
Re-exports§
pub use client::XClient;
pub use error::XError;
pub use error::XResult;
pub use server::XMcpServer;
Modules§
- client
- X API client implementation using Bearer Token
- error
- Error types for X MCP Server
- server
- MCP Server implementation for X API using RMCP SDK
- types
- Type definitions for X API responses
Constants§
- VERSION
- Version of the X MCP Server