Skip to main content
Glama

BYOB MCP Server

by ndisidore
test-mcp.shβ€’2.45 kB
#!/bin/bash # Test MCP Protocol Endpoints # Run this after starting the dev server with: npm run dev BASE_URL="http://localhost:8787" echo "πŸ§ͺ Testing MCP Protocol Endpoints" echo "==================================" echo "" # Test 1: Initialize connection echo "1️⃣ Testing initialize..." curl -s -X POST $BASE_URL/mcp \ -H "Content-Type: application/json" \ -d '{ "jsonrpc": "2.0", "id": 1, "method": "initialize", "params": { "protocolVersion": "2024-11-05", "capabilities": {}, "clientInfo": { "name": "test-client", "version": "1.0.0" } } }' | jq '.' echo "" # Test 2: List available tools echo "2️⃣ Testing tools/list..." curl -s -X POST $BASE_URL/mcp \ -H "Content-Type: application/json" \ -d '{ "jsonrpc": "2.0", "id": 2, "method": "tools/list", "params": {} }' | jq '.' echo "" # Test 3: Call echo_message tool echo "3️⃣ Testing tools/call - echo_message..." curl -s -X POST $BASE_URL/mcp \ -H "Content-Type: application/json" \ -d '{ "jsonrpc": "2.0", "id": 3, "method": "tools/call", "params": { "name": "echo_message", "arguments": { "message": "Hello from MCP test!" } } }' | jq '.' echo "" # Test 4: Call why_are_we_yelling tool echo "4️⃣ Testing tools/call - why_are_we_yelling..." curl -s -X POST $BASE_URL/mcp \ -H "Content-Type: application/json" \ -d '{ "jsonrpc": "2.0", "id": 4, "method": "tools/call", "params": { "name": "why_are_we_yelling", "arguments": { "text": "this will be loud" } } }' | jq '.' echo "" # Test 5: Call query_json tool echo "5️⃣ Testing tools/call - query_json..." curl -s -X POST $BASE_URL/mcp \ -H "Content-Type: application/json" \ -d '{ "jsonrpc": "2.0", "id": 5, "method": "tools/call", "params": { "name": "query_json", "arguments": { "filter": ".users[] | select(.age > 25)", "data": { "users": [ {"name": "Alice", "age": 30}, {"name": "Bob", "age": 20}, {"name": "Charlie", "age": 35} ] } } } }' | jq '.' echo "" echo "βœ… MCP protocol tests complete!" echo "" echo "πŸ“ MCP Methods Tested:" echo " β€’ initialize - Establish MCP connection" echo " β€’ tools/list - Get available tools" echo " β€’ tools/call - Invoke tools with arguments"

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/ndisidore/cf-byob-mcp'

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