Skip to content

Commit 6e38155

Browse files
committed
Fixes
Signed-off-by: Alina Buzachis <[email protected]>
1 parent 42fec2e commit 6e38155

File tree

3 files changed

+4
-14
lines changed

3 files changed

+4
-14
lines changed

plugins/connection/mcp.py

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44

55

66
DOCUMENTATION = r"""
7+
---
78
name: mcp
89
author:
910
- Alina Buzachis (@alinabuzachis)
@@ -147,10 +148,6 @@ def __init__(self, play_context, new_stdin, *args, **kwargs):
147148
self._client: MCPClient | None = None
148149
self._connected = False
149150

150-
# Persistent options
151-
self._timeout = self.get_option("persistent_command_timeout")
152-
self._log_messages_enabled = self.get_option("persistent_log_messages")
153-
154151
@property
155152
def connected(self) -> bool:
156153
"""Return True if connected to MCP server."""

plugins/plugin_utils/mcp.py

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -17,16 +17,6 @@
1717
from ansible.module_utils.urls import open_url
1818

1919

20-
class MCPError(Exception):
21-
"""Base exception class for MCP related errors.
22-
23-
This exception is raised when MCP operations fail, such as initialization,
24-
tool listing, tool execution, or validation errors.
25-
"""
26-
27-
pass
28-
29-
3020
class MCPError(Exception):
3121
"""Base exception class for MCP related errors.
3222

tests/unit/plugins/connection/test_mcp.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,9 @@ def get_option(key):
6666
"mcp_bearer_token": "token123",
6767
"mcp_validate_certs": True,
6868
"mcp_manifest_path": str(manifest_file),
69+
"persistent_connect_timeout": 15,
70+
"persistent_command_timeout": 15,
71+
"persistent_log_messages": False,
6972
}
7073
conn.get_option = get_option
7174

0 commit comments

Comments
 (0)