Skip to main content
Glama
philschmid

Code Sandbox MCP Server

by philschmid
test_gemini.py856 B
from fastmcp import Client from google import genai import asyncio mcp_client = Client( { "local_server": { "transport": "stdio", "command": "code-sandbox-mcp", } } ) gemini_client = genai.Client() async def main(): async with mcp_client: response = await gemini_client.aio.models.generate_content( model="gemini-2.5-flash", contents="Use Python to ping the google.com website and return the response time.", config=genai.types.GenerateContentConfig( temperature=0, tools=[mcp_client.session], # Pass the FastMCP client session ), ) print(response.text) print("Tool Calls:") print(response.automatic_function_calling_history) if __name__ == "__main__": asyncio.run(main())

Latest Blog Posts

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/philschmid/code-sandbox-mcp'

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