We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/CaullenOmdahl/Tailwind-Svelte-Assistant'
If you have feedback or need assistance with the MCP directory API, please join our Discord server
#!/usr/bin/env node
/**
* Local test script for MCP server
* Tests that all tools are registered and documentation files exist
*/
import { fileURLToPath } from 'url';
import { dirname, join } from 'path';
import { existsSync, statSync } from 'fs';
const __filename = fileURLToPath(import.meta.url);
const __dirname = dirname(__filename);
console.log('π§ͺ Testing Tailwind Svelte Assistant MCP Server\n');
// Test 1: Check build exists
console.log('1οΈβ£ Checking build...');
const buildPath = join(__dirname, '.smithery', 'index.cjs');
if (!existsSync(buildPath)) {
console.error('β Build file not found at:', buildPath);
process.exit(1);
}
const buildStats = statSync(buildPath);
console.log(`β
Build exists: ${(buildStats.size / 1024 / 1024).toFixed(2)} MB`);
// Test 2: Check documentation files
console.log('\n2οΈβ£ Checking documentation files...');
const svelteDocsPath = join(__dirname, 'content', 'docs', 'svelte-sveltekit-full.txt');
const tailwindDocsPath = join(__dirname, 'content', 'docs', 'tailwind-docs-full.txt');
if (!existsSync(svelteDocsPath)) {
console.error('β Svelte docs not found at:', svelteDocsPath);
process.exit(1);
}
const svelteStats = statSync(svelteDocsPath);
console.log(`β
Svelte docs: ${(svelteStats.size / 1024 / 1024).toFixed(2)} MB`);
if (!existsSync(tailwindDocsPath)) {
console.error('β Tailwind docs not found at:', tailwindDocsPath);
process.exit(1);
}
const tailwindStats = statSync(tailwindDocsPath);
console.log(`β
Tailwind docs: ${(tailwindStats.size / 1024 / 1024).toFixed(2)} MB`);
// Test 3: Verify tools in build
console.log('\n3οΈβ£ Verifying new tools in build...');
import { readFileSync } from 'fs';
const buildContent = readFileSync(buildPath, 'utf-8');
const expectedTools = [
'get_svelte_full_docs',
'get_tailwind_full_docs',
'search_svelte_docs',
'search_tailwind_docs',
'get_sveltekit_doc',
'get_tailwind_info',
'get_component_snippet',
'list_snippet_categories',
'list_snippets_in_category',
'list_sveltekit_topics',
'list_tailwind_info_topics'
];
let allFound = true;
for (const tool of expectedTools) {
const found = buildContent.includes(`"${tool}"`);
const emoji = found ? 'β
' : 'β';
console.log(`${emoji} ${tool}`);
if (!found) allFound = false;
}
if (!allFound) {
console.error('\nβ Some tools are missing from the build!');
process.exit(1);
}
// Test 4: Check snippets
console.log('\n4οΈβ£ Checking component snippets...');
const snippetsPath = join(__dirname, 'content', 'snippets');
if (!existsSync(snippetsPath)) {
console.error('β Snippets directory not found');
process.exit(1);
}
import { readdirSync } from 'fs';
const categories = readdirSync(snippetsPath, { withFileTypes: true })
.filter(dirent => dirent.isDirectory())
.map(dirent => dirent.name);
console.log(`β
Found ${categories.length} snippet categories`);
console.log(` Categories: ${categories.join(', ')}`);
// Summary
console.log('\n' + '='.repeat(50));
console.log('π Test Summary');
console.log('='.repeat(50));
console.log(`β
Build: ${(buildStats.size / 1024 / 1024).toFixed(2)} MB`);
console.log(`β
Svelte docs: ${(svelteStats.size / 1024 / 1024).toFixed(2)} MB`);
console.log(`β
Tailwind docs: ${(tailwindStats.size / 1024 / 1024).toFixed(2)} MB`);
console.log(`β
Tools: ${expectedTools.length} registered`);
console.log(`β
Snippets: ${categories.length} categories`);
console.log('\nπ All tests passed! Server is ready for deployment.\n');