DevBot — GitHub + LinkedIn AI Assistant
Gemini 2.5 Flash chatbot with MCP tools for GitHub and LinkedIn, served via Flask.
Project structure
devbot/
├── server.py # MCP server — GitHub + LinkedIn tools
├── client.py # Flask app + Gemini + MCP client
├── index.html # Chat UI
├── .env # API keys
└── requirements.txt
Setup
pip install -r requirements.txt
Fill in .env (see sections below for each key).
python client.py
Getting API keys
1. Gemini API key
- Go to https://aistudio.google.com
- Click "Get API key" → create one
2. GitHub token
- Go to https://github.com/settings/tokens
- Generate new token → Classic
- Scopes to enable:
repo(all),delete_repo - Copy the token into
.envasGITHUB_TOKEN - Also set
GITHUB_USERNAMEto your GitHub username
3. LinkedIn Access Token (manual OAuth)
LinkedIn doesn't give tokens easily — here's the fastest manual method:
Step 1 — Create a LinkedIn App
- Go to https://www.linkedin.com/developers/apps/new
- Fill in app name, link it to a LinkedIn Page (create a dummy one if needed)
- Under "Auth" tab → add redirect URL:
https://localhost - Under "Products" → request access to "Share on LinkedIn" and "Sign In with LinkedIn using OpenID Connect"
Step 2 — Get your auth code
Build this URL and open it in your browser (replace CLIENT_ID):
https://www.linkedin.com/oauth/v2/authorization?response_type=code&client_id=YOUR_CLIENT_ID&redirect_uri=https://localhost&scope=openid%20profile%20w_member_social%20r_liteprofile
After approving, you'll be redirected to https://localhost/?code=SOME_CODE — copy the code value.
Step 3 — Exchange code for token
curl -X POST https://www.linkedin.com/oauth/v2/accessToken \
-d grant_type=authorization_code \
-d code=YOUR_CODE \
-d redirect_uri=https://localhost \
-d client_id=YOUR_CLIENT_ID \
-d client_secret=YOUR_CLIENT_SECRET
You'll get back an access_token — paste it into .env as LINKEDIN_ACCESS_TOKEN.
Token is valid for 60 days.
Available tools
| Tool | What it does |
|---|---|
gh_list_repos |
List all your repos |
gh_get_repo |
Get details of a repo |
gh_create_repo |
Create a new repo |
gh_delete_repo |
Delete a repo |
gh_list_issues |
List issues in a repo |
gh_create_issue |
Open a new issue |
gh_list_branches |
List branches |
li_get_profile |
Get your LinkedIn profile |
li_post_content |
Post to LinkedIn |
li_edit_bio |
Update your headline |
li_edit_about |
Update your About section |
Example prompts
- "List all my GitHub repos"
- "Create a private repo called ml-experiments"
- "Show open issues in my portfolio repo"
- "Post on LinkedIn: Just shipped my MCP chatbot!"
- "Update my LinkedIn headline to: AI Engineer | LLMs | n8n"