Skip to main content
Glama
Nikhil-Patil-RI

Github-Oauth MCP Server

authorize_github

Generate a GitHub OAuth authorization URL to securely authenticate users and enable access to GitHub repositories and services.

Instructions

Generate GitHub authorization URL for user authorization.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • The main handler function for the 'authorize_github' tool. It checks if already authorized, otherwise generates and returns the GitHub OAuth authorization URL for the user to visit.
    @mcp.tool() async def authorize_github() -> str: """Generate GitHub authorization URL for user authorization.""" global access_token if access_token: return "Already authorized with an access token." authorization_url = ( f"https://github.com/login/oauth/authorize?" f"client_id={CLIENT_ID}&redirect_uri={REDIRECT_URI}&scope=repo" ) return ( f"Please authorize the application by visiting this URL:\n\n{authorization_url}\n\n" "Once authorized, provide the code you receive." )

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/Nikhil-Patil-RI/MCP-Github-Oauth'

If you have feedback or need assistance with the MCP directory API, please join our Discord server