API Reference
This section contains the auto-generated API reference for the AegisMCP framework.
AegisMCP Application
aegismcp.server.app
AegisMCP
Source code in aegismcp\server\app.py
run_stdio() -> None
async
Run the server using stdio transport.
Source code in aegismcp\server\app.py
tool(**kwargs: Any) -> Callable[[Callable[..., Any]], Callable[..., Any]]
Register a tool. Delegates to the @tool decorator.
Source code in aegismcp\server\app.py
Security Context
aegismcp.kernel.context
AegisContext
dataclass
The frozen, explicitly-propagated value object that carries request state.
This solves tracing, security, testing, and debugging simultaneously.
Source code in aegismcp\kernel\context.py
with_deadline(new_deadline: datetime) -> AegisContext
Return a new context with a tighter deadline (cannot extend).
Source code in aegismcp\kernel\context.py
with_metadata(new_metadata: Mapping[str, Any]) -> AegisContext
Return a new context with merged metadata.
with_span(new_span_id: str) -> AegisContext
Identity
dataclass
Represents the authenticated caller identity.
Source code in aegismcp\kernel\context.py
create_anonymous_context(request_id: str, trace_id: str, span_id: str, deadline: datetime) -> AegisContext
Create a context for an unauthenticated request.
Source code in aegismcp\kernel\context.py
Tools
aegismcp.tools.descriptor
aegismcp.tools.decorator
tool(name: str | None = None, description: str | None = None, timeout: float = 30.0, max_retries: int = 0, retry_delay: float = 1.0, is_idempotent: bool = False, permissions: frozenset[str] = frozenset(), audit: str = 'METADATA', cache_ttl: int | None = None, tags: list[str] | None = None) -> Callable[[Callable[..., Any]], Callable[..., Any]]
Decorator to register a function as an MCP tool.