finta-aurora-mcp 1.0.0__py3-none-any.whl → 1.0.2__py3-none-any.whl

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.
@@ -1,3 +1,3 @@
1
1
  """Finta Aurora MCP - Chat with Aurora AI from Cursor/Claude Desktop."""
2
2
 
3
- __version__ = "1.0.0"
3
+ __version__ = "1.0.2"
finta_aurora_mcp/auth.py CHANGED
@@ -41,8 +41,13 @@ def main():
41
41
 
42
42
  webbrowser.open(auth_url)
43
43
 
44
+ auth_success = False
45
+ auth_error = None
46
+
44
47
  class CallbackHandler(http.server.SimpleHTTPRequestHandler):
45
48
  def do_GET(self):
49
+ nonlocal auth_success, auth_error
50
+
46
51
  query = urllib.parse.urlparse(self.path).query
47
52
  params = urllib.parse.parse_qs(query)
48
53
 
@@ -70,24 +75,276 @@ def main():
70
75
  with open(token_path, 'w') as f:
71
76
  json.dump(token_data, f, indent=2)
72
77
 
78
+ auth_success = True
79
+
73
80
  self.send_response(200)
74
81
  self.send_header('Content-type', 'text/html; charset=utf-8')
75
82
  self.end_headers()
76
- html = """<html><body style="font-family: system-ui; padding: 40px; text-align: center;"><h1>Authentication Successful!</h1><p>Token has been stored.</p><p>You can close this window and restart Cursor.</p></body></html>"""
83
+ html = """<!DOCTYPE html>
84
+ <html>
85
+ <head>
86
+ <meta charset="UTF-8">
87
+ <meta name="viewport" content="width=device-width, initial-scale=1.0">
88
+ <title>Authentication Successful - Finta</title>
89
+ <style>
90
+ * {
91
+ margin: 0;
92
+ padding: 0;
93
+ box-sizing: border-box;
94
+ }
95
+ body {
96
+ font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
97
+ background: linear-gradient(135deg, #09c39e 0%, #02748d 50%, #15445b 100%);
98
+ color: #ffffff;
99
+ margin: 0;
100
+ padding: 0;
101
+ display: flex;
102
+ justify-content: center;
103
+ align-items: center;
104
+ min-height: 100vh;
105
+ overflow: hidden;
106
+ }
107
+ .container {
108
+ text-align: center;
109
+ padding: 60px 40px;
110
+ background: rgba(255, 255, 255, 0.95);
111
+ border-radius: 24px;
112
+ box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
113
+ max-width: 500px;
114
+ width: 90%;
115
+ color: #15445b;
116
+ position: relative;
117
+ overflow: hidden;
118
+ }
119
+ .container::before {
120
+ content: '';
121
+ position: absolute;
122
+ top: 0;
123
+ left: 0;
124
+ right: 0;
125
+ height: 4px;
126
+ background: linear-gradient(90deg, #09c39e 0%, #13FFAA 50%, #09c39e 100%);
127
+ }
128
+ .checkmark-circle {
129
+ width: 80px;
130
+ height: 80px;
131
+ border-radius: 50%;
132
+ background: linear-gradient(135deg, #09c39e 0%, #13FFAA 100%);
133
+ display: flex;
134
+ align-items: center;
135
+ justify-content: center;
136
+ margin: 0 auto 30px;
137
+ box-shadow: 0 8px 24px rgba(9, 195, 158, 0.4);
138
+ animation: scaleIn 0.5s ease-out;
139
+ }
140
+ @keyframes scaleIn {
141
+ from {
142
+ transform: scale(0);
143
+ opacity: 0;
144
+ }
145
+ to {
146
+ transform: scale(1);
147
+ opacity: 1;
148
+ }
149
+ }
150
+ .checkmark {
151
+ font-size: 48px;
152
+ color: #ffffff;
153
+ font-weight: bold;
154
+ }
155
+ h1 {
156
+ font-size: 28px;
157
+ margin-bottom: 16px;
158
+ color: #15445b;
159
+ font-weight: 700;
160
+ }
161
+ .brand-name {
162
+ font-size: 18px;
163
+ color: #09c39e;
164
+ font-weight: 600;
165
+ margin-bottom: 24px;
166
+ letter-spacing: 0.5px;
167
+ }
168
+ p {
169
+ font-size: 16px;
170
+ margin: 12px 0;
171
+ color: #4a5568;
172
+ line-height: 1.6;
173
+ }
174
+ .next-step {
175
+ margin-top: 24px;
176
+ padding: 16px 24px;
177
+ background: #f7fafc;
178
+ border-radius: 12px;
179
+ border-left: 4px solid #09c39e;
180
+ }
181
+ .next-step strong {
182
+ color: #15445b;
183
+ font-weight: 600;
184
+ }
185
+ .next-step-text {
186
+ color: #4a5568;
187
+ font-size: 15px;
188
+ margin-top: 8px;
189
+ }
190
+ </style>
191
+ </head>
192
+ <body>
193
+ <div class="container">
194
+ <div class="checkmark-circle">
195
+ <div class="checkmark">✓</div>
196
+ </div>
197
+ <div class="brand-name">Finta</div>
198
+ <h1>Authentication Successful!</h1>
199
+ <p>Your token has been saved securely.</p>
200
+ <p>You can close this window now.</p>
201
+ <div class="next-step">
202
+ <strong>Next step:</strong>
203
+ <div class="next-step-text">Restart Cursor to start using Aurora MCP</div>
204
+ </div>
205
+ </div>
206
+ </body>
207
+ </html>"""
77
208
  self.wfile.write(html.encode('utf-8'))
