MCPcopy Create free account

hub / github.com/PaloAltoNetworks/pan-mcp-relay / functions

Functions304 in github.com/PaloAltoNetworks/pan-mcp-relay

↓ 26 callersMethodupdate_registry
Update the registry with a new list of tools and refresh all internal collections. This method replaces the current tool list, rebui
src/pan_mcp_relay/tool_registry.py:68
↓ 14 callersMethodextract_text_content
Extract text from various MCP content types. Args: content: The content to extract text from Returns:
src/pan_mcp_relay/pan_security_relay.py:353
↓ 11 callersMethodto_mcp_tool
Convert to standard MCP Tool. Returns: Standard MCP Tool object.
src/pan_mcp_relay/tool.py:93
↓ 9 callersMethodget_available_tools
Retrieve all tools that are currently in the ENABLED state. Returns: list[InternalTool]: List of enabled tools available
src/pan_mcp_relay/tool_registry.py:136
↓ 8 callersMethodget_tool_by_hash
Look up a specific tool using its SHA256 hash identifier. Provides fast O(1) lookup for tools when the hash is known, useful
src/pan_mcp_relay/tool_registry.py:155
↓ 7 callersMethodis_registry_outdated
Check if the registry cache has expired and needs to be refreshed. Returns: bool: True if the registry is outdated (past
src/pan_mcp_relay/tool_registry.py:123
↓ 6 callersMethodget_argument_descriptions
Get formatted argument descriptions from input schema. Returns: List of argument description strings.
src/pan_mcp_relay/tool.py:65
↓ 6 callersMethodlist_tools
()
src/pan_mcp_relay/pan_security_relay.py:275
↓ 6 callersMethodshutdown
(self)
src/pan_mcp_relay/security_scanner.py:124
↓ 4 callersMethod_call_tool
Handle tool execution requests.
src/pan_mcp_relay/pan_security_relay.py:321
↓ 4 callersMethodget_registry_stats
Get statistics about the current registry state. Returns: dict[str, any]: Dictionary containing registry statistics
src/pan_mcp_relay/tool_registry.py:170
↓ 4 callersFunctionmake_validation_aliases
(field_name: str, *extras: str)
src/pan_mcp_relay/configuration.py:65
↓ 3 callersMethod_list_tools
Handle the list_tools request.
src/pan_mcp_relay/pan_security_relay.py:306
↓ 3 callersFunctioncheck_unexpanded_vars
Check for unexpanded environment variables in the model
src/pan_mcp_relay/configuration.py:110
↓ 3 callersMethodclear_registry
Clear all tools from the registry and reset timestamps.
src/pan_mcp_relay/tool_registry.py:185
↓ 3 callersFunctionexpand_vars
Expand shell variables of form $var and ${var}.
src/pan_mcp_relay/utils.py:40
↓ 3 callersMethodscan
( self, source: ScanSource, scan_type: ScanType, prompt: str, response
src/pan_mcp_relay/security_scanner.py:158
↓ 3 callersMethodupdate_hash_mapping
Update the hash-to-tool mapping for quick lookups.
src/pan_mcp_relay/tool_registry.py:114
↓ 2 callersMethod_initialize
Initialize the relay server and register all tools.
src/pan_mcp_relay/pan_security_relay.py:126
↓ 2 callersMethod_update_tool_registry
Update the tool registry with tools from all configured servers.
src/pan_mcp_relay/pan_security_relay.py:164
↓ 2 callersMethodcall_tool
Invoke a tool by name with optional arguments.
examples/clients/stdio/pan_security_relay_stdio_client.py:134
↓ 2 callersFunctioncheck_unexpanded_dict
Check for unexpanded environment variables in a dictionary
src/pan_mcp_relay/configuration.py:93
↓ 2 callersMethodcleanup
Clean up the session and subprocess resources.
examples/clients/stdio/pan_security_relay_stdio_client.py:119
↓ 2 callersMethoddebug_enabled
(self)
src/pan_mcp_relay/configuration.py:282
↓ 2 callersMethodget_all_tools
Retrieve the complete list of all registered tools regardless of state. Returns: list[InternalTool]: Complete list of al
src/pan_mcp_relay/tool_registry.py:145
↓ 2 callersFunctionget_loglevel
(**kwargs)
src/pan_mcp_relay/main.py:109
↓ 2 callersMethodlist_tools
List available tools, with optional refresh from the server.
examples/clients/stdio/pan_security_relay_stdio_client.py:125
↓ 2 callersFunctionserverinfo_str
(serverinfo: types.Implementation)
src/pan_mcp_relay/client/session_group.py:32
↓ 2 callersMethodupdate_available_tools
Update the available tools list with only enabled tools.
src/pan_mcp_relay/tool_registry.py:103
↓ 1 callersMethod_initialize_relay_clients
Collect tools from all configured downstream servers.
src/pan_mcp_relay/pan_security_relay.py:183
↓ 1 callersMethod_scan_tools
(self, tools: dict[str, types.Tool])
src/pan_mcp_relay/pan_security_relay.py:210
↓ 1 callersMethod_validate_tool_limits
Additional validation of tool limits and constraints.
src/pan_mcp_relay/pan_security_relay.py:257
↓ 1 callersMethodai_profile
(self)
src/pan_mcp_relay/security_scanner.py:130
↓ 1 callersMethodcall_tool
( name: str, arguments: dict )
src/pan_mcp_relay/pan_security_relay.py:287
↓ 1 callersMethodcheck_required
(self)
src/pan_mcp_relay/configuration.py:335
↓ 1 callersFunctioncheck_unexpanded_list
(items: list[Any])
src/pan_mcp_relay/configuration.py:82
↓ 1 callersFunctionclean_values
(data: T)
src/pan_mcp_relay/main.py:524
↓ 1 callersFunctioncli
Run the MCP Relay Server.
src/pan_mcp_relay/main.py:261
↓ 1 callersMethodcompute_hash
Compute SHA256 hash of tool identity fields. Returns: SHA256 hash string.
src/pan_mcp_relay/tool.py:83
↓ 1 callersMethodconnect
Establish connection to the relay subprocess via stdio transport.
examples/clients/stdio/pan_security_relay_stdio_client.py:94
↓ 1 callersMethodconnect_to_server_with_name
Connects to a single MCP server.
src/pan_mcp_relay/client/session_group.py:88
↓ 1 callersFunctiondeep_merge
(original: dict[K, V], *updaters: dict[K, V])
src/pan_mcp_relay/utils.py:52
↓ 1 callersFunctionentrypoint
Entrypoint for the MCP relay server.
src/pan_mcp_relay/main.py:135
↓ 1 callersFunctionexpand_path
Normnalize, Expands environment variables and converts a path string to Path object.
src/pan_mcp_relay/utils.py:27
↓ 1 callersFunctionfind_config_file
(config_path: Path | None)
src/pan_mcp_relay/main.py:509
↓ 1 callersMethodget_http_parameters
Generate MCP Server Parameters for HTTP-type clients (SSE, Streamable HTTP). All parameter values are subject to environment variable expansi
src/pan_mcp_relay/client/client.py:57
↓ 1 callersFunctionget_logger
(name: str)
src/pan_mcp_relay/utils.py:63
↓ 1 callersMethodget_server_info
Fetch downstream server information via the special tool.
examples/clients/stdio/pan_security_relay_stdio_client.py:148
↓ 1 callersMethodget_server_name_by_tool
(self, name: str)
src/pan_mcp_relay/client/session_group.py:68
↓ 1 callersMethodget_server_params
(self)
src/pan_mcp_relay/client/client.py:50
↓ 1 callersMethodget_stdio_parameters
Generate MCP Server Parameters for stdio clients. All parameter values are subject to environment variable expansion.
src/pan_mcp_relay/client/client.py:91
↓ 1 callersFunctiongetenv
(key: str, masked: bool = False)
src/pan_mcp_relay/utils.py:45
↓ 1 callersFunctioninteractive_mode
Interactive command-line interface for interacting with the relay server. Supports commands: list, call <tool> <args>, servers, quit
examples/clients/stdio/pan_security_relay_stdio_client.py:154
↓ 1 callersFunctionload_config_file
(config_path)
src/pan_mcp_relay/main.py:535
↓ 1 callersFunctionload_dotenvs
(dotenv_search: str | None, dotenv_src: ParameterSource)
src/pan_mcp_relay/main.py:483
↓ 1 callersMethodlog_level_name
Log level name. One of: NOTSET, DEBUG, INFO, WARNING, ERROR, CRITICAL.
src/pan_mcp_relay/configuration.py:278
↓ 1 callersFunctionmain
Main entry point for the command-line interface.
examples/clients/stdio/pan_security_relay_stdio_client.py:195
↓ 1 callersMethodmcp_server
Create and configure the MCP Relay Server with tool handlers. This is the MCP Server for the MCP Relay itself, and is what MCP Clients connec
src/pan_mcp_relay/pan_security_relay.py:262
↓ 1 callersMethodmetadata
(self)
src/pan_mcp_relay/security_scanner.py:145
↓ 1 callersFunctionset_loglevels
Configure Log Levels for libraries
src/pan_mcp_relay/main.py:96
↓ 1 callersFunctionsetup_http_server
Set up a Starlette HTTP Server for MCP Streamable HTTP Transport
src/pan_mcp_relay/server/server.py:103
↓ 1 callersFunctionsetup_logging
Initialize logging.
src/pan_mcp_relay/main.py:77
↓ 1 callersFunctionsetup_sse_server
Set up a Starlette HTTP Server for MCP SSE Transport
src/pan_mcp_relay/server/server.py:71
↓ 1 callersMethodshutdown
(self)
src/pan_mcp_relay/pan_security_relay.py:143
↓ 1 callersFunctionstart_mcp_relay_server
Initialize and Start the MCP Relay
src/pan_mcp_relay/main.py:444
↓ 1 callersMethodto_mcp_format
Convert the exception to an MCP call tool result format. Returns: types.CallToolResult: A structured error result
src/pan_mcp_relay/exceptions.py:29
↓ 1 callersFunctionuser_agent
()
src/pan_mcp_relay/security_scanner.py:245
Method__aenter__
(self)
src/pan_mcp_relay/pan_security_relay.py:114
Method__aexit__
Closes session exit stacks and main exit stack upon completion.
src/pan_mcp_relay/pan_security_relay.py:117
Method__contains__
Check if a tool with the given hash exists in the registry.
src/pan_mcp_relay/tool_registry.py:200
Method__eq__
Override equality comparison to allow case-insensitive comparison with strings. Args: other (object): The object to comp
examples/clients/stdio/pan_security_relay_stdio_client.py:53
Method__hash__
Override hash function to ensure consistency with case-insensitive equality. Returns: int: The hash value of the lowerca
examples/clients/stdio/pan_security_relay_stdio_client.py:68
Method__init__
(self, message: str = "")
src/pan_mcp_relay/exceptions.py:23
Method__init__
(self, config: McpRelayConfig, mcp_servers_config: dict[str, McpServerType])
src/pan_mcp_relay/pan_security_relay.py:99
Method__init__
(self, api_key: str | SecretStr | None)
src/pan_mcp_relay/security_scanner.py:51
Method__init__
( self, exit_stack: contextlib.AsyncExitStack | None = None, )
src/pan_mcp_relay/client/session_group.py:49
Method__init__
(self)
tests/test_downstream_mcp_client.py:616
Method__init__
(self)
tests/test_downstream_mcp_client.py:631
Method__init__
Initialize the client with relay module path and config file.
examples/clients/stdio/pan_security_relay_stdio_client.py:86
Method__len__
Return the total number of tools in the registry.
src/pan_mcp_relay/tool_registry.py:196
Method__repr__
(self)
src/pan_mcp_relay/constants.py:102
Method__repr__
Return string representation of the registry.
src/pan_mcp_relay/tool_registry.py:204
Method__str__
(self)
src/pan_mcp_relay/constants.py:105
Method_connect_to_server
(server_name: str, server_params: ServerParameters)
src/pan_mcp_relay/pan_security_relay.py:187
Function_handle_sse
(scope: Scope, receive: Receive, send: Send)
src/pan_mcp_relay/server/server.py:79
Method_scan_tool
(tool_name: str, tool: types.Tool)
src/pan_mcp_relay/pan_security_relay.py:213
Methodauth_flow
(self, request)
src/pan_mcp_relay/security_scanner.py:58
Methodcall_tool
(self, name: str, args: dict[str, Any])
src/pan_mcp_relay/client/session_group.py:59
Methodcheck_required
(self)
src/pan_mcp_relay/configuration.py:145
Methodcheck_required
(self)
src/pan_mcp_relay/configuration.py:199
Methodcheck_required
Validate final configuration for required variables
src/pan_mcp_relay/configuration.py:299
Functioncompletion
Generate shell autocompletion script for the specified shell.
src/pan_mcp_relay/main.py:425
Methodcomponent_name_hook
Custom Component Name Hook for ClientSessionGroup base class
src/pan_mcp_relay/client/session_group.py:75
Methodconnect_to_server
(self, server_params: ServerParameters)
src/pan_mcp_relay/client/session_group.py:84
Functionecho_server_config
Create echo server configuration for testing.
tests/test_downstream_mcp_client.py:43
Functionecho_tool
Create echo tool that returns input.
tests/test_tool_registry.py:41
Functionecho_tool_data
Create echo tool data for testing.
tests/test_tool.py:55
Functionecho_tool_schema
Create sample input schema for echo tool.
tests/test_tool.py:37
Functionerror_all_tool
Create tool that always returns isError=True.
tests/test_tool_registry.py:53
Functionerror_all_tool_data
Create error_all_tool data for testing.
tests/test_tool.py:254
next →1–100 of 304, ranked by callers