Skip to content

Commit 7e9d7f6

Browse files
authored
fix: exception async handling (#95)
* bug: exception handling in asynchronous MCP tools Closes: #92 * bug: inconsistent environment variable for transport selection Closes: #94 * chore: consistent variable names
1 parent c7c2674 commit 7e9d7f6

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ The toolset enables automated PR analysis, issue tracking, tagging and release m
3838
| |
3939
+------------------------+
4040
|
41-
| (stdio/SSE)
41+
| (stdio/MCP_ENABLE_REMOTE)
4242
v
4343
+--------------------+ +------------------------+
4444
| | | PRIssueAnalyser |
@@ -73,7 +73,7 @@ The toolset enables automated PR analysis, issue tracking, tagging and release m
7373
- PRIssueAnalyser: Main MCP server handling tool registration and requests
7474
- GitHub Integration: Manages all GitHub API interactions
7575
- IP Integration: Handles IPv4/IPv6 information retrieval
76-
- MCP Client: Interacts via stdio or Server-Sent Events (SSE)
76+
- MCP Client: Interacts via stdio or Server-Sent Events (MCP_ENABLE_REMOTE)
7777

7878
## Local Installation
7979

src/mcp_github/issues_pr_analyser.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@
3232

3333
class PRIssueAnalyser:
3434
"""
35-
PRIssueAnalyser is a class that provides an interface for analyzing GitHub Pull Requests (PRs) and managing GitHub Issues, Tags, and Releases, as well as retrieving IP information. It integrates with GitHub and an MCP (Multi-Component Platform) server to expose a set of tools for PR and issue management, and can be run as an MCP server using either SSE or stdio transport.
35+
PRIssueAnalyser is a class that provides an interface for analyzing GitHub Pull Requests (PRs) and managing GitHub Issues, Tags, and Releases, as well as retrieving IP information. It integrates with GitHub and an MCP (Multi-Component Platform) server to expose a set of tools for PR and issue management, and can be run as an MCP server using either MCP_ENABLE_REMOTE or stdio transport.
3636
Methods
3737
-------
3838
__init__():
@@ -47,7 +47,7 @@ class PRIssueAnalyser:
4747
- Fetching IPv4 and IPv6 information
4848
Each tool handles its own exceptions, logging errors and returning appropriate error messages or empty results.
4949
run():
50-
Runs the MCP server for GitHub PR analysis, selecting the transport mechanism based on the 'ENABLE_SSE' environment variable.
50+
Runs the MCP server for GitHub PR analysis, selecting the transport mechanism based on the 'MCP_ENABLE_REMOTE' environment variable.
5151
Logs and prints any exceptions that occur during server execution, including a fatal error message and traceback.
5252
"""
5353
def __init__(self):
@@ -382,8 +382,8 @@ async def get_ipv4_ipv6_info() -> dict[str, Any]:
382382
def run(self):
383383
"""
384384
Runs the MCP Server for GitHub PR Analysis using the appropriate transport.
385-
This method checks the 'ENABLE_SSE' environment variable to determine whether to use
386-
Server-Sent Events (SSE) or standard input/output (stdio) as the transport mechanism
385+
This method checks the 'MCP_ENABLE_REMOTE' environment variable to determine whether to use
386+
Server-Sent Events (MCP_ENABLE_REMOTE) or standard input/output (stdio) as the transport mechanism
387387
for the MCP server. It logs the server startup and handles any exceptions that occur
388388
during execution, logging errors and printing the traceback to standard error.
389389
Returns:

0 commit comments

Comments
 (0)