Skip to main content
Glama

MCP Orchestration Server

mock-image.js1.68 kB
// A simple mock image processing function that always returns a successful response exports.handler = async function(event, context) { // Handle OPTIONS requests for CORS if (event.httpMethod === 'OPTIONS') { return { statusCode: 200, headers: { 'Access-Control-Allow-Origin': '*', 'Access-Control-Allow-Headers': 'Content-Type, Accept, Authorization', 'Access-Control-Allow-Methods': 'GET, POST, PUT, DELETE, OPTIONS', 'Access-Control-Max-Age': '86400', }, body: '', }; } // Only handle POST requests if (event.httpMethod !== 'POST') { return { statusCode: 405, headers: { 'Content-Type': 'application/json', 'Access-Control-Allow-Origin': '*', }, body: JSON.stringify({ error: 'Method not allowed', message: 'Only POST requests are allowed' }), }; } // Create a mock response const mockResponse = { extracted_text: "This is a mock response from the Netlify function. In a real application, this would contain text extracted from an image.", agent_result: { agent: "ArchiveSearchAgent", input: { document_text: "This is a mock response from the Netlify function." }, metadata: { source_file: "mock_response.txt", processed_at: new Date().toISOString() }, output: "No matches found.", timestamp: new Date().toISOString() } }; // Return the mock response return { statusCode: 200, headers: { 'Content-Type': 'application/json', 'Access-Control-Allow-Origin': '*', }, body: JSON.stringify(mockResponse), }; };

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/Nisarg-123-web/MCP2'

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