Skip to content

jayesh-verma-code/Git_To_Bsky_Agent

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Git to Bluesky AI Agent

An AI-powered automation tool that converts your latest GitHub commit into a concise, developer friendly Bluesky post using an LLM, delivered via Model Context Protocol (MCP).

This project supports two independent modes:

  1. Claude / MCP stdio version

for direct MCP compatible agents (like Claude)

  1. CLI-based Agent version

a full MCP Client & Server setup using SSE, usable from the terminal


Architecture Diagram

What This Project Does

  • Fetches the latest commit from a GitHub repository
  • Extracts the changed code
  • Uses an LLM (Groq – LLaMA 3.3 70B) to generate a short, clean post
  • Automatically posts to Bluesky
  • Secured using a tool access key

Perfect for:

  • Daily coding challenges
  • #BuildInPublic posts
  • Developer content automation

High-Level Architecture

GitHub Repo
   ↓
Fetch Latest Commit
   ↓
Extract Code
   ↓
LLM (Groq API)
   ↓
Generate Post
   ↓
Bluesky API

Project Structure

Git_To_Bsky_Agent/
│
├── Claude_version/
│   └── src/
│       └── index.ts        # MCP stdio-based server
│
├── CLI_version/
│   ├── Client/
│   │   └── src/index.ts    # CLI MCP client
│   │
│   └── Server/
│       └── src/index.ts    # MCP SSE server (Express)
│
├── .gitignore
├── .env.example
└── README.md

Environment Variables

Create a .env file in both Claude_version and CLI_version (Server & Client) as needed.

.env.example

# LLM
GROQ_API_KEY=your_groq_api_key

# GitHub
GITHUB_OWNER=your_github_username
GITHUB_REPO=your_repository_name

# Bluesky
BLUESKY_HANDLE=your_handle.bsky.social
BLUESKY_APP_PASSWORD=your_app_password

# Security
TOOL_ACCESS_KEY=some_secret_key

Version 1: Claude / MCP stdio Version

Description

This version runs as an MCP server over stdio, designed for tools like Claude Desktop or any MCP compatible host.

How to Run

cd Claude_version
npm install
npm run dev

You should see:

MCP Server running on stdio

MCP Tool Available

Tool Name: createBskyPostFromGithub

Inputs:

{
  "day": "12",
  "key": "TOOL_ACCESS_KEY"
}

Version 2: CLI-Based MCP Agent (Client & Server)

Description

A complete SSE-based MCP setup:

  • Express server exposes MCP tools
  • Terminal client chats with an LLM and invokes MCP tools automatically

▶️ Start the Server

cd CLI_version/Server
npm install
npm run dev

Server runs on:

http://localhost:4000/sse

Start the Client

cd CLI_version/Client
npm install
npm run dev

You’ll see:

Agent: Welcome YourName, how can I assist you today?

Try prompts like:

Create today's Bluesky post
Post my Day 5 update

The agent will automatically invoke the MCP tool.


Security Model

  • MCP tools are protected via TOOL_ACCESS_KEY
  • Unauthorized tool usage is blocked
  • All secrets are environment-based

Known Limitations

  • Assumes at least one file exists in the latest commit
  • Uses only the first changed file
  • No retry logic for API failures

These can be improved in future iterations, along with the agentic architecture.


Future Improvements

  • Multi file commit support
  • Commit diff summarization
  • Post preview mode
  • Twitter / LinkedIn support
  • Shared utility package
  • Agentic Architechture

Author

Jayesh Verma

Built as a real world AI automation + MCP learning project.


License

MIT License

You’re free to use, modify, and distribute this project.

About

An AI agent that fetches the latest code from GitHub, analyzes it, generates post content, and publishes it on Bluesky. Watch a demo below

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published