Skip to main content
Glama

MySQL Hub MCP Server

by CHOIJun-0613
test_endpoint.py932 B
import requests import json def test_natural_language_query(): url = "http://localhost:8000/database/natural-query" headers = {"Content-Type": "application/json"} data = {"question": "사용자 목록을 검색해줘"} try: response = requests.post(url, headers=headers, json=data) print(f"Status Code: {response.status_code}") print(f"Response: {response.text}") if response.status_code == 200: result = response.json() print(f"Success: {result.get('success')}") if result.get('success'): print(f"SQL Query: {result.get('data', {}).get('sql_query')}") print(f"Result: {result.get('data', {}).get('result')}") else: print(f"Error: {result.get('error')}") except Exception as e: print(f"Error: {e}") if __name__ == "__main__": test_natural_language_query()

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/CHOIJun-0613/mysql-hub-mcp'

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