Skip to content

Commit 9a7132b

Browse files
committed
Add extension update notification system
- Chrome extension now detects updates and opens notification page - Added GitHub Pages setup with custom domain (mcp-pointer.etsd.tech) - Update notice guides users to reconfigure for auto-updates - Added tabs permission for opening external URLs
1 parent eb70122 commit 9a7132b

File tree

5 files changed

+272
-1
lines changed

5 files changed

+272
-1
lines changed

docs/CNAME

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
mcp-pointer.etsd.tech

docs/index.html

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
<!DOCTYPE html>
2+
<html lang="en">
3+
<head>
4+
<meta charset="UTF-8">
5+
<meta name="viewport" content="width=device-width, initial-scale=1.0">
6+
<title>MCP Pointer</title>
7+
<meta http-equiv="refresh" content="0; url=https://github.com/etsd-tech/mcp-pointer">
8+
</head>
9+
<body>
10+
<p>Redirecting to <a href="https://github.com/etsd-tech/mcp-pointer">MCP Pointer GitHub repository</a>...</p>
11+
</body>
12+
</html>

docs/update-notice.html

Lines changed: 241 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,241 @@
1+
<!DOCTYPE html>
2+
<html lang="en">
3+
<head>
4+
<meta charset="UTF-8">
5+
<meta name="viewport" content="width=device-width, initial-scale=1.0">
6+
<title>MCP Pointer - Auto-Update Fix</title>
7+
<style>
8+
body {
9+
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
10+
max-width: 800px;
11+
margin: 0 auto;
12+
padding: 40px 20px;
13+
line-height: 1.6;
14+
color: #333;
15+
background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
16+
min-height: 100vh;
17+
}
18+
19+
.container {
20+
background: white;
21+
border-radius: 12px;
22+
padding: 40px;
23+
box-shadow: 0 20px 40px rgba(0,0,0,0.1);
24+
}
25+
26+
.header {
27+
text-align: center;
28+
margin-bottom: 30px;
29+
}
30+
31+
.icon {
32+
font-size: 48px;
33+
margin-bottom: 16px;
34+
}
35+
36+
h1 {
37+
color: #2d3748;
38+
margin: 0 0 8px 0;
39+
font-size: 28px;
40+
}
41+
42+
.subtitle {
43+
color: #718096;
44+
font-size: 16px;
45+
margin: 0;
46+
}
47+
48+
.update-box {
49+
background: #f0f8ff;
50+
border: 1px solid #bee3f8;
51+
border-radius: 8px;
52+
padding: 20px;
53+
margin: 30px 0;
54+
}
55+
56+
.update-title {
57+
color: #2b6cb0;
58+
font-weight: 600;
59+
margin: 0 0 12px 0;
60+
font-size: 18px;
61+
}
62+
63+
.steps {
64+
background: #f7fafc;
65+
border-radius: 8px;
66+
padding: 24px;
67+
margin: 20px 0;
68+
}
69+
70+
.step {
71+
margin-bottom: 16px;
72+
display: flex;
73+
align-items: flex-start;
74+
}
75+
76+
.step-number {
77+
background: #4299e1;
78+
color: white;
79+
border-radius: 50%;
80+
width: 24px;
81+
height: 24px;
82+
display: flex;
83+
align-items: center;
84+
justify-content: center;
85+
font-size: 14px;
86+
font-weight: 600;
87+
margin-right: 12px;
88+
flex-shrink: 0;
89+
}
90+
91+
.step-content {
92+
flex: 1;
93+
}
94+
95+
.code {
96+
background: #2d3748;
97+
color: #e2e8f0;
98+
padding: 12px 16px;
99+
border-radius: 6px;
100+
font-family: 'SF Mono', Monaco, monospace;
101+
font-size: 14px;
102+
margin: 8px 0;
103+
overflow-x: auto;
104+
}
105+
106+
.btn {
107+
background: #4299e1;
108+
color: white;
109+
border: none;
110+
padding: 12px 24px;
111+
border-radius: 6px;
112+
font-size: 16px;
113+
cursor: pointer;
114+
text-decoration: none;
115+
display: inline-block;
116+
transition: background 0.2s;
117+
}
118+
119+
.btn:hover {
120+
background: #3182ce;
121+
}
122+
123+
.tools {
124+
display: grid;
125+
grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
126+
gap: 16px;
127+
margin: 20px 0;
128+
}
129+
130+
.tool {
131+
background: white;
132+
border: 1px solid #e2e8f0;
133+
border-radius: 6px;
134+
padding: 16px;
135+
text-align: center;
136+
}
137+
138+
.tool-name {
139+
font-weight: 600;
140+
margin-bottom: 8px;
141+
color: #2d3748;
142+
}
143+
144+
.close-notice {
145+
text-align: center;
146+
margin-top: 30px;
147+
padding-top: 20px;
148+
border-top: 1px solid #e2e8f0;
149+
}
150+
151+
.one-time-notice {
152+
background: #fef5e7;
153+
border: 1px solid #f6ad55;
154+
border-radius: 8px;
155+
padding: 16px;
156+
margin: 20px 0;
157+
}
158+
</style>
159+
</head>
160+
<body>
161+
<div class="container">
162+
<div class="header">
163+
<div class="icon">🔄</div>
164+
<h1>MCP Pointer Updated!</h1>
165+
<p class="subtitle">Auto-update fix now available</p>
166+
</div>
167+
168+
<div class="update-box">
169+
<h2 class="update-title">🎉 What's New</h2>
170+
<p>We've fixed the auto-update issue! Previously, users were stuck on the first installed version. Now your MCP Pointer will automatically stay up-to-date with the latest features and fixes.</p>
171+
</div>
172+
173+
<div class="one-time-notice">
174+
<h4 style="color: #c05621; margin: 0 0 8px 0;">⚠️ One-Time Action Required</h4>
175+
<p style="margin: 8px 0; color: #744210;">
176+
You need to run the config command <strong>one last time</strong> to enable auto-updates. After this, future updates will be automatic!
177+
</p>
178+
</div>
179+
180+
<div class="steps">
181+
<h3 style="margin-top: 0; color: #2d3748;">📋 Enable Auto-Updates</h3>
182+
183+
<div class="step">
184+
<div class="step-number">1</div>
185+
<div class="step-content">
186+
<strong>Run the config command for your AI tool:</strong>
187+
<div class="tools">
188+
<div class="tool">
189+
<div class="tool-name">Claude Code</div>
190+
<div class="code">npx -y @mcp-pointer/server@latest config claude</div>
191+
</div>
192+
<div class="tool">
193+
<div class="tool-name">Cursor</div>
194+
<div class="code">npx -y @mcp-pointer/server@latest config cursor</div>
195+
</div>
196+
<div class="tool">
197+
<div class="tool-name">Windsurf</div>
198+
<div class="code">npx -y @mcp-pointer/server@latest config windsurf</div>
199+
</div>
200+
<div class="tool">
201+
<div class="tool-name">Other Tools</div>
202+
<div class="code">npx -y @mcp-pointer/server@latest config manual</div>
203+
</div>
204+
</div>
205+
</div>
206+
</div>
207+
208+
<div class="step">
209+
<div class="step-number">2</div>
210+
<div class="step-content">
211+
<strong>Restart your AI tool</strong> to load the new configuration
212+
</div>
213+
</div>
214+
215+
<div class="step">
216+
<div class="step-number">3</div>
217+
<div class="step-content">
218+
<strong>You're done!</strong> Future updates will now be automatic - no more manual configuration needed
219+
</div>
220+
</div>
221+
</div>
222+
223+
<div style="background: #f0fff4; border: 1px solid #9ae6b4; border-radius: 8px; padding: 16px; margin: 20px 0;">
224+
<h4 style="color: #2f855a; margin: 0 0 8px 0;">✨ After this one-time setup:</h4>
225+
<ul style="margin: 8px 0; color: #276749;">
226+
<li>MCP Pointer will automatically use the latest server version</li>
227+
<li>New features and bug fixes delivered seamlessly</li>
228+
<li>No more manual updates or configuration needed</li>
229+
<li>This notice will only appear for major updates</li>
230+
</ul>
231+
</div>
232+
233+
<div class="close-notice">
234+
<button class="btn" onclick="window.close()">Got it, close this tab</button>
235+
<p style="margin-top: 16px; color: #718096; font-size: 14px;">
236+
You can close this tab anytime. This notice only appears after updates.
237+
</p>
238+
</div>
239+
</div>
240+
</body>
241+
</html>

packages/chrome-extension/src/background.ts

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -70,5 +70,21 @@ chrome.runtime.onMessage
7070
}
7171
});
7272

73+
// Handle extension install/update
74+
chrome.runtime.onInstalled.addListener((details) => {
75+
if (details.reason === 'update') {
76+
const previousVersion = details.previousVersion;
77+
const currentVersion = chrome.runtime.getManifest().version;
78+
79+
logger.info(`🔄 Extension updated from ${previousVersion} to ${currentVersion}`);
80+
81+
// Open update notification page
82+
chrome.tabs.create({
83+
url: 'https://mcp-pointer.etsd.tech/update-notice.html',
84+
active: true
85+
});
86+
}
87+
});
88+
7389
// Start initialization
7490
initialize();

packages/chrome-extension/src/manifest.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,7 @@
4141
}
4242
],
4343
"permissions": [
44-
"storage"
44+
"storage",
45+
"tabs"
4546
]
4647
}

0 commit comments

Comments
 (0)