78
209
  print("\n✓ Authentication successful!")
79
210
  print(f"✓ Token stored at: {token_path}")
80
211
  print("\nRestart Cursor to use Aurora MCP.")
81
212
  return
82
213
  else:
83
- print(f"\n✗ Failed to get token: {resp.status_code} - {resp.text}")
214
+ error_msg = f"Failed to get token: {resp.status_code} - {resp.text}"
215
+ auth_error = error_msg
216
+ print(f"\n✗ {error_msg}")
217
+ self.send_response(200)
218
+ self.send_header('Content-type', 'text/html; charset=utf-8')
219
+ self.end_headers()
220
+ html = f"""<!DOCTYPE html>
221
+ <html>
222
+ <head>
223
+ <meta charset="UTF-8">
224
+ <title>Authentication Error</title>
225
+ <style>
226
+ body {{
227
+ font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
228
+ background: #f5f5f5;
229
+ color: #333;
230
+ margin: 0;
231
+ padding: 40px;
232
+ text-align: center;
233
+ }}
234
+ .error {{
235
+ background: white;
236
+ padding: 40px;
237
+ border-radius: 10px;
238
+ box-shadow: 0 2px 10px rgba(0,0,0,0.1);
239
+ max-width: 600px;
240
+ margin: 0 auto;
241
+ }}
242
+ h1 {{ color: #d32f2f; }}
243
+ </style>
244
+ </head>
245
+ <body>
246
+ <div class="error">
247
+ <h1>✗ Authentication Failed</h1>
248
+ <p>{error_msg}</p>
249
+ <p>Please try running <code>aurora-authenticate</code> again.</p>
250
+ </div>
251
+ </body>
252
+ </html>"""
253
+ self.wfile.write(html.encode('utf-8'))
254
+ return
84
255
  except Exception as e:
85
- print(f"\n✗ Error: {e}")
256
+ error_msg = f"Error: {str(e)}"
257
+ auth_error = error_msg
258
+ print(f"\n✗ {error_msg}")
259
+ self.send_response(200)
260
+ self.send_header('Content-type', 'text/html; charset=utf-8')
261
+ self.end_headers()
262
+ html = f"""<!DOCTYPE html>
263
+ <html>
264
+ <head>
265
+ <meta charset="UTF-8">
266
+ <title>Authentication Error</title>
267
+ <style>
268
+ body {{
269
+ font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
270
+ background: #f5f5f5;
271
+ color: #333;
272
+ margin: 0;
273
+ padding: 40px;
274
+ text-align: center;
275
+ }}
276
+ .error {{
277
+ background: white;
278
+ padding: 40px;
279
+ border-radius: 10px;
280
+ box-shadow: 0 2px 10px rgba(0,0,0,0.1);
281
+ max-width: 600px;
282
+ margin: 0 auto;
283
+ }}
284
+ h1 {{ color: #d32f2f; }}
285
+ </style>
286
+ </head>
287
+ <body>
288
+ <div class="error">
289
+ <h1>✗ Authentication Error</h1>
290
+ <p>{error_msg}</p>
291
+ <p>Please try running <code>aurora-authenticate</code> again.</p>
292
+ </div>
293
+ </body>
294
+ </html>"""
295
+ self.wfile.write(html.encode('utf-8'))
296
+ return
86
297
 
298
+ # Default response for any other requests
87
299
  self.send_response(200)
88
- self.send_header('Content-type', 'text/html')
300
+ self.send_header('Content-type', 'text/html; charset=utf-8')
89
301
  self.end_headers()
90
- self.wfile.write(b"<h1>Processing...</h1>")
302
+ html = """<!DOCTYPE html>
303
+ <html>
304
+ <head>
305
+ <meta charset="UTF-8">
306
+ <title>Processing...</title>
307
+ <style>
308
+ body {
309
+ font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
310
+ background: #f5f5f5;
311
+ color: #333;
312
+ margin: 0;
313
+ padding: 40px;
314
+ text-align: center;
315
+ }
316
+ .loading {
317
+ background: white;
318
+ padding: 40px;
319
+ border-radius: 10px;
320
+ box-shadow: 0 2px 10px rgba(0,0,0,0.1);
321
+ max-width: 400px;
322
+ margin: 0 auto;
323
+ }
324
+ .spinner {
325
+ border: 4px solid #f3f3f3;
326
+ border-top: 4px solid #667eea;
327
+ border-radius: 50%;
328
+ width: 40px;
329
+ height: 40px;
330
+ animation: spin 1s linear infinite;
331
+ margin: 20px auto;
332
+ }
333
+ @keyframes spin {
334
+ 0% { transform: rotate(0deg); }
335
+ 100% { transform: rotate(360deg); }
336
+ }
337
+ </style>
338
+ </head>
339
+ <body>
340
+ <div class="loading">
341
+ <div class="spinner"></div>
342
+ <h2>Processing authentication...</h2>
343
+ <p>Please wait...</p>
344
+ </div>
345
+ </body>
346
+ </html>"""
347
+ self.wfile.write(html.encode('utf-8'))
91
348
 
