import { NextResponse } from 'next/server';
import { getDb } from '@/lib/db';
export async function GET() {
try {
// Get the database connection
const db = getDb();
// Check if there are any articles in the database
const count = db.prepare('SELECT COUNT(*) as count FROM articles').get() as { count: number };
return NextResponse.json({
hasArticles: count.count > 0
});
} catch (error) {
console.error('Error checking articles:', error);
return NextResponse.json(
{ error: 'Failed to check articles', hasArticles: false },
{ status: 500 }
);
}
}
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/mshk/mcp-rss-crawler'
If you have feedback or need assistance with the MCP directory API, please join our Discord server