diff --git a/src/index.ts b/src/index.ts index 53ab6af..7c0a90c 100644 --- a/src/index.ts +++ b/src/index.ts @@ -238,12 +238,21 @@ async function main() { const splashPath = path.join(srcStaticDir, 'index.html'); let html = fs.readFileSync(splashPath, 'utf8'); - // Inject example server endpoints - const exampleServersHtml = AVAILABLE_EXAMPLES.map(slug => ` -
- POST - /${slug}/mcp - ${formatServerName(slug)} MCP App Server -
`).join(''); + // Inject example server endpoints with copy buttons + const exampleServersHtml = AVAILABLE_EXAMPLES.map(slug => { + const fullUrl = `${config.baseUri}/${slug}/mcp`; + return ` +
+
+ POST + /${slug}/mcp - ${formatServerName(slug)} MCP App Server +
+ +
`; + }).join(''); html = html.replace('', exampleServersHtml); res.send(html); diff --git a/src/static/index.html b/src/static/index.html index 0def907..cfc49df 100644 --- a/src/static/index.html +++ b/src/static/index.html @@ -97,9 +97,30 @@

MCP App Example Servers

+ + \ No newline at end of file diff --git a/src/static/styles.css b/src/static/styles.css index a7e7125..21a7d58 100644 --- a/src/static/styles.css +++ b/src/static/styles.css @@ -117,6 +117,44 @@ h1 { gap: 1rem; } +.endpoint-with-copy { + justify-content: space-between; +} + +.endpoint-info { + display: flex; + align-items: center; + gap: 1rem; + flex: 1; +} + +.copy-btn { + background: #000000; + color: #ffffff; + border: none; + padding: 0.4rem 0.75rem; + font-family: inherit; + font-size: 0.85rem; + cursor: pointer; + transition: all 0.2s ease; + display: flex; + align-items: center; + gap: 0.4rem; +} + +.copy-btn:hover { + background: #333333; +} + +.copy-btn.copied { + background: #009900; +} + +.copy-btn svg { + width: 14px; + height: 14px; +} + .method { font-weight: bold; min-width: 80px;