<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>{{TITLE}}</title>
<link rel="icon" type="image/svg+xml" href="/favicon.svg" />
<link rel="stylesheet" href="/main.css" />
</head>
<body>
<div class="app-container">
<main class="main-content">
<header class="top-header">
<div class="logo">
<span class="app-title" style="font-size: 24px; font-weight: bold;">{{TITLE}}</span>
</div>
<div class="header-actions">
<div class="user-avatar">
<img
alt="User"
class="avatar-img"
src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAIAAAACACAYAAADDPmHLAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAGiISURBVHgBnb1Zs2XZcR6Wa+995ztW3arq6qrquYEG0ADZEAmBgMzJclgKS5YZ5oPl8IP9KxzhX+Bw2D/AT7YjbEsPijCtUIRkihRFWCQRAVIUMRNAT9U1T3c489nDcn6ZufZ0zi3AodO4qHvP2WcPa+XK/PLLYbl//A8PgnOOqleQ/5FzJYUQ+F9vH7jqgBDqg/F5kDfqz+VofC8eyOcPoWx8Bx81rimHBDtPvF5JTr7n7KYcheYXcKzcd2l3Z/fh4sdBvi/f49/ry9n92RvN2wj1g9m1L/87kF7fhe937brVLXobhtLed/Xz VdNXt1rtubHdzhVbqUH3O7gWsc3S0Xhft//vMATdm1j1EgBjVFNq80hC59yVFdH4LjRe8/1obrxeRO3ra68JnaeuUV3L24Wt+dRz+efWNS97VnFtN76r5oLfx7PYdcIrPJPO7dJjH+/z89mzxWeo7kMsPEH3fuU+5fPZa+h7uj+B2vn12dV1RP0uG/jqHHnd+r7FtS79vfVZ97pN/dDa+9a38W+3bby2HMB+R/2fLqNaCOo69fnyWyoeqaV4cC01C1FNC+q/1bXi5+K+quOr99K9j7bI+j0+H31Xf4fv2z9d1y+f3V6r+lz5ztJ79rM0xTQ+wNeq+17+u5w/ue/S91z6nPU9+J7t+PjetT13m36c3q9Y4L0U0V6o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AyMS43NDk1SDYuMDAwMTZDNC40ODEzOCAyMS43NDk1IDMuMjUwMTYgMjAuNTE4MyAzLjI1MDE2IDE4Ljk5OTVWMTAuOTk5NUMzLjI1MDE2IDEwLjU4NTMgMy41ODU5NSAxMC4yNDk1IDQuMDAwMTYgMTAuMjQ5NVoiIGZpbGw9ImJsYWNrIi8+Cjwvc3ZnPgo="
alt="Home"
/>
</a>
<span class="separator">›</span>
<a href="/">MCP Server</a>
<span class="separator">›</span>
<span>Home</span>
</div>
<h1 class="settings-title">{{SERVER_NAME}}</h1>
<div class="profile-image-section">
<img
src="https://images.unsplash.com/photo-1671040690726-b78261eff126?q=80&w=1200&auto=format&fit=crop"
alt="Data analytics"
class="profile-image"
/>
<button class="image-toggle">
<span class="toggle-dot"></span>
</button>
</div>
<section class="design-section">
<div class="section-label">Technology</div>
<h3 class="design-title">{{TECH_STACK}}</h3>
<p class="design-description">
{{DESCRIPTION}}
</p>
</section>
<br />
{{CONTENT_HTML}}
</div>
<footer>
<div slot="content">
<div style="display: flex; justify-content: space-between">
<div>
<img
src="/ey-footer.svg"
alt="EY Logo"
style="width: 70px; height: auto"
/>
</div>
<div
style="
display: flex;
justify-content: flex-end;
margin-bottom: 8px;
flex-direction: column;
text-align: right;
"
>
<div style="margin-bottom: 8px">
<a href="#" class="text-link">Privacy Statement</a>
</div>
<div class="body-3-light">
© 2025 EYGM Limited | All Rights Reserved.
</div>
<div class="body-3-light mt-5">
Content within this application is confidential and meant for
EY staff and EY clients only.
</div>
</div>
</div>
</div>
</footer>
</main>
</div>
<script>
var mcpSessionId = null;
function copyCommand(button, command) {
navigator.clipboard.writeText(command).then(
function () {
button.textContent = "Copied!";
button.classList.add("copied");
setTimeout(function () {
button.textContent = "Copy";
button.classList.remove("copied");
}, 2000);
},
function (err) {
console.error("Could not copy text: ", err);
}
);
}
function copyFromPre(button) {
// Get the <pre><code> element next to the button
// Button is inside a flex div, so we need to go up two levels to command-box
var flexDiv = button.parentElement;
var commandBox = flexDiv.parentElement;
var preElement = commandBox.querySelector('pre code');
if (preElement) {
// Get text content, skip the first line (comment)
var fullText = preElement.textContent;
var lines = fullText.split('\n');
// Skip first line if it starts with #
var command = lines[0].startsWith('#') ? lines.slice(1).join('\n').trim() : fullText.trim();
// Replace YOUR_SESSION_ID with actual session ID if available
console.log('Current session ID:', mcpSessionId);
console.log('Command before replacement:', command.substring(0, 200));
if (mcpSessionId && command.includes('YOUR_SESSION_ID')) {
command = command.replace(/YOUR_SESSION_ID/g, mcpSessionId);
console.log('Command after replacement:', command.substring(0, 200));
} else if (!mcpSessionId) {
console.warn('No session ID available. Click "Initialize & Get Session" first.');
}
navigator.clipboard.writeText(command).then(
function () {
button.textContent = "Copied!";
button.classList.add("copied");
setTimeout(function () {
button.textContent = "Copy";
button.classList.remove("copied");
}, 2000);
},
function (err) {
console.error("Could not copy text: ", err);
}
);
}
}
function executeInitialize(button) {
button.textContent = "Running...";
button.disabled = true;
// Use relative URL to work with any host
var url = '/mcp';
var payload = JSON.stringify({
"jsonrpc": "2.0",
"id": 1,
"method": "initialize",
"params": {
"protocolVersion": "2024-11-05",
"capabilities": {},
"clientInfo": {
"name": "curl-test",
"version": "1.0.0"
}
}
});
if (url && payload) {
fetch(url, {
method: 'POST',
headers: {
'Content-Type': 'application/json',
'Accept': 'application/json, text/event-stream'
},
body: payload
})
.then(function(response) {
// Try to get session ID from headers first
var sessionId = response.headers.get('mcp-session-id');
// Store response for later use
var responseClone = response.clone();
return response.text().then(function(text) {
console.log('Raw response text:', text);
// Parse the response - could be SSE format or JSON
var lines = text.trim().split('\n');
var jsonData = null;
// Look for JSON in SSE format (data: {...})
for (var i = 0; i < lines.length; i++) {
console.log('Line ' + i + ':', lines[i]);
if (lines[i].startsWith('data: ')) {
try {
jsonData = JSON.parse(lines[i].substring(6));
console.log('Parsed SSE data:', jsonData);
break;
} catch (e) {
console.log('Failed to parse SSE line:', e);
}
}
}
// If no SSE format, try parsing the whole thing as JSON
if (!jsonData) {
try {
jsonData = JSON.parse(text);
console.log('Parsed as plain JSON:', jsonData);
} catch (e) {
console.log('Failed to parse as JSON:', e);
}
}
// Session ID should be in the header (already extracted above)
// But also check response body just in case
if (!sessionId && jsonData) {
sessionId = jsonData.result?.sessionId ||
jsonData.meta?.sessionId ||
jsonData.sessionId;
console.log('Session ID from body:', sessionId);
}
console.log('Final session ID (header or body):', sessionId);
return { sessionId: sessionId, data: jsonData };
});
})
.then(function(result) {
console.log('Final result object:', result);
if (result.sessionId) {
mcpSessionId = result.sessionId;
console.log('Setting session ID to:', mcpSessionId);
updateSessionIdPlaceholders(result.sessionId);
button.textContent = "Success! Session: " + result.sessionId.substring(0, 8) + "...";
} else {
console.error('No session ID found in result!');
console.log('Full response data:', result.data);
button.textContent = "No Session ID - Check Console";
// Try to extract from response text if available
var responseText = JSON.stringify(result.data);
console.log('Response text:', responseText);
}
button.classList.add("copied");
setTimeout(function () {
button.textContent = "Initialize & Get Session";
button.classList.remove("copied");
button.disabled = false;
}, 3000);
})
.catch(function(err) {
console.error('Initialize failed:', err);
button.textContent = "Failed - Copy Instead";
button.classList.add("copied");
setTimeout(function () {
button.textContent = "Initialize & Get Session";
button.classList.remove("copied");
button.disabled = false;
}, 3000);
});
}
}
function updateSessionIdPlaceholders(sessionId) {
// Update session ID input field
var input = document.getElementById('session-id-input');
if (input) {
input.value = sessionId;
input.style.borderColor = '#22c55e';
input.style.backgroundColor = '#f0fdf4';
}
// Enable the Step 2 copy button
var toolCopyButton = document.getElementById('tool-copy-button');
if (toolCopyButton) {
toolCopyButton.disabled = false;
toolCopyButton.textContent = 'Copy Command';
toolCopyButton.style.backgroundColor = '';
toolCopyButton.style.cursor = '';
}
}
function updateSessionIdFromInput(value) {
// Update the global session ID variable when user types/pastes
mcpSessionId = value.trim();
var input = document.getElementById('session-id-input');
var toolCopyButton = document.getElementById('tool-copy-button');
if (mcpSessionId) {
// Enable copy button if session ID is present
if (input) {
input.style.borderColor = '#3b82f6';
input.style.backgroundColor = '#f0f9ff';
}
if (toolCopyButton) {
toolCopyButton.disabled = false;
toolCopyButton.textContent = 'Copy Command';
toolCopyButton.style.backgroundColor = '';
toolCopyButton.style.cursor = '';
}
} else {
// Disable copy button if session ID is empty
if (toolCopyButton) {
toolCopyButton.disabled = true;
toolCopyButton.textContent = 'Copy (Need Session ID)';
toolCopyButton.style.backgroundColor = '#e0e0e0';
toolCopyButton.style.cursor = 'not-allowed';
}
}
}
</script>
</body>
</html>