finta-aurora-mcp 1.0.0__tar.gz → 1.0.2__tar.gz

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 (27) hide show
  1. {finta_aurora_mcp-1.0.0 → finta_aurora_mcp-1.0.2}/PKG-INFO +1 -1
  2. {finta_aurora_mcp-1.0.0 → finta_aurora_mcp-1.0.2}/finta_aurora_mcp/__init__.py +1 -1
  3. finta_aurora_mcp-1.0.2/finta_aurora_mcp/auth.py +372 -0
  4. {finta_aurora_mcp-1.0.0 → finta_aurora_mcp-1.0.2}/finta_aurora_mcp.egg-info/PKG-INFO +1 -1
  5. {finta_aurora_mcp-1.0.0 → finta_aurora_mcp-1.0.2}/pyproject.toml +1 -1
  6. {finta_aurora_mcp-1.0.0 → finta_aurora_mcp-1.0.2}/setup.py +1 -1
  7. finta_aurora_mcp-1.0.0/finta_aurora_mcp/auth.py +0 -105
  8. {finta_aurora_mcp-1.0.0 → finta_aurora_mcp-1.0.2}/MANIFEST.in +0 -0
  9. {finta_aurora_mcp-1.0.0 → finta_aurora_mcp-1.0.2}/README.md +0 -0
  10. {finta_aurora_mcp-1.0.0 → finta_aurora_mcp-1.0.2}/finta_aurora_mcp/fix_org_info.py +0 -0
  11. {finta_aurora_mcp-1.0.0 → finta_aurora_mcp-1.0.2}/finta_aurora_mcp/mcp.py +0 -0
  12. {finta_aurora_mcp-1.0.0 → finta_aurora_mcp-1.0.2}/finta_aurora_mcp.egg-info/SOURCES.txt +0 -0
  13. {finta_aurora_mcp-1.0.0 → finta_aurora_mcp-1.0.2}/finta_aurora_mcp.egg-info/dependency_links.txt +0 -0
  14. {finta_aurora_mcp-1.0.0 → finta_aurora_mcp-1.0.2}/finta_aurora_mcp.egg-info/requires.txt +0 -0
  15. {finta_aurora_mcp-1.0.0 → finta_aurora_mcp-1.0.2}/finta_aurora_mcp.egg-info/top_level.txt +0 -0
  16. {finta_aurora_mcp-1.0.0 → finta_aurora_mcp-1.0.2}/setup.cfg +0 -0
  17. {finta_aurora_mcp-1.0.0 → finta_aurora_mcp-1.0.2}/tools/__init__.py +0 -0
  18. {finta_aurora_mcp-1.0.0 → finta_aurora_mcp-1.0.2}/tools/addInvestorToTrackerTool.py +0 -0
  19. {finta_aurora_mcp-1.0.0 → finta_aurora_mcp-1.0.2}/tools/contactSupportTool.py +0 -0
  20. {finta_aurora_mcp-1.0.0 → finta_aurora_mcp-1.0.2}/tools/editInvestorTool.py +0 -0
  21. {finta_aurora_mcp-1.0.0 → finta_aurora_mcp-1.0.2}/tools/getInvestorTool.py +0 -0
  22. {finta_aurora_mcp-1.0.0 → finta_aurora_mcp-1.0.2}/tools/imageTool.py +0 -0
  23. {finta_aurora_mcp-1.0.0 → finta_aurora_mcp-1.0.2}/tools/pdfScraperTool.py +0 -0
  24. {finta_aurora_mcp-1.0.0 → finta_aurora_mcp-1.0.2}/tools/pineconeKnowledgeTool.py +0 -0
  25. {finta_aurora_mcp-1.0.0 → finta_aurora_mcp-1.0.2}/tools/pineconeResourceTool.py +0 -0
  26. {finta_aurora_mcp-1.0.0 → finta_aurora_mcp-1.0.2}/tools/serpAPITool.py +0 -0
  27. {finta_aurora_mcp-1.0.0 → finta_aurora_mcp-1.0.2}/tools/webScraperTool.py +0 -0
