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."
        )
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations provided, the description carries full burden but only states what the tool does, not how it behaves. It doesn't disclose that this likely generates an OAuth URL with scopes/state parameters, whether it requires pre-configured client credentials, what the URL format is, or any rate limits. The description is minimal and misses important behavioral context for an auth tool.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single, efficient sentence that directly states the tool's purpose with zero wasted words. It's appropriately sized for a simple tool with no parameters and gets straight to the point without unnecessary elaboration.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the tool's simplicity (0 parameters, no output schema, no annotations), the description is minimally complete but lacks important context. For an authorization tool, it should ideally mention this is for OAuth flow initiation, what happens after URL generation, or how it relates to sibling tools like 'get_access_token_from_code'. The description is adequate but leaves gaps in understanding the full workflow.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The tool has 0 parameters with 100% schema description coverage, so the baseline is 4. The description doesn't need to explain parameters, and it correctly doesn't mention any. However, it doesn't add any semantic context about what might be configurable in the URL generation (like scopes), which could be helpful but isn't required.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the action ('Generate') and resource ('GitHub authorization URL') with a specific purpose ('for user authorization'). It distinguishes from siblings like 'get_access_token_from_code' which handles the next step in the OAuth flow. However, it doesn't explicitly mention this is for OAuth initiation or differentiate from other auth methods.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description implies this tool should be used when starting user authorization, but doesn't explicitly state when to use it versus alternatives like direct token requests. It mentions 'user authorization' which provides some context, but lacks guidance on prerequisites (e.g., needing GitHub app credentials) or explicit exclusions.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other Tools

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