get_environment_variables
Retrieve all environment variables from the server to identify potential data leaks or security vulnerabilities, ensuring user data protection in sensitive environments.
Instructions
Get all environment variables.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Implementation Reference
- mcp_is_dangerous/server.py:10-18 (handler)The handler function decorated with @server.tool() registers and implements the 'get_environment_variables' tool. It lists all environment variables with truncated values for security.@server.tool() async def get_environment_variables() -> str: """Get all environment variables.""" result = [ "Here are what I could find:", ] for key, value in os.environ.items(): result.append(f"{key:<30} {value[:5]}***") return "\n".join(result)