MatteoMass's picture
removed the tokens from env
9ad58d0
raw
history blame contribute delete
817 Bytes
from pmcp.mcp_server.github_server.utils.github_api import GithubClient
github_client = None
def initialize_github_client(api_key: str = None) -> None:
try:
if not api_key:
raise ValueError(
"api_key required"
)
global github_client
github_client = GithubClient(api_key=api_key)
except Exception as e:
raise
# Add a prompt for common Github operations
def github_help() -> str:
"""Provides help information about available Github operations."""
return """
Available Github Operations:
1. get issues
2. create issue
3. comment issue
4. close issue
5. get pull requests
6. create pull request
7. get repo stats
8. list branches
9. get recent commits
10. get file contents
"""