Skip to main content
Glama

SpiderFoot MCP Server

test-header-case.js1.38 kB
// Test script to verify header case sensitivity import http from 'http'; const TEST_CASES = [ 'mcp-session-id', 'MCP-Session-Id', 'mcp-session-ID', 'Mcp-Session-Id', 'MCP-SESSION-ID' ]; async function testHeaderCase(headerName) { const postData = JSON.stringify({ jsonrpc: '2.0', method: 'mcp.list_tools', params: {}, id: 1 }); const options = { hostname: 'localhost', port: 5002, path: '/mcp', method: 'POST', headers: { 'Content-Type': 'application/json', 'Accept': 'application/json, text/event-stream', 'Content-Length': Buffer.byteLength(postData), [headerName]: 'test-session-123', 'Connection': 'close' } }; console.log(`\nTesting with header: ${headerName}`); return new Promise((resolve) => { const req = http.request(options, (res) => { let data = ''; res.on('data', (chunk) => { data += chunk; }); res.on('end', () => { console.log(`Status: ${res.statusCode}`); console.log('Response:', data.trim()); resolve(); }); }); req.on('error', (error) => { console.error('Request error:', error); resolve(); }); req.write(postData); req.end(); }); } async function runTests() { for (const header of TEST_CASES) { await testHeaderCase(header); } } runTests().catch(console.error);

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/CorbettCajun/Spiderfoot-MCP-Server'

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