Skip to main content
Glama

Tavily Web Search MCP Server

test_agent.py1.18 kB
#!/usr/bin/env python3 """ Test script for the LangGraph Agent with MCP Tools """ import asyncio import os from dotenv import load_dotenv from langgraph_agent import SimpleAgentApp load_dotenv() async def test_agent(): """Test the LangGraph agent with various queries""" print("Testing LangGraph Agent with MCP Tools") print("=" * 50) # Check environment variables if not os.getenv("OPENAI_API_KEY"): print("ERROR: OPENAI_API_KEY not found. Please set it in your .env file") return # Create the app app = SimpleAgentApp() # Test queries test_queries = [ "Roll 1d20", "What is the stock price of Apple?", "Search for information about Python programming", ] for i, query in enumerate(test_queries, 1): print(f"\nTest {i}: {query}") print("-" * 30) try: result = await app.process_query(query) print(f"SUCCESS: Test {i} completed successfully") except Exception as e: print(f"ERROR: Test {i} failed: {e}") print() if __name__ == "__main__": asyncio.run(test_agent())

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/neeraj-somani/AIE8-MCP-S13'

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