fast-agent-mcp 0.3.8__py3-none-any.whl → 0.3.10__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.

Potentially problematic release.


This version of fast-agent-mcp might be problematic. Click here for more details.

@@ -7,16 +7,16 @@ ELICITATION_STYLE = Style.from_dict(
7
7
  {
8
8
  # Dialog structure - use ansidefault for true black, remove problematic shadow
9
9
  "dialog": "bg:ansidefault", # True black dialog using ansidefault
10
- "dialog.body": "bg:ansidefault fg:ansiwhite", # True black dialog body
10
+ "dialog.body": "bg:ansidefault fg:ansidefault", # True black dialog body with default text color
11
11
  "dialog shadow": "bg:ansidefault", # Set shadow background to match application
12
12
  "dialog.border": "bg:ansidefault", # True black border background
13
13
  # Set application background to true black
14
14
  "application": "bg:ansidefault", # True black application background
15
15
  # Title styling with better contrast
16
- "title": "fg:ansibrightmagenta bold", # Bright magenta text
16
+ "title": "fg:ansidefault bold", # Default color title for terminal compatibility
17
17
  # Buttons - only define focused state to preserve focus highlighting
18
18
  "button.focused": "bg:ansibrightgreen fg:ansiblack bold", # Bright green with black text for contrast
19
- "button.arrow": "fg:ansiwhite bold", # White arrows for visibility
19
+ "button.arrow": "fg:ansidefault bold", # Default color arrows for terminal compatibility
20
20
  # Form elements with consistent green/yellow theme
21
21
  # Checkboxes - green when checked, yellow when focused
22
22
  "checkbox": "fg:ansidefault", # Default color unchecked checkbox (dimmer)
@@ -34,15 +34,15 @@ ELICITATION_STYLE = Style.from_dict(
34
34
  # Frame styling with ANSI colors - make borders visible
35
35
  "frame.border": "fg:ansibrightblack", # Bright black borders for subtlety
36
36
  "frame.label": "fg:ansigray", # Gray frame labels (less prominent)
37
- # Labels and text - use white for good visibility
38
- "label": "fg:ansiwhite", # White labels for good readability
37
+ # Labels and text - use default color for terminal compatibility
38
+ "label": "fg:ansidefault", # Default color labels for terminal compatibility
39
39
  "message": "fg:ansibrightcyan", # Bright cyan messages (no bold)
40
40
  # Agent and server names - make them match
41
41
  "agent-name": "fg:ansibrightblue bold",
42
42
  "server-name": "fg:ansibrightblue bold", # Same color as agent
43
43
  # Validation errors - better contrast
44
- "validation-toolbar": "bg:ansibrightred fg:ansiwhite bold",
45
- "validation-toolbar.text": "bg:ansibrightred fg:ansiwhite",
44
+ "validation-toolbar": "bg:ansibrightred fg:ansidefault bold",
45
+ "validation-toolbar.text": "bg:ansibrightred fg:ansidefault",
46
46
  "validation.border": "fg:ansibrightred",
47
47
  "validation-error": "fg:ansibrightred bold", # For status line errors
48
48
  # Separator styling
@@ -24,6 +24,7 @@ from fast_agent.agents.agent_types import AgentType
24
24
  from fast_agent.constants import FAST_AGENT_ERROR_CHANNEL, FAST_AGENT_REMOVED_METADATA_CHANNEL
25
25
  from fast_agent.core.exceptions import PromptExitError
26
26
  from fast_agent.llm.model_info import get_model_info
27
+ from fast_agent.ui.mcp_display import render_mcp_status
27
28
 
28
29
  if TYPE_CHECKING:
29
30
  from fast_agent.core.agent_app import AgentApp
@@ -74,6 +75,20 @@ help_message_shown = False
74
75
  _agent_info_shown = set()
75
76
 
76
77
 
78
+ async def show_mcp_status(agent_name: str, agent_provider: "AgentApp | None") -> None:
79
+ if agent_provider is None:
80
+ rich_print("[red]No agent provider available[/red]")
81
+ return
82
+
83
+ try:
84
+ agent = agent_provider._agent(agent_name)
85
+ except Exception as exc:
86
+ rich_print(f"[red]Unable to load agent '{agent_name}': {exc}[/red]")
87
+ return
88
+
89
+ await render_mcp_status(agent)
90
+
91
+
77
92
  async def _display_agent_info_helper(agent_name: str, agent_provider: "AgentApp | None") -> None:
78
93
  """Helper function to display agent information."""
79
94
  # Only show once per agent
@@ -165,6 +180,7 @@ async def _display_agent_info_helper(agent_name: str, agent_provider: "AgentApp
165
180
  content = f"{server_text}[dim] available[/dim]"
166
181
 
167
182
  rich_print(f"[dim]Agent [/dim][blue]{agent_name}[/blue][dim]:[/dim] {content}")
183
+ # await _render_mcp_status(agent)
168
184
 
169
185
  # Mark as shown
170
186
  _agent_info_shown.add(agent_name)
@@ -322,6 +338,7 @@ class AgentCompleter(Completer):
322
338
  self.agents = agents
323
339
  # Map commands to their descriptions for better completion hints
324
340
  self.commands = {
341
+ "mcp": "Show MCP server status",
325
342
  "tools": "List available MCP tools",
326
343
  "prompt": "List and choose MCP prompts, or apply specific prompt (/prompt <name>)",
327
344
  "agents": "List available agents",
@@ -331,8 +348,8 @@ class AgentCompleter(Completer):
331
348
  "save_history": "Save history; .json = MCP JSON, others = Markdown",
332
349
  "help": "Show commands and shortcuts",
333
350
  "clear": "Clear the screen",
334
- "STOP": "Stop this prompting session and move to next workflow step",
335
351
  "EXIT": "Exit fast-agent, terminating any running workflows",
352
+ "STOP": "Stop this prompting session and move to next workflow step",
336
353
  **(commands or {}), # Allow custom commands to be passed in
337
354
  }
338
355
  if is_human_input:
@@ -808,6 +825,8 @@ async def get_enhanced_input(
808
825
  cmd_parts[1].strip() if len(cmd_parts) > 1 and cmd_parts[1].strip() else None
809
826
  )
810
827
  return {"save_history": True, "filename": filename}
828
+ elif cmd in ("mcpstatus", "mcp"):
829
+ return {"show_mcp_status": True}
811
830
  elif cmd == "prompt":
812
831
  # Handle /prompt with no arguments as interactive mode
813
832
  if len(cmd_parts) > 1:
@@ -985,6 +1004,7 @@ async def handle_special_commands(command, agent_app=None):
985
1004
  rich_print(" /prompt <name> - Apply a specific prompt by name")
986
1005
  rich_print(" /usage - Show current usage statistics")
987
1006
  rich_print(" /markdown - Show last assistant message without markdown formatting")
1007
+ rich_print(" /mcpstatus - Show MCP server status summary for the active agent")
988
1008
  rich_print(" /save_history <filename> - Save current chat history to a file")
989
1009
  rich_print(
990
1010
  " [dim]Tip: Use a .json extension for MCP-compatible JSON; any other extension saves Markdown.[/dim]"
@@ -32,6 +32,7 @@ from fast_agent.ui.enhanced_prompt import (
32
32
  get_enhanced_input,
33
33
  get_selection_input,
34
34
  handle_special_commands,
35
+ show_mcp_status,
35
36
  )
36
37
  from fast_agent.ui.progress_display import progress_display
37
38
  from fast_agent.ui.usage_display import collect_agents_from_provider, display_usage_report
@@ -177,6 +178,10 @@ class InteractivePrompt:
177
178
  # Handle markdown display
178
179
  await self._show_markdown(prompt_provider, agent)
179
180
  continue
181
+ elif "show_mcp_status" in command_result:
182
+ rich_print()
183
+ await show_mcp_status(agent, prompt_provider)
184
+ continue
180
185
  elif "save_history" in command_result:
181
186
  # Save history for the current agent
182
187
  filename = command_result.get("filename")