Skip to main content
Glama
869413421

MCP Location Server

by 869413421
test_mcp_client.py733 B
import pytest from mcp.client.session import ClientSession from mcp.client.stdio import StdioServerParameters, stdio_client @pytest.mark.asyncio async def test_mcp_server(): async with stdio_client( StdioServerParameters(command="uv", args=["run", "build_mcp"]) ) as (read, write): print("启动服务端...") async with ClientSession(read, write) as session: await session.initialize() print("初始化完成") tools = await session.list_tools() print("可用工具:", tools) assert hasattr(tools, "tools") assert isinstance(tools.tools, list) assert any(tool.name == "locate_ip" for tool in tools.tools)

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/869413421/build_mcp'

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