get_current_user
Retrieve details of the currently authenticated user within the SD Elements MCP Server, enabling seamless integration with the security development lifecycle platform.
Instructions
Get information about the currently authenticated user
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Implementation Reference
- src/sde_mcp_server/tools/users.py:35-42 (handler)The core handler function for the 'get_current_user' tool. Decorated with @mcp.tool() for automatic registration with the FastMCP server. It retrieves the current authenticated user via the API client and returns the result as formatted JSON.@mcp.tool() async def get_current_user(ctx: Context) -> str: """Get current authenticated user""" global api_client if api_client is None: api_client = init_api_client() result = api_client.get_current_user() return json.dumps(result, indent=2)
- src/sde_mcp_server/server.py:296-296 (registration)Import statement in the main server file that loads the tools module, which in turn imports users.py and registers the get_current_user tool via its decorator.from . import tools # noqa: F401
- src/sde_mcp_server/tools/__init__.py:7-7 (registration)Wildcard import of the users module, which executes the @mcp.tool() decorator on get_current_user, registering the tool.from .users import *