Skip to main content
Glama

Simplicate MCP Server

by daanno
test-connection.jsโ€ข3.41 kB
#!/usr/bin/env node /** * Simple test script to verify Simplicate API connection * Run with: node test-connection.js */ require('dotenv').config(); const axios = require('axios'); const API_KEY = process.env.SIMPLICATE_API_KEY; const API_SECRET = process.env.SIMPLICATE_API_SECRET; const BASE_URL = process.env.SIMPLICATE_API_BASE_URL; console.log('๐Ÿงช Testing Simplicate MCP Server Connection\n'); console.log('๐Ÿ“ก API Base URL:', BASE_URL); console.log('๐Ÿ”‘ API Key:', API_KEY ? `${API_KEY.substring(0, 10)}...` : 'โŒ Missing'); console.log('๐Ÿ” API Secret:', API_SECRET ? `${API_SECRET.substring(0, 10)}...` : 'โŒ Missing'); console.log(''); if (!API_KEY || !API_SECRET || !BASE_URL) { console.error('โŒ Missing configuration! Check your .env file.'); process.exit(1); } async function testEndpoint(name, endpoint) { try { console.log(`Testing ${name}...`); const response = await axios.get(`${BASE_URL}${endpoint}`, { headers: { 'Authentication-Key': API_KEY, 'Authentication-Secret': API_SECRET, 'Content-Type': 'application/json', }, params: { limit: 2 }, }); const count = response.data?.data?.length || 0; console.log(` โœ… ${name}: Success (${count} records retrieved)`); return true; } catch (error) { if (error.response) { console.log(` โŒ ${name}: Failed (${error.response.status} ${error.response.statusText})`); if (error.response.status === 401) { console.log(` โ†’ Check your API credentials`); } else if (error.response.status === 404) { console.log(` โ†’ Endpoint may not exist or no data available`); } } else { console.log(` โŒ ${name}: Failed (${error.message})`); } return false; } } async function runTests() { console.log('๐Ÿ” Running API Connection Tests...\n'); const tests = [ ['Projects', '/projects/project'], ['Organizations', '/crm/organization'], ['Persons', '/crm/person'], ['Hours', '/hours/hours'], ['Invoices', '/invoices/invoice'], ]; let passed = 0; let failed = 0; for (const [name, endpoint] of tests) { const result = await testEndpoint(name, endpoint); if (result) passed++; else failed++; console.log(''); } console.log('โ•'.repeat(50)); console.log(`\n๐Ÿ“Š Test Results: ${passed} passed, ${failed} failed\n`); if (failed === 0) { console.log('๐ŸŽ‰ All tests passed! Your MCP server is ready to use.\n'); console.log('Next steps:'); console.log(' 1. Add configuration to Claude Desktop'); console.log(' 2. Restart Claude Desktop'); console.log(' 3. Ask Claude: "Show me all projects from Simplicate"\n'); } else if (passed > 0) { console.log('โš ๏ธ Some tests passed, but others failed.'); console.log(' Check your API credentials and permissions.\n'); } else { console.log('โŒ All tests failed. Please check:'); console.log(' 1. API credentials are correct'); console.log(' 2. API base URL is correct'); console.log(' 3. Network connection is working'); console.log(' 4. API key has necessary permissions\n'); console.log(' Verify at: https://act.simplicate.com/settings/api\n'); } process.exit(failed > 0 ? 1 : 0); } runTests().catch(error => { console.error('\n๐Ÿ’ฅ Unexpected error:', error.message); process.exit(1); });

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/daanno/simplicate-mcp'

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