Skip to main content
Glama
test_list_clusters.py•901 B
#!/usr/bin/env python3 """Test the list_clusters tool directly.""" import asyncio from mcp.client.stdio import stdio_client, StdioServerParameters from mcp.client.session import ClientSession async def test_list_clusters(): server_params = StdioServerParameters( command="python", args=["cnpg_mcp_server.py"], ) async with stdio_client(server_params) as (read, write): async with ClientSession(read, write) as session: await session.initialize() print("šŸ“‹ Calling list_postgres_clusters tool...") result = await session.call_tool( "list_postgres_clusters", arguments={} ) print("\n" + "="*60) for content in result.content: print(content.text) print("="*60) if __name__ == "__main__": asyncio.run(test_list_clusters())

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/helxplatform/cnpg-mcp'

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