finta-aurora-mcp 1.0.0__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.
@@ -0,0 +1,216 @@
1
+ Metadata-Version: 2.4
2
+ Name: finta-aurora-mcp
3
+ Version: 1.0.0
4
+ Summary: Aurora AI Agent for Finta
5
+ Home-page: https://github.com/finta/aurora
6
+ Author: Finta
7
+ Author-email: support@trustfinta.com
8
+ Requires-Python: >=3.8
9
+ Description-Content-Type: text/markdown
10
+ Requires-Dist: pydantic>=2.0.0
11
+ Requires-Dist: langchain-core
12
+ Requires-Dist: langchain-community
13
+ Requires-Dist: langchain-openai>=0.1.0
14
+ Requires-Dist: langchain
15
+ Requires-Dist: beautifulsoup4
16
+ Requires-Dist: openai
17
+ Requires-Dist: langgraph
18
+ Requires-Dist: langgraph-cli
19
+ Requires-Dist: langgraph-api>=0.2.3
20
+ Requires-Dist: langgraph-sdk>=0.1.61
21
+ Requires-Dist: langchain-mcp-adapters
22
+ Requires-Dist: tavily-python
23
+ Requires-Dist: google-search-results
24
+ Requires-Dist: requests
25
+ Requires-Dist: pinecone
26
+ Requires-Dist: langchain-pinecone
27
+ Requires-Dist: playwright
28
+ Requires-Dist: flask
29
+ Requires-Dist: tiktoken
30
+ Requires-Dist: PyPDF2
31
+ Requires-Dist: python-dotenv
32
+ Requires-Dist: python-decouple
33
+ Requires-Dist: flask_cors
34
+ Requires-Dist: langchain-google-genai
35
+ Requires-Dist: langchain-anthropic
36
+ Requires-Dist: langchain-google-vertexai
37
+ Requires-Dist: google-cloud-aiplatform>=1.84
38
+ Requires-Dist: httpx>=0.27.0
39
+ Requires-Dist: langchainhub
40
+ Requires-Dist: mcp>=0.1.0
41
+ Dynamic: author
42
+ Dynamic: author-email
43
+ Dynamic: home-page
44
+ Dynamic: requires-python
45
+
46
+ # Aurora
47
+
48
+ ## Running Aurora locally:
49
+
50
+ Pre-requisite: Ensure you have Docker installed on your system and you are logged in. If not, download and install it from the [official website](https://www.docker.com/products/docker-desktop/).
51
+
52
+ ### LangGraph CLI (Recommended)
53
+
54
+ Pre-requisite: Set up a virtual environment and install dependencies:
55
+
56
+ 1. Run `python3 -m venv .venv`
57
+ 2. Run `.venv/bin/pip install -r requirements.txt`
58
+ 3. Get the .env file contents from Kevin or someone on the team. Aurora will not run via docker without this file.
59
+
60
+ To run Aurora:
61
+
62
+ 1. Run `langgraph up` in the terminal from the aurora directory. This will start the Aurora server on `localhost:8123`.
63
+ 2. IMPORTANT: Before prompting Aurora, you will need to press the `+` button on the Chatbot UI in order to create a new thread.
64
+
65
+ - Note: Langgraph up will start a build before running the container, so it may take a while to start
66
+
67
+ ### LangGraph Cloud Desktop GUI (For Graph UI)
68
+
69
+ - Note:
70
+ - Apple Silicon only, as of 09/2024
71
+ - You will need to manually update the endpoint in equity-token-webapp/src/api/fintaAI/aurora
72
+
73
+ Pre-requisite: Install [LangGraph Studio for Desktop](https://github.com/langchain-ai/langgraph-studio)
74
+
75
+ 1. Log in with LangSmith credentials
76
+ 2. Navigate to the cloned Aurora repo folder location
77
+ 3. When Aurora has finished building, find the 'localhost:xxxxx' endpoint to use in equity-token-webapp
78
+ 4. Update the client endpoint in equity-token-webapp/src/api/fintaAI/aurora.js to the 'localhost:xxxxx' endpoint
79
+ `const client = new Client({
80
+ apiUrl: [YOUR ENDPOINT HERE],
81
+ defaultHeaders: {
82
+ 'X-API-KEY': LANGSMITH_API_KEY,
83
+ },
84
+ });`
85
+
86
+ ## Using Aurora MCP (for Cursor/Claude Desktop/ChatGPT)
87
+
88
+ The Aurora MCP allows you to chat with Aurora directly from Cursor, Claude Desktop, or ChatGPT, with automatic injection of your CRM contacts and deal information.
89
+
90
+ **✅ Compatible with:**
91
+ - **Cursor** - IDE with built-in MCP support
92
+ - **Claude Desktop** - Anthropic's desktop app
93
+ - **Any MCP-compatible client** - Uses standard stdio protocol
94
+
95
+ ### Installation
96
+
97
+ Install the Aurora MCP package via pip:
98
+
99
+ ```bash
100
+ pip install finta-aurora-mcp
101
+ ```
102
+
103
+ Or if you have the repo:
104
+
105
+ ```bash
106
+ cd aurora
107
+ pip install -e .
108
+ ```
109
+
110
+ ### Step 1: Authenticate (one-time)
111
+
112
+ Run the authentication command:
113
+
114
+ ```bash
115
+ aurora-authenticate
116
+ ```
117
+
118
+ This will:
119
+ - Open your browser for Finta OAuth login
120
+ - Store your authentication token in `~/.cursor/aurora_token.json`
121
+ - Store your organization info in `~/.cursor/aurora_org_info.json`
122
+
123
+ **Note:** By default, authentication uses the **staging** environment. To use production, set `FINTA_STAGING=false` before running:
124
+
125
+ ```bash
126
+ FINTA_STAGING=false aurora-authenticate
127
+ ```
128
+
129
+ ### Step 2: Add to MCP config
130
+
131
+ **For Cursor:**
132
+ Add this to your `~/.cursor/mcp.json` (create the file if it doesn't exist):
133
+
134
+ ```json
135
+ {
136
+ "mcpServers": {
137
+ "aurora": {
138
+ "command": "python3",
139
+ "args": ["-m", "finta_aurora_mcp.mcp"]
140
+ }
141
+ }
142
+ }
143
+ ```
144
+
145
+ **For Claude Desktop:**
146
+ Add this to your `~/Library/Application Support/Claude/claude_desktop_config.json` (macOS) or `%APPDATA%\Claude\claude_desktop_config.json` (Windows):
147
+
148
+ ```json
149
+ {
150
+ "mcpServers": {
151
+ "aurora": {
152
+ "command": "python3",
153
+ "args": ["-m", "finta_aurora_mcp.mcp"]
154
+ }
155
+ }
156
+ }
157
+ ```
158
+
159
+ **For ChatGPT/OpenAI:**
160
+ If OpenAI supports MCP servers, configure it similarly. Check OpenAI's documentation for their MCP configuration format.
161
+
162
+ **Note:** This references the installed package, so no file paths needed! The same package works with all MCP clients.
163
+
164
+ ### Step 3: Restart Your Application
165
+
166
+ **Restart your application completely** (quit and reopen) for the MCP changes to take effect:
167
+ - **Cursor**: Quit and reopen Cursor
168
+ - **Claude Desktop**: Quit and reopen Claude Desktop
169
+ - **ChatGPT**: Follow OpenAI's instructions for reloading MCP servers
170
+
171
+ ### Step 4: Use Aurora
172
+
173
+ Once set up, you can use Aurora by:
174
+
175
+ **In Cursor:**
176
+ 1. Type `@aurora_chat` followed by your question
177
+ 2. Example: `@aurora_chat Who are the investors in my CRM?`
178
+
179
+ **In Claude Desktop:**
180
+ 1. Use the `aurora_chat` tool in Claude's tool picker
181
+ 2. Or mention it in conversation: "Use aurora_chat to tell me about my CRM"
182
+
183
+ **In ChatGPT (if supported):**
184
+ 1. Follow OpenAI's MCP tool usage instructions
185
+ 2. The `aurora_chat` tool will be available in ChatGPT's tool list
186
+
187
+ Aurora will automatically have access to:
188
+ - Your CRM contacts (investors, status, emails)
189
+ - Your deal information (terms, industry, deal notes, etc.)
190
+ - All of Aurora's tools (search, add contacts, etc.)
191
+
192
+ ### Troubleshooting
193
+
194
+ - **"Invalid or expired token"**: Run `aurora-authenticate` again to refresh your token
195
+ - **"Unknown tool: aurora_chat"**: Make sure you restarted Cursor after adding the MCP config
196
+ - **"Module not found: finta_aurora_mcp"**: Make sure you installed the package with `pip install finta-aurora-mcp`
197
+ - **No CRM/deal info in responses**: Check that your organization handle is correct and you have a default deal set up in Finta
198
+
199
+ ## Deploying Aurora to LangGraph Cloud:
200
+
201
+ Pre-requisites:
202
+
203
+ 1. Ensure you have access to [LangSmith](https://smith.langchain.com/)
204
+ 2. Ensure your changes are pushed to the respective branch of the Aurora repo:
205
+ - Production: `main`
206
+ - Staging: `develop-Oct-2025`
207
+
208
+ #### On LangSmith:
209
+
210
+ 1. Click on the `Deployments` tab
211
+ 2. Find respective project:
212
+ - Production: `aurora-v1-production`
213
+ - Staging: `aurora-v1-staging`
214
+ 3. Click on the `+ New Revision` button on the top right
215
+ 4. Update environment variables as needed
216
+ 5. Click Submit to redeploy your changes
@@ -0,0 +1,19 @@
1
+ finta_aurora_mcp/__init__.py,sha256=-2uFvF_-ohVqH0r4acGPr1d2W1s7KYcDgESG7geu4JE,96
2
+ finta_aurora_mcp/auth.py,sha256=dBkMohr4QoAYFkP91UXLDtYfelP2iNN1TpS4PBwodM0,3921
3
+ finta_aurora_mcp/fix_org_info.py,sha256=UrGRBsjz99nAnrTAC6VPfPkAIiHb7LS69fRZoDdVMT4,1590
4
+ finta_aurora_mcp/mcp.py,sha256=L-a1OT8QxnF3Ymu5dJaj49dHz1csGR20i9UGeWTC_tY,20930
5
+ tools/__init__.py,sha256=oTvelMfzMN2Dc9-NYxX2z9JtLhayfqbhI0ooC2IxECY,868
6
+ tools/addInvestorToTrackerTool.py,sha256=DKn3UpykKKvhzzCV1aYRoIdM_3AGTHU5ODisJ2g20Jg,6129
7
+ tools/contactSupportTool.py,sha256=4HMTfeR44JhuWInVAknn5jpITj2rMhuGo_hXQRGfgw0,276
8
+ tools/editInvestorTool.py,sha256=AjHX9X6sWluLexoun56s2Z5tNK9YdQzaUyINQzJ4VQM,38603
9
+ tools/getInvestorTool.py,sha256=btIMapZ1YYen2_F75o5NCP_mugEIRERJT6AGYuFwKgA,4924
10
+ tools/imageTool.py,sha256=IRnxCui7IvET_RKzGZ6-d711qtsmCyjNJuA2ZYSqOmc,2835
11
+ tools/pdfScraperTool.py,sha256=Fp72IV4sCc52-w3I6Dn2ybpX-a9OOYP6IQT10wFyqaA,825
12
+ tools/pineconeKnowledgeTool.py,sha256=4IRhTUkClRGcDNgYQcMyiCmP-TyIDdgYAiUvOkdyQr8,1280
13
+ tools/pineconeResourceTool.py,sha256=1IuJ9xnIly2vN8ehWZMqxbYmLXxLeCZISeSQxiHxFLo,1054
14
+ tools/serpAPITool.py,sha256=Mi6Yq-zTBdbvSiwqGeCiT_Jx2bpEbI8k9xXrCLtIzX8,544
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,,
@@ -0,0 +1,5 @@
1
+ Wheel-Version: 1.0
2
+ Generator: setuptools (80.10.2)
3
+ Root-Is-Purelib: true
4
+ Tag: py3-none-any
5
+
@@ -0,0 +1,2 @@
1
+ finta_aurora_mcp
2
+ tools
tools/__init__.py ADDED
@@ -0,0 +1,23 @@
1
+ from .contactSupportTool import contact_support_tool
2
+ from .serpAPITool import serpAPITool
3
+ from .addInvestorToTrackerTool import add_to_tracker_any_fields_tool
4
+ from .getInvestorTool import get_investor_info_tool
5
+ from .editInvestorTool import edit_target_investor_any_fields_tool
6
+ from .imageTool import image_tool
7
+ from .pineconeKnowledgeTool import pinecone_finta_knowledge_tool
8
+ from .pineconeResourceTool import pinecone_finta_resource_tool
9
+ from .webScraperTool import scrape_website_from_link_tool
10
+ from .pdfScraperTool import pdf_scraper_tool
11
+
12
+ __all__ = [
13
+ "contact_support_tool",
14
+ "serpAPITool",
15
+ "add_to_tracker_any_fields_tool",
16
+ "get_investor_info_tool",
17
+ "edit_target_investor_any_fields_tool",
18
+ "image_tool",
19
+ "pinecone_finta_knowledge_tool",
20
+ "pinecone_finta_resource_tool",
21
+ "scrape_website_from_link_tool",
22
+ "pdf_scraper_tool",
23
+ ]
@@ -0,0 +1,114 @@
1
+ from langchain_core.tools import StructuredTool, ToolException
2
+ import requests
3
+ from pydantic.v1 import BaseModel, Field, ValidationError
4
+ from typing import Optional, List
5
+ import os
6
+ from langchain_core.runnables.config import RunnableConfig
7
+
8
+ API_BASE_URL = os.environ['API_BASE_URL']
9
+ # API_BASE_URL = "https://us-central1-equity-token-1.cloudfunctions.net/"
10
+
11
+ class AddToTrackerAnyFieldsInput(BaseModel):
12
+ firstName: str = Field(..., description="Investor's first name")
13
+ lastName: str = Field(default="", description="Investor's last name")
14
+ email: Optional[str] = Field(default="", description="Investor's email address")
15
+ location: Optional[str] = Field(default="", description="Investor's location")
16
+ organizationName: Optional[str] = Field(default="", description="Name of the investor's organization")
17
+ organizationWebsite: Optional[str] = Field(default="", description="Website of the investor's organization")
18
+ linkedIn: Optional[str] = Field(default="", description="Investor's LinkedIn profile URL")
19
+ twitter: Optional[str] = Field(default="", description="Investor's Twitter profile URL")
20
+ crunchbase: Optional[str] = Field(default="", description="Investor's Crunchbase profile URL")
21
+ angelList: Optional[str] = Field(default="", description="Investor's AngelList profile URL")
22
+ investmentRangeFrom: Optional[str] = Field(default="", description="Minimum investment range")
23
+ investmentRangeTo: Optional[str] = Field(default="", description="Maximum investment range")
24
+ investmentSweetSpot: Optional[str] = Field(default="", description="Investor's preferred investment amount")
25
+ fundSize: Optional[str] = Field(default="", description="Size of the investor's fund")
26
+ bio: Optional[str] = Field(default="", description="Short biography of the investor")
27
+ relevantPortfolioCompanies: Optional[str] = Field(default="", description="Relevant portfolio companies of the investor")
28
+ tags: Optional[List[str]] = Field(default=None, description="List of tags to assign when creating the investor. ALWAYS include ALL tags in THIS call as an array - do NOT use separate edit calls. When user says 'tag as X and Y' or 'add tags X, Y', put ALL tags in this array. Examples: tags=['Angel Investor'], tags=['Easy Investor', 'Interested'], tags=['Super Angel', 'Series A', 'Seed']. Tags are labels/categories - can have multiple per investor.")
29
+
30
+ def call_add_to_tracker_any_fields(config: RunnableConfig,
31
+ email: Optional[str] = "",
32
+ firstName: str = "",
33
+ lastName: str = "",
34
+ location: Optional[str] = "",
35
+ organizationName: Optional[str] = "",
36
+ organizationWebsite: Optional[str] = "",
37
+ linkedIn: Optional[str] = "",
38
+ twitter: Optional[str] = "",
39
+ crunchbase: Optional[str] = "",
40
+ angelList: Optional[str] = "",
41
+ investmentRangeFrom: Optional[str] = "",
42
+ investmentRangeTo: Optional[str] = "",
43
+ investmentSweetSpot: Optional[str] = "",
44
+ fundSize: Optional[str] = "",
45
+ bio: Optional[str] = "",
46
+ relevantPortfolioCompanies: Optional[str] = "",
47
+ tags: Optional[List[str]] = None):
48
+ """Given an input of different investor attributes, this functions adds all relevant investor field to Finta's CRM Tracker. Do not ask for more information, simply use what was given."""
49
+ org_info = config.get('configurable', {}).get("org_info", {})
50
+ handle = org_info["handle"]
51
+ sourceUserId = org_info["founderId"]
52
+ url = API_BASE_URL + "addTargetInvestorAnyFields"
53
+
54
+ # Process tags - clean and validate
55
+ cleaned_tags = None
56
+ if tags is not None:
57
+ if isinstance(tags, list):
58
+ cleaned_tags = []
59
+ for tag in tags:
60
+ if tag is None:
61
+ continue
62
+ if isinstance(tag, str):
63
+ stripped = tag.strip()
64
+ if stripped:
65
+ cleaned_tags.append(stripped)
66
+ else:
67
+ # If tag is not a string, convert to string
68
+ stripped = str(tag).strip()
69
+ if stripped:
70
+ cleaned_tags.append(stripped)
71
+ else:
72
+ # If single string provided by mistake, wrap it
73
+ cleaned_tags = [str(tags).strip()] if str(tags).strip() else []
74
+
75
+ data = {
76
+ "data": {
77
+ "organizationId": handle,
78
+ "sourceUserId": sourceUserId,
79
+ "investorFields": {
80
+ "email": email,
81
+ "firstName": firstName,
82
+ "lastName": lastName,
83
+ "location": location,
84
+ "organizationName": organizationName,
85
+ "organizationWebsite": organizationWebsite,
86
+ "linkedIn": linkedIn,
87
+ "twitter": twitter,
88
+ "crunchbase": crunchbase,
89
+ "angelList": angelList,
90
+ "investmentRangeFrom": investmentRangeFrom,
91
+ "investmentRangeTo": investmentRangeTo,
92
+ "investmentSweetSpot": investmentSweetSpot,
93
+ "fundSize": fundSize,
94
+ "bio": bio,
95
+ "relevantPortfolioCompanies": relevantPortfolioCompanies,
96
+ },
97
+ }
98
+ }
99
+
100
+ # Add tags to payload if provided (tags are stored at top-level, not in investorFields)
101
+ if cleaned_tags is not None:
102
+ data["data"]["tags"] = cleaned_tags
103
+
104
+ response = requests.post(url, json=data)
105
+ return 'Success! Investor added to Finta\'s CRM Tracker.'
106
+
107
+ add_to_tracker_any_fields_tool= StructuredTool.from_function(
108
+ func=call_add_to_tracker_any_fields,
109
+ name="AddToTrackerAnyFields",
110
+ description="""Given an input of different investor attributes, this functions adds all relevant investor field to Finta's CRM Tracker. Do not ask for more information, simply use what was given. When user says 'tag [name] as [tag]' or 'add tag [tag]', use the 'tags' parameter with an array (e.g., tags=['Super Angel']). Tags are labels/categories, NOT the same as 'grade' (which is a single rating).""",
111
+ args_schema=AddToTrackerAnyFieldsInput,
112
+ return_direct=True,
113
+ verbose=True
114
+ )
@@ -0,0 +1,7 @@
1
+ import os
2
+ from langchain_core.tools import tool
3
+
4
+ @tool
5
+ def contact_support_tool() -> str:
6
+ """Helps answer questions on where to go for more support, or if asked to contact support or talk to a human."""
7
+ return "Click on 'Get More Assistance' below to contact support."