92
349
  def log_message(self, *args):
93
350
  pass
@@ -96,7 +353,17 @@ def main():
96
353
  print("Waiting for authentication callback...")
97
354
  print("(Press Ctrl+C to cancel)\n")
98
355
  try:
99
- httpd.handle_request()
356
+ # Handle multiple requests (browser might make multiple requests)
357
+ # Keep server open for 30 seconds to handle any reloads
358
+ import time
359
+ start_time = time.time()
360
+ while time.time() - start_time < 30:
361
+ httpd.timeout = 1
362
+ httpd.handle_request()
363
+ if auth_success or auth_error:
364
+ # Give browser time to display the page
365
+ time.sleep(2)
366
+ break
100
367
  except KeyboardInterrupt:
101
368
  print("\n\n✗ Authentication cancelled.")
102
369
  sys.exit(1)
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: finta-aurora-mcp
3
- Version: 1.0.0
3
+ Version: 1.0.2
4
4
  Summary: Aurora AI Agent for Finta
5
5
  Home-page: https://github.com/finta/aurora
6
6
  Author: Finta
@@ -1,5 +1,5 @@
1
- finta_aurora_mcp/__init__.py,sha256=-2uFvF_-ohVqH0r4acGPr1d2W1s7KYcDgESG7geu4JE,96
2
- finta_aurora_mcp/auth.py,sha256=dBkMohr4QoAYFkP91UXLDtYfelP2iNN1TpS4PBwodM0,3921
1
+ finta_aurora_mcp/__init__.py,sha256=V-DjpBF-YGrCvOxMlibJWY38OctrGy9ls3JvzkCSGKU,96
2
+ finta_aurora_mcp/auth.py,sha256=DRI-grU7H9UvnUEoV-Q6lYvkd--Qlr100tTNiYuEo7Q,11743
3
3
  finta_aurora_mcp/fix_org_info.py,sha256=UrGRBsjz99nAnrTAC6VPfPkAIiHb7LS69fRZoDdVMT4,1590
4
4
  finta_aurora_mcp/mcp.py,sha256=L-a1OT8QxnF3Ymu5dJaj49dHz1csGR20i9UGeWTC_tY,20930
5
5
  tools/__init__.py,sha256=oTvelMfzMN2Dc9-NYxX2z9JtLhayfqbhI0ooC2IxECY,868
@@ -13,7 +13,7 @@ tools/pineconeKnowledgeTool.py,sha256=4IRhTUkClRGcDNgYQcMyiCmP-TyIDdgYAiUvOkdyQr
13
13
  tools/pineconeResourceTool.py,sha256=1IuJ9xnIly2vN8ehWZMqxbYmLXxLeCZISeSQxiHxFLo,1054
14
14
  tools/serpAPITool.py,sha256=Mi6Yq-zTBdbvSiwqGeCiT_Jx2bpEbI8k9xXrCLtIzX8,544
15
15
  tools/webScraperTool.py,sha256=OKwCo1bkVXJpcldbI-dvSm0qjQmhr4wmJUrj_KFMBb4,1122
16
- finta_aurora_mcp-1.0.0.dist-info/METADATA,sha256=xhQCIdHzsNVhxtQ_4bqMYKRSOmwhugtGq8TrdopNJvU,6787
17
- finta_aurora_mcp-1.0.0.dist-info/WHEEL,sha256=wUyA8OaulRlbfwMtmQsvNngGrxQHAvkKcvRmdizlJi0,92
18
- finta_aurora_mcp-1.0.0.dist-info/top_level.txt,sha256=IHyK49UWbgesCaXyeEpE-cHkjwWoDOTv7RhPaCWKgwQ,23
19
- finta_aurora_mcp-1.0.0.dist-info/RECORD,,
16
+ finta_aurora_mcp-1.0.2.dist-info/METADATA,sha256=aWuF9LhoXJSF6tNVeHRGcKE7GseSwxAa0B04VYVNq2A,6787
17
+ finta_aurora_mcp-1.0.2.dist-info/WHEEL,sha256=wUyA8OaulRlbfwMtmQsvNngGrxQHAvkKcvRmdizlJi0,92
18
+ finta_aurora_mcp-1.0.2.dist-info/top_level.txt,sha256=IHyK49UWbgesCaXyeEpE-cHkjwWoDOTv7RhPaCWKgwQ,23
19
+ finta_aurora_mcp-1.0.2.dist-info/RECORD,,