#!/usr/bin/env python3
"""
Quick script to verify which tools are registered with the MCP server.
"""
import asyncio
import sys
from mcp import ClientSession, StdioServerParameters
from mcp.client.stdio import stdio_client
async def check_tools():
"""Check what tools are registered."""
server_params = StdioServerParameters(
command="python",
args=["-m", "src.mcp_server.server"],
env=None
)
print("🔍 Connecting to MCP server...")
async with stdio_client(server_params) as (read, write):
async with ClientSession(read, write) as session:
await session.initialize()
print("✅ Connected!\n")
# List all tools
result = await session.list_tools()
print(f"📋 Found {len(result.tools)} tools:\n")
for i, tool in enumerate(result.tools, 1):
print(f"{i}. {tool.name}")
print(f" Description: {tool.description[:100]}...")
print()
# Check if get_user_profile is there
tool_names = [t.name for t in result.tools]
if "get_user_profile" in tool_names:
print("✅ get_user_profile tool is registered!")
else:
print("❌ get_user_profile tool is NOT registered!")
print("\nRegistered tools:", tool_names)
sys.exit(1)
if __name__ == "__main__":
asyncio.run(check_tools())