Labsco
Ravishka17 logo

Bluesky MCP

from Ravishka17

A remote MCP server for Bluesky social media platform.

๐Ÿ”ฅ๐Ÿ”ฅ๐Ÿ”ฅโœ“ VerifiedFreeAdvanced setup

Bluesky MCP Server

A Model Context Protocol (MCP) server that provides comprehensive Bluesky/AT Protocol access for AI assistants. Built in TypeScript, deployed on Vercel, and fully compatible with the MCP Streamable HTTP transport (protocol version 2025-03-26).

Deploy with Vercel

Features

  • Post Operations โ€” Create posts, get posts, view likes and reposts
  • Feed Management โ€” Timeline, custom feeds, author feeds
  • Search Engine โ€” Search posts and users/actors
  • Profile Access โ€” View profiles, follower counts, bios (single and batch)
  • Thread Viewing โ€” Explore post threads and conversations
  • Bookmarks โ€” Create, delete, and list private bookmarks
  • Age Assurance โ€” Begin flow, get config and state
  • Secure Credential Management โ€” Credentials injected per-request via headers, never stored
  • Streamable HTTP โ€” Full MCP transport support (POST + GET + OPTIONS)
  • Multi-client Auth โ€” Three credential methods for different MCP clients
  • Vercel Ready โ€” Stateless serverless deployment

Authentication

Credentials are never stored on the server. They are sent per-request via HTTP headers and held in memory only for the duration of that request.

Three credential methods are supported, with the following priority order:

Method 1 โ€” Two Separate Headers

Best for: HuggingChat, curl, any client supporting custom headers.

HeaderValue
X-BLUESKY-IDENTIFIERYour handle or email
X-BLUESKY-PASSWORDYour app password
curl -X POST https://your-app.vercel.app/mcp \
  -H "Content-Type: application/json" \
  -H "X-BLUESKY-IDENTIFIER: yourname.bsky.social" \
  -H "X-BLUESKY-PASSWORD: your-app-password" \
  -d '{"jsonrpc":"2.0","id":1,"method":"tools/list","params":{}}'

Method 2 โ€” Single Combined Header

Best for: Mistral Vibe CLI, clients with one api_key_header field.

Format: handle:app-password (splits on the first colon only, so passwords containing colons are safe)

X-BLUESKY-CREDENTIALS: yourname.bsky.social:your-app-password

Method 3 โ€” Authorization Bearer

Best for: MCP Playground, OpenAI-compatible clients, any tool using the Authorization header.

Authorization: Bearer yourname.bsky.social:your-app-password

MCP Tools

Post Operations

ToolDescriptionAuth Required
create_postCreate a new post (max 300 chars, optional reply/lang)โœ…
get_postsFetch specific posts by URI (up to 25)โŒ
get_likesGet users who liked a postโŒ
get_reposted_byGet users who reposted a postโŒ
like_postLike a postโœ…
repost_postRepost a postโœ…

Feed Operations

ToolDescriptionAuth Required
get_timelineGet home timeline (followed accounts)โœ…
get_feedGet posts from a feed generator (at:// URI)โŒ
get_author_feedGet posts by a specific userโŒ
get_threadGet post thread with replies and parentsโŒ

Profile Operations

ToolDescriptionAuth Required
get_profileGet detailed profile for a single userโŒ
get_profilesGet profiles for multiple users (batch, up to 25)โŒ
get_suggestionsGet suggested users to followโœ…

Search Operations

ToolDescriptionAuth Required
search_postsSearch posts by keyword, author, lang, mentionsโŒ
search_actorsSearch for users by name or handleโŒ
search_actors_typeaheadAutocomplete user searchโŒ

Account Operations

ToolDescriptionAuth Required
get_preferencesGet account preferences and content filtersโœ…
update_emailUpdate the email address associated with the accountโœ…

Server / Account Management Operations

ToolDescriptionAuth Required
admin_send_emailSend an email as a PDS adminโœ…
confirm_emailConfirm an email address using a verification tokenโœ…
create_accountCreate a new Bluesky/AT Protocol accountโŒ
create_app_passwordCreate a new app password for the accountโœ…
create_invite_codeCreate a single invite codeโœ…
create_invite_codesCreate multiple invite codes at onceโœ…
create_sessionCreate an authentication session (login)โŒ
deactivate_accountDeactivate the authenticated accountโœ…
delete_accountPermanently delete the authenticated accountโœ…
delete_sessionInvalidate the current sessionโœ…
describe_serverGet PDS server informationโŒ
get_account_invite_codesGet invite codes for the accountโœ…
get_service_authGet a signed JWT for service authโœ…
get_sessionGet current session detailsโœ…
list_app_passwordsList all app passwordsโœ…
refresh_sessionRefresh session tokensโœ…

Bookmark Operations

ToolDescriptionAuth Required
create_bookmarkSave a post as a private bookmarkโœ…
delete_bookmarkRemove a bookmark by URIโœ…
get_bookmarksList all private bookmarksโœ…

Age Assurance Operations

ToolDescriptionAuth Required
begin_age_assuranceInitiate the age assurance flowโœ…
get_age_assurance_configGet age assurance provider configโœ…
get_age_assurance_stateGet current age assurance statusโœ…

Utility

ToolDescriptionAuth Required
test_connectivityTest connection and check auth statusโŒ

MCP Prompts

PromptDescription
bluesky_usage_guideComprehensive guide for Bluesky tasks
search_posts_templateTemplate for searching posts
compose_postTemplate for composing posts

Security

  1. Credentials never stored โ€” not in Vercel env vars, not in git, not on disk
  2. Per-request injection โ€” credentials are passed in headers and held in memory only for that request
  3. Three auth methods โ€” flexible for any client without compromising security
  4. Input sanitization โ€” all inputs validated and sanitized before hitting the Bluesky API
  5. Rate limiting โ€” tiered limits for read vs write operations
  6. Security headers โ€” X-Frame-Options, X-Content-Type-Options, etc.

Development

# Install dependencies
pnpm install

# Run in development mode
pnpm dev

# Build for production
pnpm build

For local development, credentials can be passed via headers in every request. No env vars needed.


Architecture

Bluesky-MCP/
โ”œโ”€โ”€ app/
โ”‚   โ”œโ”€โ”€ mcp/route.ts        # MCP endpoint โ€” credential extraction + transport
โ”‚   โ”œโ”€โ”€ health/route.ts     # Health check
โ”‚   โ”œโ”€โ”€ layout.tsx
โ”‚   โ””โ”€โ”€ page.tsx
โ”œโ”€โ”€ src/
โ”‚   โ”œโ”€โ”€ mcp-server.ts       # MCP server โ€” tool routing, credential injection
โ”‚   โ”œโ”€โ”€ bluesky-client.ts   # Bluesky API client (all methods)
โ”‚   โ”œโ”€โ”€ handlers.ts         # Tool handlers
โ”‚   โ”œโ”€โ”€ toolDefinitions.ts  # Tool schemas
โ”‚   โ”œโ”€โ”€ sanitize.ts         # Input sanitization
โ”‚   โ”œโ”€โ”€ middleware.ts       # Rate limiting, security headers
โ”‚   โ”œโ”€โ”€ types.ts            # TypeScript types
โ”‚   โ””โ”€โ”€ utils.ts            # Utilities
โ”œโ”€โ”€ vercel.json
โ””โ”€โ”€ package.json