Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/PaloAltoNetworks/pan-mcp-relay
/ functions
Functions
304 in github.com/PaloAltoNetworks/pan-mcp-relay
⨍
Functions
304
◇
Types & classes
45
↳
Endpoints
28
↓ 26 callers
Method
update_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 callers
Method
extract_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 callers
Method
to_mcp_tool
Convert to standard MCP Tool. Returns: Standard MCP Tool object.
src/pan_mcp_relay/tool.py:93
↓ 9 callers
Method
get_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 callers
Method
get_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 callers
Method
is_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 callers
Method
get_argument_descriptions
Get formatted argument descriptions from input schema. Returns: List of argument description strings.
src/pan_mcp_relay/tool.py:65
↓ 6 callers
Method
list_tools
()
src/pan_mcp_relay/pan_security_relay.py:275
↓ 6 callers
Method
shutdown
(self)
src/pan_mcp_relay/security_scanner.py:124
↓ 4 callers
Method
_call_tool
Handle tool execution requests.
src/pan_mcp_relay/pan_security_relay.py:321
↓ 4 callers
Method
get_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 callers
Function
make_validation_aliases
(field_name: str, *extras: str)
src/pan_mcp_relay/configuration.py:65
↓ 3 callers
Method
_list_tools
Handle the list_tools request.
src/pan_mcp_relay/pan_security_relay.py:306
↓ 3 callers
Function
check_unexpanded_vars
Check for unexpanded environment variables in the model
src/pan_mcp_relay/configuration.py:110
↓ 3 callers
Method
clear_registry
Clear all tools from the registry and reset timestamps.
src/pan_mcp_relay/tool_registry.py:185
↓ 3 callers
Function
expand_vars
Expand shell variables of form $var and ${var}.
src/pan_mcp_relay/utils.py:40
↓ 3 callers
Method
scan
( self, source: ScanSource, scan_type: ScanType, prompt: str, response
src/pan_mcp_relay/security_scanner.py:158
↓ 3 callers
Method
update_hash_mapping
Update the hash-to-tool mapping for quick lookups.
src/pan_mcp_relay/tool_registry.py:114
↓ 2 callers
Method
_initialize
Initialize the relay server and register all tools.
src/pan_mcp_relay/pan_security_relay.py:126
↓ 2 callers
Method
_update_tool_registry
Update the tool registry with tools from all configured servers.
src/pan_mcp_relay/pan_security_relay.py:164
↓ 2 callers
Method
call_tool
Invoke a tool by name with optional arguments.
examples/clients/stdio/pan_security_relay_stdio_client.py:134
↓ 2 callers
Function
check_unexpanded_dict
Check for unexpanded environment variables in a dictionary
src/pan_mcp_relay/configuration.py:93
↓ 2 callers
Method
cleanup
Clean up the session and subprocess resources.
examples/clients/stdio/pan_security_relay_stdio_client.py:119
↓ 2 callers
Method
debug_enabled
(self)
src/pan_mcp_relay/configuration.py:282
↓ 2 callers
Method
get_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 callers
Function
get_loglevel
(**kwargs)
src/pan_mcp_relay/main.py:109
↓ 2 callers
Method
list_tools
List available tools, with optional refresh from the server.
examples/clients/stdio/pan_security_relay_stdio_client.py:125
↓ 2 callers
Function
serverinfo_str
(serverinfo: types.Implementation)
src/pan_mcp_relay/client/session_group.py:32
↓ 2 callers
Method
update_available_tools
Update the available tools list with only enabled tools.
src/pan_mcp_relay/tool_registry.py:103
↓ 1 callers
Method
_initialize_relay_clients
Collect tools from all configured downstream servers.
src/pan_mcp_relay/pan_security_relay.py:183
↓ 1 callers
Method
_scan_tools
(self, tools: dict[str, types.Tool])
src/pan_mcp_relay/pan_security_relay.py:210
↓ 1 callers
Method
_validate_tool_limits
Additional validation of tool limits and constraints.
src/pan_mcp_relay/pan_security_relay.py:257
↓ 1 callers
Method
ai_profile
(self)
src/pan_mcp_relay/security_scanner.py:130
↓ 1 callers
Method
call_tool
( name: str, arguments: dict )
src/pan_mcp_relay/pan_security_relay.py:287
↓ 1 callers
Method
check_required
(self)
src/pan_mcp_relay/configuration.py:335
↓ 1 callers
Function
check_unexpanded_list
(items: list[Any])
src/pan_mcp_relay/configuration.py:82
↓ 1 callers
Function
clean_values
(data: T)
src/pan_mcp_relay/main.py:524
↓ 1 callers
Function
cli
Run the MCP Relay Server.
src/pan_mcp_relay/main.py:261
↓ 1 callers
Method
compute_hash
Compute SHA256 hash of tool identity fields. Returns: SHA256 hash string.
src/pan_mcp_relay/tool.py:83
↓ 1 callers
Method
connect
Establish connection to the relay subprocess via stdio transport.
examples/clients/stdio/pan_security_relay_stdio_client.py:94
↓ 1 callers
Method
connect_to_server_with_name
Connects to a single MCP server.
src/pan_mcp_relay/client/session_group.py:88
↓ 1 callers
Function
deep_merge
(original: dict[K, V], *updaters: dict[K, V])
src/pan_mcp_relay/utils.py:52
↓ 1 callers
Function
entrypoint
Entrypoint for the MCP relay server.
src/pan_mcp_relay/main.py:135
↓ 1 callers
Function
expand_path
Normnalize, Expands environment variables and converts a path string to Path object.
src/pan_mcp_relay/utils.py:27
↓ 1 callers
Function
find_config_file
(config_path: Path | None)
src/pan_mcp_relay/main.py:509
↓ 1 callers
Method
get_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 callers
Function
get_logger
(name: str)
src/pan_mcp_relay/utils.py:63
↓ 1 callers
Method
get_server_info
Fetch downstream server information via the special tool.
examples/clients/stdio/pan_security_relay_stdio_client.py:148
↓ 1 callers
Method
get_server_name_by_tool
(self, name: str)
src/pan_mcp_relay/client/session_group.py:68
↓ 1 callers
Method
get_server_params
(self)
src/pan_mcp_relay/client/client.py:50
↓ 1 callers
Method
get_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 callers
Function
getenv
(key: str, masked: bool = False)
src/pan_mcp_relay/utils.py:45
↓ 1 callers
Function
interactive_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 callers
Function
load_config_file
(config_path)
src/pan_mcp_relay/main.py:535
↓ 1 callers
Function
load_dotenvs
(dotenv_search: str | None, dotenv_src: ParameterSource)
src/pan_mcp_relay/main.py:483
↓ 1 callers
Method
log_level_name
Log level name. One of: NOTSET, DEBUG, INFO, WARNING, ERROR, CRITICAL.
src/pan_mcp_relay/configuration.py:278
↓ 1 callers
Function
main
Main entry point for the command-line interface.
examples/clients/stdio/pan_security_relay_stdio_client.py:195
↓ 1 callers
Method
mcp_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 callers
Method
metadata
(self)
src/pan_mcp_relay/security_scanner.py:145
↓ 1 callers
Function
set_loglevels
Configure Log Levels for libraries
src/pan_mcp_relay/main.py:96
↓ 1 callers
Function
setup_http_server
Set up a Starlette HTTP Server for MCP Streamable HTTP Transport
src/pan_mcp_relay/server/server.py:103
↓ 1 callers
Function
setup_logging
Initialize logging.
src/pan_mcp_relay/main.py:77
↓ 1 callers
Function
setup_sse_server
Set up a Starlette HTTP Server for MCP SSE Transport
src/pan_mcp_relay/server/server.py:71
↓ 1 callers
Method
shutdown
(self)
src/pan_mcp_relay/pan_security_relay.py:143
↓ 1 callers
Function
start_mcp_relay_server
Initialize and Start the MCP Relay
src/pan_mcp_relay/main.py:444
↓ 1 callers
Method
to_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 callers
Function
user_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
Method
auth_flow
(self, request)
src/pan_mcp_relay/security_scanner.py:58
Method
call_tool
(self, name: str, args: dict[str, Any])
src/pan_mcp_relay/client/session_group.py:59
Method
check_required
(self)
src/pan_mcp_relay/configuration.py:145
Method
check_required
(self)
src/pan_mcp_relay/configuration.py:199
Method
check_required
Validate final configuration for required variables
src/pan_mcp_relay/configuration.py:299
Function
completion
Generate shell autocompletion script for the specified shell.
src/pan_mcp_relay/main.py:425
Method
component_name_hook
Custom Component Name Hook for ClientSessionGroup base class
src/pan_mcp_relay/client/session_group.py:75
Method
connect_to_server
(self, server_params: ServerParameters)
src/pan_mcp_relay/client/session_group.py:84
Function
echo_server_config
Create echo server configuration for testing.
tests/test_downstream_mcp_client.py:43
Function
echo_tool
Create echo tool that returns input.
tests/test_tool_registry.py:41
Function
echo_tool_data
Create echo tool data for testing.
tests/test_tool.py:55
Function
echo_tool_schema
Create sample input schema for echo tool.
tests/test_tool.py:37
Function
error_all_tool
Create tool that always returns isError=True.
tests/test_tool_registry.py:53
Function
error_all_tool_data
Create error_all_tool data for testing.
tests/test_tool.py:254
next →
1–100 of 304, ranked by callers