eassist-mcp 1.0.1 → 1.0.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/build/auth.js +11 -4
  2. package/package.json +1 -1
package/build/auth.js CHANGED
@@ -41,7 +41,7 @@ class AuthManager {
41
41
  if (this.data?.refreshToken) {
42
42
  try {
43
43
  const apiUrl = this.getApiUrl();
44
- const res = await axios.post(`${apiUrl}/auth/refresh`, { refreshToken: this.data.refreshToken });
44
+ const res = await axios.post(`${apiUrl}/api/auth/refresh`, { refreshToken: this.data.refreshToken });
45
45
  const { token, refreshToken, expiresAt } = res.data;
46
46
  this.store({ ...this.data, accessToken: token, refreshToken, expiresAt });
47
47
  return token;
@@ -77,8 +77,15 @@ class AuthManager {
77
77
  return;
78
78
  }
79
79
  this.store({ apiUrl, accessToken: token, refreshToken, expiresAt, name, email });
80
- res.writeHead(200, { 'Content-Type': 'text/plain' });
81
- res.end('OK');
80
+ const displayName = name ?? email ?? 'there';
81
+ res.writeHead(200, { 'Content-Type': 'text/html' });
82
+ res.end(`<!DOCTYPE html><html><head><title>EAssist — Authenticated</title>
83
+ <style>body{font-family:sans-serif;display:flex;align-items:center;justify-content:center;min-height:100vh;margin:0;background:#070c1b;color:#e2e8f0;}
84
+ .box{text-align:center;padding:40px;border-radius:16px;background:#0c1428;border:1px solid rgba(99,102,241,0.2);}
85
+ h2{color:#34d399;margin-bottom:8px;}p{color:#64748b;margin:4px 0;}</style></head>
86
+ <body><div class="box"><h2>&#x2713; Authenticated successfully</h2>
87
+ <p>Welcome, ${displayName}.</p><p>You can close this tab and return to Claude.</p>
88
+ </div></body></html>`);
82
89
  server.close();
83
90
  resolve();
84
91
  }
@@ -88,7 +95,7 @@ class AuthManager {
88
95
  }
89
96
  });
90
97
  server.listen(port, '127.0.0.1', async () => {
91
- const authUrl = `${apiUrl}/auth/mcp?port=${port}`;
98
+ const authUrl = `${apiUrl}/api/auth/mcp?port=${port}`;
92
99
  console.error(`\n[eassist-mcp] Opening browser for authentication...\n${authUrl}\n`);
93
100
  try {
94
101
  const { default: open } = await import('open');
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "eassist-mcp",
3
- "version": "1.0.1",
3
+ "version": "1.0.3",
4
4
  "description": "MCP server for EAssist — query and manage actions & initiatives via Claude",
5
5
  "type": "module",
6
6
  "bin": {