-
-
Save KyMidd/4deae867281f139acfdd2d89f5df433a to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # User question to start | |
| user_question = "Find all active issues over the last 4 hours, find critical outages, and research potential code changes that caused those issues." | |
| # Build PagerDuty MCP | |
| def build_pagerduty_mcp_client(): | |
| """Build and return a PagerDuty MCP client.""" | |
| return MCPClient(lambda: stdio_client( | |
| StdioServerParameters( | |
| command="uv", | |
| args=[ | |
| "run", | |
| "--directory", | |
| "/Users/kyler/git/GitHub/PagerDuty/pagerduty-mcp-server", | |
| "python", | |
| "-m", | |
| "pagerduty_mcp" | |
| #"--enable-write-tools" # This flag enables write operations on the MCP Server enabling you to create issues, pull requests, etc. | |
| ], | |
| env={ | |
| "PAGERDUTY_HOST": "https://api.my_company.pagerduty.com", | |
| "PAGERDUTY_USER_API_KEY": os.getenv("PAGERDUTY_USER_API_KEY") | |
| }, | |
| ) | |
| )) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment