We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/yerininin/F_MCP'
If you have feedback or need assistance with the MCP directory API, please join our Discord server
import esbuild from 'esbuild';
import fs from 'fs';
// Ensure dist exists
if (!fs.existsSync('dist')) {
fs.mkdirSync('dist');
}
// Build main code
await esbuild.build({
entryPoints: ['src/code.ts'],
bundle: true,
outfile: 'dist/code.js',
platform: 'neutral',
target: 'es2015',
logLevel: 'info',
});
// Build UI script
const uiResult = await esbuild.build({
entryPoints: ['src/ui.ts'],
bundle: true,
write: false,
platform: 'browser',
target: 'es2015',
});
const uiScript = uiResult.outputFiles[0].text;
// UI HTML with MCP server connection
const html = `<!DOCTYPE html>
<html>
<head>
<style>
* { box-sizing: border-box; margin: 0; padding: 0; }
body {
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
padding: 16px;
background: #fff;
}
h3 {
font-size: 14px;
font-weight: 600;
margin-bottom: 12px;
color: #333;
}
.info-row {
display: flex;
justify-content: space-between;
align-items: center;
padding: 8px 0;
border-bottom: 1px solid #eee;
font-size: 12px;
}
.info-row:last-child { border-bottom: none; }
.label { color: #666; }
.value { color: #333; font-weight: 500; }
#status {
margin: 16px 0;
padding: 12px;
background: #f5f5f5;
border-radius: 6px;
font-size: 12px;
color: #27ae60;
text-align: center;
}
#toggle-btn {
width: 100%;
padding: 12px;
font-size: 14px;
font-weight: 500;
background: #e74c3c;
color: white;
border: none;
border-radius: 6px;
cursor: pointer;
transition: background 0.2s;
}
#toggle-btn:hover { opacity: 0.9; }
.footer {
margin-top: 16px;
font-size: 10px;
color: #999;
text-align: center;
}
</style>
</head>
<body>
<h3>Claude Code 연결</h3>
<div class="info-row">
<span class="label">서버</span>
<span class="value" id="server-url">http://localhost:3001</span>
</div>
<div class="info-row">
<span class="label">실행된 명령</span>
<span class="value" id="command-count">0</span>
</div>
<p id="status">연결 중...</p>
<button id="toggle-btn">중지</button>
<p class="footer">0.5초마다 명령 확인</p>
<script>${uiScript}</script>
</body>
</html>`;
fs.writeFileSync('dist/ui.html', html);
console.log('Build complete!');