Skip to main content
Glama

MCP Server Box

MIT License
51
  • Apple
  • Linux
from contextlib import asynccontextmanager from dataclasses import dataclass from typing import AsyncIterator from box_ai_agents_toolkit import BoxClient, get_ccg_client, get_oauth_client from mcp.server.fastmcp import FastMCP @dataclass class BoxContext: client: BoxClient | None = None @asynccontextmanager async def box_lifespan_oauth(server: FastMCP) -> AsyncIterator[BoxContext]: """Manage Box client lifecycle with OAuth handling""" try: client = get_oauth_client() yield BoxContext(client=client) finally: # Cleanup (if needed) pass @asynccontextmanager async def box_lifespan_ccg(server: FastMCP) -> AsyncIterator[BoxContext]: """Manage Box client lifecycle with CCG handling""" try: client = get_ccg_client() yield BoxContext(client=client) finally: # Cleanup (if needed) pass

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/box-community/mcp-server-box'

If you have feedback or need assistance with the MCP directory API, please join our Discord server