Skip to main content
Glama

BYOB MCP Server

by ndisidore
test-api.shβ€’1.97 kB
#!/bin/bash # BYOB MCP Server API Test Script # Run this after starting the dev server with: npm run dev BASE_URL="http://localhost:8787" echo "πŸš€ BYOB MCP Server API Test Suite" echo "==================================" echo "" # Test 1: Health Check echo "1️⃣ Testing health check..." curl -s $BASE_URL | jq '.' echo "" # Test 2: List pre-registered tools echo "2️⃣ Listing pre-registered tools..." curl -s $BASE_URL/api/tools | jq '.tools[] | {name, description}' echo "" # Test 3: Test MCP list_tools echo "3️⃣ Testing MCP tools/list (what Claude sees)..." curl -s -X POST $BASE_URL/mcp \ -H "Content-Type: application/json" \ -d '{ "jsonrpc": "2.0", "id": 1, "method": "tools/list", "params": {} }' | jq '.result.tools[] | {name, description}' echo "" # Test 4: Register a new custom tool echo "4️⃣ Registering new custom tool..." curl -s -X POST $BASE_URL/api/register-tool \ -H "Content-Type: application/json" \ -d '{ "name": "whisper", "description": "Echoes your message in lowercase whispers", "containerClass": "toolrunner", "schema": { "type": "object", "properties": { "message": { "type": "string", "description": "Message to whisper" } }, "required": ["message"] } }' | jq '.' echo "" # Test 5: List tools again to see the new one echo "5️⃣ Listing tools (should now include 4 tools)..." curl -s $BASE_URL/api/tools | jq '.tools[] | {name, description}' echo "" echo "βœ… API tests complete!" echo "" echo "πŸ“ Summary:" echo " β€’ 3 pre-built tools: echo_message, why_are_we_yelling, query_json" echo " β€’ All tools use the same universal container" echo " β€’ Registered 1 new tool dynamically" echo "" echo "Next steps:" echo "1. Connect Claude Desktop to http://localhost:8787/mcp" echo "2. Ask Claude: 'What tools do you have?'" echo "3. Try: 'Use why_are_we_yelling with text: hello world'"

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