@@ -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,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"
@@ -0,0 +1,372 @@
1
+ #!/usr/bin/env python3
2
+ """
3
+ Aurora MCP Authentication
4
+ Simple OAuth login - opens browser and stores token.
5
+ """
6
+
7
+ import os
8
+ import sys
9
+ import webbrowser
10
+ import http.server
11
+ import socketserver
12
+ import urllib.parse
13
+ import json
14
+ import requests
15
+ from pathlib import Path
16
+
17
+ FINTA_API_URL_STAGING = "https://us-central1-equity-token-stage.cloudfunctions.net"
18
+ FINTA_API_URL_PRODUCTION = "https://us-central1-equity-token.cloudfunctions.net"
19
+
20
+ def get_api_url():
21
+ """Get API URL based on environment."""
22
+ use_staging = os.getenv("FINTA_STAGING", "true").lower() == "true"
23
+ return FINTA_API_URL_STAGING if use_staging else FINTA_API_URL_PRODUCTION
24
+
25
+ def get_token_path():
26
+ """Get path to store token."""
27
+ return Path.home() / ".cursor" / "aurora_token.json"
28
+
29
+ def main():
30
+ print("Aurora MCP Authentication")
31
+ print("=" * 40)
32
+ print("Opening browser for login...\n")
33
+
34
+ api_url = get_api_url()
35
+ auth_url = (
36
+ f"{api_url}/auroraOAuthAuthorize?"
37
+ f"response_type=code&"
38
+ f"client_id=cursor&"
39
+ f"redirect_uri=http://localhost:8765/callback"
40
+ )
41
+
42
+ webbrowser.open(auth_url)
43
+
44
+ auth_success = False
45
+ auth_error = None
46
+
47
+ class CallbackHandler(http.server.SimpleHTTPRequestHandler):
48
+ def do_GET(self):
49
+ nonlocal auth_success, auth_error
50
+
51
+ query = urllib.parse.urlparse(self.path).query
52
+ params = urllib.parse.parse_qs(query)
53
+
54
+ if 'code' in params:
55
+ code = params['code'][0]
56
+ api_url = get_api_url()
57
+
58
+ try:
59
+ resp = requests.post(
60
+ f"{api_url}/auroraOAuthToken",
61
+ json={
62
+ "grant_type": "authorization_code",
63
+ "code": code,
64
+ "redirect_uri": "http://localhost:8765/callback"
65
+ },
66
+ timeout=10
67
+ )
68
+
69
+ if resp.status_code == 200:
70
+ token_data = resp.json()
71
+ access_token = token_data.get("access_token")
72
+
73
+ token_path = get_token_path()
74
+ token_path.parent.mkdir(exist_ok=True)
75
+ with open(token_path, 'w') as f:
76
+ json.dump(token_data, f, indent=2)
77
+
78
+ auth_success = True
79
+
80
+ self.send_response(200)
81
+ self.send_header('Content-type', 'text/html; charset=utf-8')
82
+ self.end_headers()
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>"""
208
+ self.wfile.write(html.encode('utf-8'))
209
+ print("\n✓ Authentication successful!")
210
+ print(f"✓ Token stored at: {token_path}")
211
+ print("\nRestart Cursor to use Aurora MCP.")
212
+ return
213
+ else:
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
255
+ except Exception as 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
297
+
298
+ # Default response for any other requests
299
+ self.send_response(200)
300
+ self.send_header('Content-type', 'text/html; charset=utf-8')
301
+ self.end_headers()
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'))
348
+
349
+ def log_message(self, *args):
350
+ pass
351
+
352
+ with socketserver.TCPServer(("", 8765), CallbackHandler) as httpd:
353
+ print("Waiting for authentication callback...")
354
+ print("(Press Ctrl+C to cancel)\n")
355
+ try:
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
367
+ except KeyboardInterrupt:
368
+ print("\n\n✗ Authentication cancelled.")
369
+ sys.exit(1)
370
+
371
+ if __name__ == "__main__":
372
+ main()
@@ -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
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
4
4
 
5
5
  [project]
6
6
  name = "finta-aurora-mcp"
7
- version = "1.0.0"
7
+ version = "1.0.2"
8
8
  description = "Aurora AI Agent for Finta"
9
9
  readme = "README.md"
10
10
  requires-python = ">=3.11"
@@ -10,7 +10,7 @@ if readme_file.exists():
10
10
 
11
11
  setup(
12
12
  name="finta-aurora-mcp",
13
- version="1.0.0",
13
+ version="1.0.2",
14
14
  description="Aurora MCP client for Cursor/Claude Desktop - Chat with Finta's AI assistant",
15
15
  long_description=long_description,
16
16
  long_description_content_type="text/markdown",
@@ -1,105 +0,0 @@
1
- #!/usr/bin/env python3
2
- """
3
- Aurora MCP Authentication
4
- Simple OAuth login - opens browser and stores token.
5
- """
6
-
7
- import os
8
- import sys
9
- import webbrowser
10
- import http.server
11
- import socketserver
12
- import urllib.parse
13
- import json
14
- import requests
15
- from pathlib import Path
16
-
17
- FINTA_API_URL_STAGING = "https://us-central1-equity-token-stage.cloudfunctions.net"
18
- FINTA_API_URL_PRODUCTION = "https://us-central1-equity-token.cloudfunctions.net"
19
-
20
- def get_api_url():
21
- """Get API URL based on environment."""
22
- use_staging = os.getenv("FINTA_STAGING", "true").lower() == "true"
23
- return FINTA_API_URL_STAGING if use_staging else FINTA_API_URL_PRODUCTION
24
-
25
- def get_token_path():
26
- """Get path to store token."""
27
- return Path.home() / ".cursor" / "aurora_token.json"
28
-
29
- def main():
30
- print("Aurora MCP Authentication")
31
- print("=" * 40)
32
- print("Opening browser for login...\n")
33
-
34
- api_url = get_api_url()
35
- auth_url = (
36
- f"{api_url}/auroraOAuthAuthorize?"
37
- f"response_type=code&"
38
- f"client_id=cursor&"
39
- f"redirect_uri=http://localhost:8765/callback"
40
- )
41
-
42
- webbrowser.open(auth_url)
43
-
44
- class CallbackHandler(http.server.SimpleHTTPRequestHandler):
45
- def do_GET(self):
46
- query = urllib.parse.urlparse(self.path).query
47
- params = urllib.parse.parse_qs(query)
48
-
49
- if 'code' in params:
50
- code = params['code'][0]
51
- api_url = get_api_url()
52
-
53
- try:
54
- resp = requests.post(
55
- f"{api_url}/auroraOAuthToken",
56
- json={
57
- "grant_type": "authorization_code",
58
- "code": code,
59
- "redirect_uri": "http://localhost:8765/callback"
60
- },
61
- timeout=10
62
- )
63
-
64
- if resp.status_code == 200:
65
- token_data = resp.json()
66
- access_token = token_data.get("access_token")
67
-
68
- token_path = get_token_path()
69
- token_path.parent.mkdir(exist_ok=True)
70
- with open(token_path, 'w') as f:
71
- json.dump(token_data, f, indent=2)
72
-
73
- self.send_response(200)
74
- self.send_header('Content-type', 'text/html; charset=utf-8')
75
- 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>"""
77
- self.wfile.write(html.encode('utf-8'))
78
- print("\n✓ Authentication successful!")
79
- print(f"✓ Token stored at: {token_path}")
80
- print("\nRestart Cursor to use Aurora MCP.")
81
- return
82
- else:
83
- print(f"\n✗ Failed to get token: {resp.status_code} - {resp.text}")
84
- except Exception as e:
85
- print(f"\n✗ Error: {e}")
86
-
87
- self.send_response(200)
88
- self.send_header('Content-type', 'text/html')
89
- self.end_headers()
90
- self.wfile.write(b"<h1>Processing...</h1>")
91
-
92
- def log_message(self, *args):
93
- pass
94
-
95
- with socketserver.TCPServer(("", 8765), CallbackHandler) as httpd:
96
- print("Waiting for authentication callback...")
97
- print("(Press Ctrl+C to cancel)\n")
98
- try:
99
- httpd.handle_request()
100
- except KeyboardInterrupt:
101
- print("\n\n✗ Authentication cancelled.")
102
- sys.exit(1)
103
-
104
- if __name__ == "__main__":
105
- main()