Content-Length: 263449 | pFad | http://github.com/github/github-mcp-server/issues/363

35 Add support for Dependabot alerts · Issue #363 · github/github-mcp-server · GitHub
Skip to content

Add support for Dependabot alerts #363

@avarant

Description

@avarant

add tools to fetch and dismiss dependabot alerts for a repo

Proposed solution

example tool for fetching alerts

@mcp.tool()
def get_dependabot_alerts(repo_owner: str, repo_name: str) -> list[dict]:
    """Get Github Dependabot alerts"""
    url = f"https://api.github.com/repos/{repo_owner}/{repo_name}/dependabot/alerts"
    headers = {
        "Authorization": f"Bearer {GITHUB_TOKEN}",
        "Accept": "application/vnd.github+json"
    }

    response = requests.get(url, headers=headers)

    if response.status_code == 200:
        return response.json()
    else:
        print(response.status_code, response.text)
        return []

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions









      ApplySandwichStrip

      pFad - (p)hone/(F)rame/(a)nonymizer/(d)eclutterfier!      Saves Data!


      --- a PPN by Garber Painting Akron. With Image Size Reduction included!

      Fetched URL: http://github.com/github/github-mcp-server/issues/363

      Alternative Proxies:

      Alternative Proxy

      pFad Proxy

      pFad v3 Proxy

      pFad v4 Proxy