Skip to main content
Glama

Unsplash API MCP Server

test_mcp_jsonrpc.py844 B
import requests import json def test_mcp_tools(): """Test that MCP tools are properly registered using the JSON-RPC endpoint.""" response = requests.post( "http://localhost:8000/mcp/jsonrpc", json={ "jsonrpc": "2.0", "id": 1, "method": "mcp.list_tools", "params": {} } ) if response.status_code == 200: result = response.json() if "error" in result: print(f"Error: {result['error']}") else: tools = result.get("result", []) print(f"Found {len(tools)} tools:") for tool in tools: print(f"- {tool.get('name')}: {tool.get('description')}") else: print(f"Error: {response.status_code} - {response.text}") if __name__ == "__main__": test_mcp_tools()

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/gzpaitch/Unsplash-MCP'

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