Skip to main content
Glama

ESPN MCP Server

markdown.jsβ€’1.16 kB
import * as fs from 'fs'; import * as path from 'path'; import { format } from 'date-fns'; export function exportToMarkdown(content, type, league) { // Create a timestamp in a format suitable for filenames const timestamp = format(new Date(), 'yyyy-MM-dd-HHmm'); const filename = `${league}_${type}_${timestamp}.md`; // Create exports directory in the project root const exportDir = path.join(process.env.USERPROFILE || process.env.HOME || '.', 'Downloads'); if (!fs.existsSync(exportDir)) { fs.mkdirSync(exportDir, { recursive: true }); } // Add metadata to the content const metadata = `--- league: ${league} type: ${type} generated: ${format(new Date(), 'MMMM d, yyyy h:mm a')} ---\n\n`; const finalContent = metadata + content; const filepath = path.join(exportDir, filename); fs.writeFileSync(filepath, finalContent); return filepath; } export function createMarkdownTitle(type, league) { const date = format(new Date(), 'MMMM d, yyyy'); let title = `# ${league} ${type.charAt(0).toUpperCase() + type.slice(1)}\n\n`; title += `*Generated on ${date}*\n\n`; return title; }

Latest Blog Posts

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/DynamicEndpoints/espn-mcp'

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