Get the FREE Ultimate OpenClaw Setup Guide →

mcp -bluesky-py

专为 AI Agent 设计的轻量级社交接口 (Lightweight Bluesky MCP Server for AI Agents)

Installation
Run this command in your terminal to add the MCP server to Claude Code.
Run in terminal:
Command
claude mcp add --transport stdio dataojitori-mcp-server-bluesky-py python path/to/mcp-server-bluesky-py/bluesky_mcp.py \
  --env BLUESKY_HANDLE="your_handle.bsky.social" \
  --env BLUESKY_PASSWORD="your_app_password"

How to use

This MCP server implements Bluesky as a Python-based MCP service. It acts as a lightweight, AI-first gateway to Bluesky, exposing 15 tools (for posting, replying, following, searching, and more) plus two resources (get_current_profile_resource and get_unread_count_resource) to an agent. The design focuses on context cleaning to reduce token load, Windows-friendly stdin/stdout handling, and robust integration with MCP clients. To use it, configure your MCP client to launch the Bluesky MCP using the python command and point it at the bluesky_mcp.py script, providing Bluesky credentials via environment variables. Once running, your agent can call tools like send_post, reply_to_post, follow_user, and search to interact with Bluesky through the MCP service.

Operationally, the server exposes a set of tools mapped to Bluesky capabilities: posting and replying to conversations, managing follows, searching for posts or users, and retrieving current profile state or unread message counts. The system is optimized to present only essential fields (Text, Author, Reply Context, Embeds) to the agent, trimming away extraneous data from Bluesky responses to save tokens and improve decision making. For Windows users, the server includes handling that mitigates common stdin/stdout binary flow issues and helps avoid invalid trailing data problems that can occur with MCP connections.

How to install

Prerequisites:

  • Python 3.8+ installed on the host machine
  • Access to Bluesky credentials (handle and app password)
  • Internet access to install dependencies
  1. Clone the repository (or download the Bluesky MCP server code): git clone https://github.com/your-username/mcp-server-bluesky-py.git cd mcp-server-bluesky-py

  2. Create a virtual environment (optional but recommended): python -m venv venv source venv/bin/activate # Unix/macOS venv\Scripts\activate # Windows

  3. Install dependencies: pip install -r requirements.txt

  4. Prepare local testing config (optional): Create a .env file in the project root with Bluesky credentials:

    BLUESKY_HANDLE=your_handle.bsky.social BLUESKY_PASSWORD=your_app_password

    Note: If you run via an MCP client (e.g., Claude Desktop), you can supply these via env vars in the client config instead of a local .env file.

Additional notes

Tips and notes:

  • Use the Bluesky MCP script bluesky_mcp.py as the entry point. If you are in an Antigravity Windows environment or need to enforce binary stdio, you can switch to mcp_wrapper.py as the entry point (adjust the args accordingly in your MCP client).
  • Ensure your Bluesky App Password is used instead of your main Bluesky password for security.
  • In your MCP client configuration, ensure you provide the absolute path to bluesky_mcp.py and, if needed, set the environment variables LBLUESKY_HANDLE and BLUESKY_PASSWORD there as well.
  • The server trims Bluesky responses to core fields (Text, Author, Reply Context, Embeds). If you need more data for debugging, you can temporarily adjust the data handling in bluesky_mcp.py, but be mindful of token costs for large responses.
  • To avoid Windows CRLF issues, consider enabling the mcp_wrapper.py entry point which forces binary stdio for stable communication.
  • This MCP server exposes 15 tools and 2 resources; consult the code or docs for exact tool names like send_post, reply_to_post, follow_user, search, get_current_profile_resource, and get_unread_count_resource.

Related MCP Servers

Sponsor this space

Reach thousands of developers