INNER CODE UNIT · Python
vt_client
google/mcp-security · server/gti/gti_mcp/server.py:44
async def vt_client(ctx: Context) -> AsyncIterator[vt.Client]:
"""Provides a vt.Client instance for the current request."""
client = vt_client_factory(ctx)
try:
yield client
finally:
await client.close_async()
# Create a named server and specify dependencies for deployment and development
server = FastMCP(
"Google Threat Intelligence MCP server",
dependencies=["vt-py"],
stateless_http=stateless)
# Load tools.
from gti_mcp.tools import *