Skip to main content
Glama

Grants Search MCP Server

#!/usr/bin/env python3 """Test HTTP server without Docker""" import subprocess import time import sys import os import signal # Test the HTTP server locally without Docker print("Starting MCP server with HTTP transport (no Docker)...") print("=" * 50) # Set environment variables env = os.environ.copy() env["MCP_TRANSPORT"] = "http" env["PORT"] = "8080" env["API_KEY"] = "YOUR_API_KEY_HERE" env["SIMPLER_GRANTS_API_KEY"] = "YOUR_API_KEY_HERE" env["PYTHONUNBUFFERED"] = "1" # Start the server print("Starting server...") server_process = subprocess.Popen( [sys.executable, "main.py"], env=env, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, text=True, bufsize=1 ) try: # Wait for server to start print("Waiting for server to start...") time.sleep(3) # Monitor output for 10 seconds print("\nServer output:") print("-" * 40) start_time = time.time() while time.time() - start_time < 10: line = server_process.stdout.readline() if line: print(line.strip()) # Check if process has ended if server_process.poll() is not None: print(f"\nServer exited with code: {server_process.returncode}") break print("-" * 40) print("\nTo test the server, run in another terminal:") print(" python3 scripts/test_http_local.py") print("\nPress Ctrl+C to stop the server") # Keep running while True: line = server_process.stdout.readline() if line: print(line.strip()) if server_process.poll() is not None: break time.sleep(0.1) except KeyboardInterrupt: print("\n\nShutting down server...") server_process.terminate() time.sleep(1) if server_process.poll() is None: server_process.kill() print("Server stopped.") except Exception as e: print(f"Error: {e}") server_process.terminate()

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/Tar-ive/grants-mcp'

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