finta-aurora-mcp 1.0.0__py3-none-any.whl → 1.0.1__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.1"
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,206 @@ 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
+ <title>Authentication Successful</title>
88
+ <style>
89
+ body {
90
+ font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
91
+ background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
92
+ color: white;
93
+ margin: 0;
94
+ padding: 0;
95
+ display: flex;
96
+ justify-content: center;
97
+ align-items: center;
98
+ min-height: 100vh;
99
+ }
100
+ .container {
101
+ text-align: center;
102
+ padding: 40px;
103
+ background: rgba(255, 255, 255, 0.1);
104
+ border-radius: 20px;
105
+ backdrop-filter: blur(10px);
106
+ box-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.37);
107
+ }
108
+ h1 {
109
+ font-size: 2.5em;
110
+ margin-bottom: 20px;
111
+ }
112
+ p {
113
+ font-size: 1.2em;
114
+ margin: 10px 0;
115
+ }
116
+ .checkmark {
117
+ font-size: 4em;
118
+ margin-bottom: 20px;
119
+ }
120
+ </style>
121
+ </head>
122
+ <body>
123
+ <div class="container">
124
+ <div class="checkmark">✓</div>
125
+ <h1>Authentication Successful!</h1>
126
+ <p>Your token has been saved.</p>
127
+ <p>You can close this window now.</p>
128
+ <p><strong>Next step:</strong> Restart Cursor to use Aurora MCP.</p>
129
+ </div>
130
+ <script>
131
+ // Keep the page open for a few seconds so user can see the message
132
+ setTimeout(function() {
133
+ // Page will stay open, user can close manually
134
+ }, 5000);
135
+ </script>
136
+ </body>
137
+ </html>"""
77
138
  self.wfile.write(html.encode('utf-8'))
78
139
  print("\n✓ Authentication successful!")
79
140
  print(f"✓ Token stored at: {token_path}")
80
141
  print("\nRestart Cursor to use Aurora MCP.")
81
142
  return
82
143
  else:
83
- print(f"\n✗ Failed to get token: {resp.status_code} - {resp.text}")
144
+ error_msg = f"Failed to get token: {resp.status_code} - {resp.text}"
145
+ auth_error = error_msg
146
+ print(f"\n✗ {error_msg}")
147
+ self.send_response(200)
148
+ self.send_header('Content-type', 'text/html; charset=utf-8')
149
+ self.end_headers()
150
+ html = f"""<!DOCTYPE html>
151
+ <html>
152
+ <head>
153
+ <meta charset="UTF-8">
154
+ <title>Authentication Error</title>
155
+ <style>
156
+ body {{
157
+ font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
158
+ background: #f5f5f5;
159
+ color: #333;
160
+ margin: 0;
161
+ padding: 40px;
162
+ text-align: center;
163
+ }}
164
+ .error {{
165
+ background: white;
166
+ padding: 40px;
167
+ border-radius: 10px;
168
+ box-shadow: 0 2px 10px rgba(0,0,0,0.1);
169
+ max-width: 600px;
170
+ margin: 0 auto;
171
+ }}
172
+ h1 {{ color: #d32f2f; }}
173
+ </style>
174
+ </head>
175
+ <body>
176
+ <div class="error">
177
+ <h1>✗ Authentication Failed</h1>
178
+ <p>{error_msg}</p>
179
+ <p>Please try running <code>aurora-authenticate</code> again.</p>
180
+ </div>
181
+ </body>
182
+ </html>"""
183
+ self.wfile.write(html.encode('utf-8'))
184
+ return
84
185
  except Exception as e:
85
- print(f"\n✗ Error: {e}")
186
+ error_msg = f"Error: {str(e)}"
187
+ auth_error = error_msg
188
+ print(f"\n✗ {error_msg}")
189
+ self.send_response(200)
190
+ self.send_header('Content-type', 'text/html; charset=utf-8')
191
+ self.end_headers()
192
+ html = f"""<!DOCTYPE html>
193
+ <html>
194
+ <head>
195
+ <meta charset="UTF-8">
196
+ <title>Authentication Error</title>
197
+ <style>
198
+ body {{
199
+ font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
200
+ background: #f5f5f5;
201
+ color: #333;
202
+ margin: 0;
203
+ padding: 40px;
204
+ text-align: center;
205
+ }}
206
+ .error {{
207
+ background: white;
208
+ padding: 40px;
209
+ border-radius: 10px;
210
+ box-shadow: 0 2px 10px rgba(0,0,0,0.1);
211
+ max-width: 600px;
212
+ margin: 0 auto;
213
+ }}
214
+ h1 {{ color: #d32f2f; }}
215
+ </style>
216
+ </head>
217
+ <body>
218
+ <div class="error">
219
+ <h1>✗ Authentication Error</h1>
220
+ <p>{error_msg}</p>
221
+ <p>Please try running <code>aurora-authenticate</code> again.</p>
222
+ </div>
223
+ </body>
224
+ </html>"""
225
+ self.wfile.write(html.encode('utf-8'))
226
+ return
86
227
 
228
+ # Default response for any other requests
87
229
  self.send_response(200)
88
- self.send_header('Content-type', 'text/html')
230
+ self.send_header('Content-type', 'text/html; charset=utf-8')
89
231
  self.end_headers()
90
- self.wfile.write(b"<h1>Processing...</h1>")
232
+ html = """<!DOCTYPE html>
233
+ <html>
234
+ <head>
235
+ <meta charset="UTF-8">
236
+ <title>Processing...</title>
237
+ <style>
238
+ body {
239
+ font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
240
+ background: #f5f5f5;
241
+ color: #333;
242
+ margin: 0;
243
+ padding: 40px;
244
+ text-align: center;
245
+ }
246
+ .loading {
247
+ background: white;
248
+ padding: 40px;
249
+ border-radius: 10px;
250
+ box-shadow: 0 2px 10px rgba(0,0,0,0.1);
251
+ max-width: 400px;
252
+ margin: 0 auto;
253
+ }
254
+ .spinner {
255
+ border: 4px solid #f3f3f3;
256
+ border-top: 4px solid #667eea;
257
+ border-radius: 50%;
258
+ width: 40px;
259
+ height: 40px;
260
+ animation: spin 1s linear infinite;
261
+ margin: 20px auto;
262
+ }
263
+ @keyframes spin {
264
+ 0% { transform: rotate(0deg); }
265
+ 100% { transform: rotate(360deg); }
266
+ }
267
+ </style>
268
+ </head>
269
+ <body>
270
+ <div class="loading">
271
+ <div class="spinner"></div>
272
+ <h2>Processing authentication...</h2>
273
+ <p>Please wait...</p>
274
+ </div>
275
+ </body>
276
+ </html>"""
277
+ self.wfile.write(html.encode('utf-8'))
91
278
 
92
279
  def log_message(self, *args):
93
280
  pass
@@ -96,7 +283,17 @@ def main():
96
283
  print("Waiting for authentication callback...")
97
284
  print("(Press Ctrl+C to cancel)\n")
98
285
  try:
99
- httpd.handle_request()
286
+ # Handle multiple requests (browser might make multiple requests)
287
+ # Keep server open for 30 seconds to handle any reloads
288
+ import time
289
+ start_time = time.time()
290
+ while time.time() - start_time < 30:
291
+ httpd.timeout = 1
292
+ httpd.handle_request()
293
+ if auth_success or auth_error:
294
+ # Give browser time to display the page
295
+ time.sleep(2)
296
+ break
100
297
  except KeyboardInterrupt:
101
298
  print("\n\n✗ Authentication cancelled.")
102
299
  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.1
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=FRVJKmoVsgY67MdCj1ORhvuLlbyL9NJImGnutwnMgOk,96
2
+ finta_aurora_mcp/auth.py,sha256=Yoac3GMmRs2168PpqpKiLFoDFwHLQmZIvlv63tm9l_k,9730
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.1.dist-info/METADATA,sha256=XUAKw2D0JxuQnKVMnkwNXmtWte893oHeHhAvdZ6y_wQ,6787
17
+ finta_aurora_mcp-1.0.1.dist-info/WHEEL,sha256=wUyA8OaulRlbfwMtmQsvNngGrxQHAvkKcvRmdizlJi0,92
18
+ finta_aurora_mcp-1.0.1.dist-info/top_level.txt,sha256=IHyK49UWbgesCaXyeEpE-cHkjwWoDOTv7RhPaCWKgwQ,23
19
+ finta_aurora_mcp-1.0.1.dist-info/RECORD,,