Skip to main content
Glama
test-graphql.jsβ€’1.18 kB
#!/usr/bin/env node import { GraphQLClient } from 'graphql-request'; const apiKey = process.env.TWENTY_API_KEY; const baseUrl = process.env.TWENTY_BASE_URL || 'https://twenty.app.jezweb.com'; const client = new GraphQLClient(`${baseUrl}/graphql`, { headers: { 'Authorization': `Bearer ${apiKey}`, 'Content-Type': 'application/json', }, }); // Try different metadata queries to find the right one const queries = [ { name: 'objects', query: '{ objects { edges { node { id nameSingular namePlural } } } }' }, { name: 'objectMetadatas', query: '{ objectMetadatas { edges { node { id nameSingular namePlural } } } }' }, { name: '__schema', query: '{ __schema { types { name fields { name type { name } } } } }' } ]; async function testQueries() { for (const { name, query } of queries) { try { console.log(`\nπŸ” Testing query: ${name}`); const result = await client.request(query); console.log(`βœ… SUCCESS for ${name}:`, JSON.stringify(result, null, 2)); break; // Stop at first successful query } catch (error) { console.log(`❌ FAILED for ${name}:`, error.message); } } } testQueries().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/jezweb/twenty-mcp'

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