Skip to main content
Glama
EOSC-Data-Commons

EOSC Data Commons Search

Official
try_mcp.py728 B
# /// script # requires-python = ">=3.10" # dependencies = ["mcp"] # /// import asyncio from mcp import ClientSession from mcp.client.streamable_http import streamablehttp_client async def main() -> None: mcp_url = "http://localhost:8000/mcp" async with ( streamablehttp_client(mcp_url) as ( read_stream, write_stream, _, ), ClientSession(read_stream, write_stream) as session, ): # Initialize the connection await session.initialize() # List available tools tools = await session.list_tools() print(f"Available tools: {[tool.name for tool in tools.tools]}") 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/EOSC-Data-Commons/data-commons-search'

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