iflow-mcp_OctagonAI-octagon-vc-agents 0.1.6__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.
- iflow_mcp_octagonai_octagon_vc_agents-0.1.6.dist-info/METADATA +230 -0
- iflow_mcp_octagonai_octagon_vc_agents-0.1.6.dist-info/RECORD +21 -0
- iflow_mcp_octagonai_octagon_vc_agents-0.1.6.dist-info/WHEEL +4 -0
- iflow_mcp_octagonai_octagon_vc_agents-0.1.6.dist-info/entry_points.txt +2 -0
- iflow_mcp_octagonai_octagon_vc_agents-0.1.6.dist-info/licenses/LICENSE +21 -0
- octagon_vc_agents/__init__.py +9 -0
- octagon_vc_agents/__main__.py +38 -0
- octagon_vc_agents/agent_registrar.py +71 -0
- octagon_vc_agents/cli.py +160 -0
- octagon_vc_agents/client.py +25 -0
- octagon_vc_agents/investors/alfred_lin.md +402 -0
- octagon_vc_agents/investors/bill_gurley.md +378 -0
- octagon_vc_agents/investors/fred_wilson.md +415 -0
- octagon_vc_agents/investors/josh_kopelman.md +396 -0
- octagon_vc_agents/investors/keith_rabois.md +391 -0
- octagon_vc_agents/investors/marc_andreessen.md +422 -0
- octagon_vc_agents/investors/peter_thiel.md +405 -0
- octagon_vc_agents/investors/reid_hoffman.md +374 -0
- octagon_vc_agents/openai_agents.py +161 -0
- octagon_vc_agents/server.py +33 -0
- octagon_vc_agents/vc_agents.py +43 -0
|
@@ -0,0 +1,230 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: iflow-mcp_OctagonAI-octagon-vc-agents
|
|
3
|
+
Version: 0.1.6
|
|
4
|
+
Summary: MCP server that runs AI-driven venture capitalist agents, enriched by Octagon Private Markets' real-time intelligence
|
|
5
|
+
Project-URL: Homepage, https://github.com/OctagonAI/octagon-vc-agents
|
|
6
|
+
Project-URL: Documentation, https://docs.octagonagents.com
|
|
7
|
+
Project-URL: Repository, https://github.com/OctagonAI/octagon-vc-agents.git
|
|
8
|
+
Project-URL: Issues, https://github.com/OctagonAI/octagon-vc-agents/issues
|
|
9
|
+
Author-email: Octagon AI <support@octagonagents.com>
|
|
10
|
+
License-Expression: MIT
|
|
11
|
+
License-File: LICENSE
|
|
12
|
+
Keywords: agents,ai,investment,startup,venture capital
|
|
13
|
+
Classifier: Development Status :: 4 - Beta
|
|
14
|
+
Classifier: Intended Audience :: Developers
|
|
15
|
+
Classifier: License :: OSI Approved :: MIT License
|
|
16
|
+
Classifier: Programming Language :: Python :: 3
|
|
17
|
+
Classifier: Programming Language :: Python :: 3.11
|
|
18
|
+
Classifier: Topic :: Office/Business :: Financial :: Investment
|
|
19
|
+
Classifier: Topic :: Software Development :: Libraries :: Python Modules
|
|
20
|
+
Requires-Python: >=3.11
|
|
21
|
+
Requires-Dist: mcp
|
|
22
|
+
Requires-Dist: openai
|
|
23
|
+
Requires-Dist: openai-agents
|
|
24
|
+
Requires-Dist: pydantic
|
|
25
|
+
Requires-Dist: requests
|
|
26
|
+
Requires-Dist: rich
|
|
27
|
+
Requires-Dist: typer
|
|
28
|
+
Requires-Dist: uvicorn
|
|
29
|
+
Provides-Extra: dev
|
|
30
|
+
Requires-Dist: black; extra == 'dev'
|
|
31
|
+
Requires-Dist: ipython>=9.0.2; extra == 'dev'
|
|
32
|
+
Requires-Dist: isort; extra == 'dev'
|
|
33
|
+
Requires-Dist: pytest; extra == 'dev'
|
|
34
|
+
Requires-Dist: pytest-cov; extra == 'dev'
|
|
35
|
+
Description-Content-Type: text/markdown
|
|
36
|
+
|
|
37
|
+
# Octagon VC Agents
|
|
38
|
+
|
|
39
|
+
[](https://smithery.ai/server/@OctagonAI/octagon-vc-agents)
|
|
40
|
+
|
|
41
|
+
An MCP server that runs AI-driven venture capitalist agents (Fred Wilson, Peter Thiel, etc.), whose thinking is continuously enriched by Octagon Private Markets' real-time deals, valuations, and deep research intelligence. Use it to spin up programmable "VC brains" for pitch feedback, diligence simulations, term sheet negotiations, and more.
|
|
42
|
+
|
|
43
|
+
<!-- Display at 60% wide and keep the aspect ratio -->
|
|
44
|
+
<img src="https://docs.octagonagents.com/octagon-vc-agents.png"
|
|
45
|
+
alt="Octagon VC Agents"
|
|
46
|
+
width="60%" />
|
|
47
|
+
|
|
48
|
+
## Try Demo in ChatGPT
|
|
49
|
+
VC Agents are also fully integrated them in ChatGPT with a demo Octagon API key. Give them a try here:
|
|
50
|
+
<a href="https://chatgpt.com/g/g-680c1eddd1448191bb4ed7e09485270f-vc-agents" target="_blank" rel="noopener noreferrer">VC Agents GPT</a>
|
|
51
|
+
|
|
52
|
+
|
|
53
|
+
## Octagon VC Agents
|
|
54
|
+
|
|
55
|
+
These are AI-powered simulations inspired by notable venture capitalists. These personas are not affiliated with or endorsed by the actual individuals.
|
|
56
|
+
|
|
57
|
+
| VC Agent Name | Description |
|
|
58
|
+
|------------|-------------|
|
|
59
|
+
| [`octagon-marc-andreessen-agent`](src/octagon_vc_agents/investors/marc_andreessen.md) | Simulation of the tech-optimist investor known for "software eating the world" thesis and bold technology bets |
|
|
60
|
+
| [`octagon-peter-thiel-agent`](src/octagon_vc_agents/investors/peter_thiel.md) | Simulation of the venture capitalist & 'Zero to One' author who analyzes investments through the lens of monopoly theory and contrarian thinking |
|
|
61
|
+
| [`octagon-reid-hoffman-agent`](src/octagon_vc_agents/investors/reid_hoffman.md) | Simulation of the LinkedIn founder-turned-investor known for network-effect businesses and blitzscaling philosophy |
|
|
62
|
+
| [`octagon-keith-rabois-agent`](src/octagon_vc_agents/investors/keith_rabois.md) | Simulation of the operator-investor known for spotting exceptional talent and operational excellence |
|
|
63
|
+
| [`octagon-bill-gurley-agent`](src/octagon_vc_agents/investors/bill_gurley.md) | Simulation of the analytical investor known for marketplace expertise and detailed market analysis |
|
|
64
|
+
| [`octagon-fred-wilson-agent`](src/octagon_vc_agents/investors/fred_wilson.md) | Simulation of the USV co-founder & veteran early-stage investor focused on community-driven networks and founder-first philosophies |
|
|
65
|
+
| [`octagon-josh-kopelman-agent`](src/octagon_vc_agents/investors/josh_kopelman.md) | Simulation of the founder-friendly investor focused on seed-stage companies and founder development |
|
|
66
|
+
| [`octagon-alfred-lin-agent`](src/octagon_vc_agents/investors/alfred_lin.md) | Simulation of the operator-turned-investor known for consumer businesses and organizational scaling |
|
|
67
|
+
|
|
68
|
+
## Example Prompts
|
|
69
|
+
|
|
70
|
+
| What you want from the agents | Copy-and-paste prompt |
|
|
71
|
+
|-------------------------------|-----------------------|
|
|
72
|
+
| Deal critique | Ask `@octagon-marc-andreessen-agent` and `@octagon-reid-hoffman-agent` to evaluate {company website}'s latest funding round. Provide a detailed comparative table from their points of view. |
|
|
73
|
+
| Qualify investor fit before the call | `@octagon-alfred-lin-agent` You're vetting my pre-seed startup: {one-sentence pitch}. In {deck.pdf}, you'll find our vision, team, and WAU chart. Give me a "meet/pass" decision and list the three metrics I should strengthen most before your partner vote on Monday. |
|
|
74
|
+
| Thesis & metrics reality-check | `@octagon-reid-hoffman-agent` Here's our 10-slide deck and dashboard ({docs}). We currently have {X} weekly active users, {Y}% MoM WAU growth, and {Z}% retention over 8 weeks. Using your 14-day diligence lens, list the biggest metric gaps that would prevent you from issuing a term sheet, and suggest how we could close them within one quarter. |
|
|
75
|
+
| Portfolio-intro mapping – warm leads for the next round | `@octagon-fred-wilson-agent` Based on your current portfolio in {data} and our focus (outlined in the one-pager below), identify four portfolio CEOs who could become design partners. For each CEO, draft a first-contact email from me that highlights mutual value. |
|
|
76
|
+
|
|
77
|
+
## Prerequisites
|
|
78
|
+
|
|
79
|
+
To use Octagon VC Agents, you will need **two API keys**:
|
|
80
|
+
- An **Octagon API key** (for access to Octagon Private Markets data)
|
|
81
|
+
- An **OpenAI API key** (for AI-powered analysis)
|
|
82
|
+
|
|
83
|
+
### Get Your Octagon API Key
|
|
84
|
+
|
|
85
|
+
To use VC Agents, you need to:
|
|
86
|
+
|
|
87
|
+
1. Sign up for a free account at [Octagon](https://app.octagonai.co/signup/?redirectToAfterSignup=https://app.octagonai.co/api-keys)
|
|
88
|
+
2. After logging in, from left menu, navigate to **API Keys**
|
|
89
|
+
3. Generate a new API key
|
|
90
|
+
4. Use this API key in your configuration as the `OCTAGON_API_KEY` value
|
|
91
|
+
|
|
92
|
+
### Get Your OpenAI API Key
|
|
93
|
+
|
|
94
|
+
You also need an OpenAI API key to enable AI-powered features:
|
|
95
|
+
|
|
96
|
+
1. Sign up or log in at [OpenAI](https://platform.openai.com/signup)
|
|
97
|
+
2. Go to [API Keys](https://platform.openai.com/api-keys)
|
|
98
|
+
3. Create a new API key
|
|
99
|
+
4. Use this API key in your configuration as the `OPENAI_API_KEY` value
|
|
100
|
+
|
|
101
|
+
### Install pipx
|
|
102
|
+
|
|
103
|
+
To use Octagon VC Agents, you need [pipx](https://pypa.github.io/pipx/), a tool for installing and running Python applications in isolated environments.
|
|
104
|
+
|
|
105
|
+
#### On macOS
|
|
106
|
+
Install pipx using Homebrew (recommended):
|
|
107
|
+
```bash
|
|
108
|
+
brew install pipx
|
|
109
|
+
pipx ensurepath
|
|
110
|
+
```
|
|
111
|
+
Or with pip:
|
|
112
|
+
```bash
|
|
113
|
+
python3 -m pip install --user pipx
|
|
114
|
+
python3 -m pipx ensurepath
|
|
115
|
+
```
|
|
116
|
+
|
|
117
|
+
#### On Windows
|
|
118
|
+
Install pipx using pip:
|
|
119
|
+
```powershell
|
|
120
|
+
python -m pip install --user pipx
|
|
121
|
+
python -m pipx ensurepath
|
|
122
|
+
```
|
|
123
|
+
After installation, restart your terminal so that the `pipx` command is available.
|
|
124
|
+
|
|
125
|
+
|
|
126
|
+
## Installation
|
|
127
|
+
|
|
128
|
+
### Running on Claude Desktop
|
|
129
|
+
|
|
130
|
+
To configure Octagon VC Agents for Claude Desktop:
|
|
131
|
+
|
|
132
|
+
1. Open Claude Desktop
|
|
133
|
+
2. Go to Settings > Developer > Edit Config
|
|
134
|
+
3. Add the following to your `claude_desktop_config.json` (Replace `YOUR_OCTAGON_API_KEY_HERE` with your Octagon API key and `YOUR_OPENAI_API_KEY_HERE` with your OpenAI API key):
|
|
135
|
+
```json
|
|
136
|
+
{
|
|
137
|
+
"mcpServers": {
|
|
138
|
+
"octagon-vc-agents": {
|
|
139
|
+
"command": "pipx",
|
|
140
|
+
"args": ["run", "--pip-args=\"--no-cache-dir\"", "octagon-vc-agents", "run"],
|
|
141
|
+
"env": {
|
|
142
|
+
"OPENAI_API_KEY": "YOUR_OPENAI_API_KEY_HERE",
|
|
143
|
+
"OCTAGON_API_KEY": "YOUR_OCTAGON_API_KEY_HERE"
|
|
144
|
+
}
|
|
145
|
+
}
|
|
146
|
+
}
|
|
147
|
+
}
|
|
148
|
+
```
|
|
149
|
+
4. Restart Claude for the changes to take effect
|
|
150
|
+
|
|
151
|
+
|
|
152
|
+
|
|
153
|
+
### Running on Cursor
|
|
154
|
+
|
|
155
|
+
Configuring Cursor Desktop 🖥️
|
|
156
|
+
Note: Requires Cursor version 0.45.6+
|
|
157
|
+
|
|
158
|
+
To configure Octagon VC Agents in Cursor:
|
|
159
|
+
|
|
160
|
+
1. Open Cursor Settings
|
|
161
|
+
2. Go to Features > MCP Servers
|
|
162
|
+
3. Click "+ Add New MCP Server"
|
|
163
|
+
4. Enter the following:
|
|
164
|
+
- Name: "octagon-mcp" (or your preferred name)
|
|
165
|
+
- Type: "command"
|
|
166
|
+
- Command: `env OCTAGON_API_KEY=YOUR_OCTAGON_API_KEY_HERE OPENAI_API_KEY=YOUR_OPENAI_API_KEY_HERE pipx run --pip-args="--no-cache-dir" octagon-vc-agents run`
|
|
167
|
+
|
|
168
|
+
> If you are using Windows and are running into issues, try `cmd /c "set OCTAGON_API_KEY=YOUR_OCTAGON_API_KEY_HERE && set OPENAI_API_KEY=YOUR_OPENAI_API_KEY_HERE && pipx run --pip-args='--no-cache-dir' octagon-vc-agents run"`
|
|
169
|
+
|
|
170
|
+
Replace `YOUR_OCTAGON_API_KEY_HERE` with your Octagon API key and `YOUR_OPENAI_API_KEY_HERE` with your OpenAI API key.
|
|
171
|
+
|
|
172
|
+
After adding, refresh the MCP server list to see the new tools. The Composer Agent will automatically use VC Agents when appropriate, but you can explicitly request it by describing your investment research needs. Access the Composer via Command+L (Mac), select "Agent" next to the submit button, and enter your query.
|
|
173
|
+
|
|
174
|
+
|
|
175
|
+
### Running on Windsurf
|
|
176
|
+
|
|
177
|
+
Add this to your `./codeium/windsurf/model_config.json`:
|
|
178
|
+
|
|
179
|
+
```json
|
|
180
|
+
{
|
|
181
|
+
"mcpServers": {
|
|
182
|
+
"octagon-vc-agents": {
|
|
183
|
+
"command": "pipx",
|
|
184
|
+
"args": ["run", "--pip-args=\"--no-cache-dir\"", "octagon-vc-agents", "run"],
|
|
185
|
+
"env": {
|
|
186
|
+
"OPENAI_API_KEY": "YOUR_OPENAI_API_KEY_HERE",
|
|
187
|
+
"OCTAGON_API_KEY": "YOUR_OCTAGON_API_KEY_HERE"
|
|
188
|
+
}
|
|
189
|
+
}
|
|
190
|
+
}
|
|
191
|
+
}
|
|
192
|
+
```
|
|
193
|
+
|
|
194
|
+
### Running with pipx
|
|
195
|
+
|
|
196
|
+
```bash
|
|
197
|
+
env OCTAGON_API_KEY=YOUR_OCTAGON_API_KEY_HERE OPENAI_API_KEY=YOUR_OPENAI_API_KEY_HERE pipx run --pip-args="--no-cache-dir" octagon-vc-agents run
|
|
198
|
+
```
|
|
199
|
+
|
|
200
|
+
### Manual Installation
|
|
201
|
+
|
|
202
|
+
```bash
|
|
203
|
+
pip install octagon-vc-agents
|
|
204
|
+
```
|
|
205
|
+
|
|
206
|
+
## Implementation Details
|
|
207
|
+
|
|
208
|
+
### Persona Configuration
|
|
209
|
+
|
|
210
|
+
Investor personas are defined through markdown files containing:
|
|
211
|
+
- Investment philosophy
|
|
212
|
+
- Psychological profile
|
|
213
|
+
- Historical track record
|
|
214
|
+
- Decision-making patterns
|
|
215
|
+
- Communication style preferences
|
|
216
|
+
|
|
217
|
+
### Customization Options
|
|
218
|
+
|
|
219
|
+
1. Add new investor personas by creating markdown profiles
|
|
220
|
+
2. Implement custom interaction patterns between personas
|
|
221
|
+
3. Enhance orchestration logic for complex multi-perspective analysis
|
|
222
|
+
|
|
223
|
+
|
|
224
|
+
## Documentation
|
|
225
|
+
|
|
226
|
+
For detailed information about Octagon Agents, including setup guides, API reference, and best practices, visit our [documentation](https://docs.octagonagents.com).
|
|
227
|
+
|
|
228
|
+
## License
|
|
229
|
+
MIT
|
|
230
|
+
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
octagon_vc_agents/__init__.py,sha256=Sfm8dbEKCPUDwkWqIUqkg3JSPl5Gk72STg82_3dUDdI,165
|
|
2
|
+
octagon_vc_agents/__main__.py,sha256=WPf0Zq2ICiCBG_4_0PKpdZ1xTyboKhrNWC0mkn71ARg,1124
|
|
3
|
+
octagon_vc_agents/agent_registrar.py,sha256=o4Sch0FFmvw8xnhkmFY7G6rCNGIB1PPXnAtCAA9U7_Q,2856
|
|
4
|
+
octagon_vc_agents/cli.py,sha256=U_HfUKZGUeoP064OqQSceX6QZanhiTD09eVPOQIDh8k,5233
|
|
5
|
+
octagon_vc_agents/client.py,sha256=ad5qaOU8IHM6ChoJ_SJABLsZdE-DfBTVq-qtlwo2tik,746
|
|
6
|
+
octagon_vc_agents/openai_agents.py,sha256=nhx0r3cuaGBsHnBRe_JUQL4s2PImZIo-Ro-FEQcS3m0,7052
|
|
7
|
+
octagon_vc_agents/server.py,sha256=-TGi35ENap7O6N1InHUc7KfhHrg4n7qNIaXJrHZ05CY,986
|
|
8
|
+
octagon_vc_agents/vc_agents.py,sha256=1D_dw9BU5Hv4PdHBRFLPUeX9wan3vHgSTfZ8mn8wMJs,1436
|
|
9
|
+
octagon_vc_agents/investors/alfred_lin.md,sha256=orpzGsNu0UjBUMtzlyFWaO6U7GPqBRD3v0ataURBiwk,13480
|
|
10
|
+
octagon_vc_agents/investors/bill_gurley.md,sha256=Be1nR-aT16lmC_nhpztBAvmyDthwIkO1PmWxzMaLpB0,13065
|
|
11
|
+
octagon_vc_agents/investors/fred_wilson.md,sha256=hOKJA9FgC3K1iDMlRJ0TYIsbIYFTa9_TvCy1ZGQHAUQ,16229
|
|
12
|
+
octagon_vc_agents/investors/josh_kopelman.md,sha256=EXbT6v0vqKZ7R444TB5wNfAgoODonwmtJCfBC2jRUFs,14547
|
|
13
|
+
octagon_vc_agents/investors/keith_rabois.md,sha256=2Rusz-hL-8xPlDzMIY4mfpmaaV8eTTNLhwlG0w9cT2Y,13939
|
|
14
|
+
octagon_vc_agents/investors/marc_andreessen.md,sha256=CBJAC7ZSKYpwPzXNPM1NxfRPjFTeKaZNHMgEJM5Kvxs,15420
|
|
15
|
+
octagon_vc_agents/investors/peter_thiel.md,sha256=LxA86xREa7aT4ifQSG2P-A5ixlO1zBimSrTLe2Nm1rU,15348
|
|
16
|
+
octagon_vc_agents/investors/reid_hoffman.md,sha256=uJYj3Q54KDj8a3VII6j9dX7Smidi55AxRQRZOvL-8Co,13175
|
|
17
|
+
iflow_mcp_octagonai_octagon_vc_agents-0.1.6.dist-info/METADATA,sha256=v-0JAGJboIk1TtTCfYj-S5IjkZH2vBMySPCL_lOAxLY,10247
|
|
18
|
+
iflow_mcp_octagonai_octagon_vc_agents-0.1.6.dist-info/WHEEL,sha256=WLgqFyCfm_KASv4WHyYy0P3pM_m7J5L9k2skdKLirC8,87
|
|
19
|
+
iflow_mcp_octagonai_octagon_vc_agents-0.1.6.dist-info/entry_points.txt,sha256=koZmpMpNXJQ4w9guIdpQLkUE7GSMRfx0hOkjRCmuGWo,65
|
|
20
|
+
iflow_mcp_octagonai_octagon_vc_agents-0.1.6.dist-info/licenses/LICENSE,sha256=JStnDfH22ZZI5bH9Fvf-j5jNQVSJAZ4l_-46t0_ph3U,1073
|
|
21
|
+
iflow_mcp_octagonai_octagon_vc_agents-0.1.6.dist-info/RECORD,,
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2025 Octagon AI, Inc.
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
"""
|
|
2
|
+
Main entry point for the Octagon octagon-vc-agents.
|
|
3
|
+
|
|
4
|
+
This module provides the main entry point for running the MCP server.
|
|
5
|
+
"""
|
|
6
|
+
|
|
7
|
+
import os
|
|
8
|
+
import sys
|
|
9
|
+
|
|
10
|
+
from octagon_vc_agents.server import mcp
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
def main() -> None:
|
|
14
|
+
"""Run the MCP server."""
|
|
15
|
+
# Check if the OpenAI API key is set
|
|
16
|
+
if not os.environ.get("OPENAI_API_KEY"):
|
|
17
|
+
print("Error: OPENAI_API_KEY environment variable is not set.")
|
|
18
|
+
print("Please set it before running the server.")
|
|
19
|
+
sys.exit(1)
|
|
20
|
+
|
|
21
|
+
# Check if the Octagon API key is set
|
|
22
|
+
if not os.environ.get("OCTAGON_API_KEY"):
|
|
23
|
+
print("Error: OCTAGON_API_KEY environment variable is not set.")
|
|
24
|
+
print("Obtain your API key at https://app.octagonai.co/signup")
|
|
25
|
+
print("Please set it before running the server.")
|
|
26
|
+
sys.exit(1)
|
|
27
|
+
|
|
28
|
+
# Get the transport from environment variables or use default
|
|
29
|
+
transport = os.environ.get("MCP_TRANSPORT", "stdio")
|
|
30
|
+
|
|
31
|
+
print(f"Starting OpenAI Agents MCP server with {transport} transport")
|
|
32
|
+
|
|
33
|
+
# Run the server using the FastMCP's run method
|
|
34
|
+
mcp.run(transport=transport)
|
|
35
|
+
|
|
36
|
+
|
|
37
|
+
if __name__ == "__main__":
|
|
38
|
+
main()
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
|
|
2
|
+
from typing import Callable
|
|
3
|
+
from pydantic import BaseModel, Field
|
|
4
|
+
from mcp.server.fastmcp import FastMCP
|
|
5
|
+
from agents import Runner, trace, ItemHelpers, MessageOutputItem, Agent
|
|
6
|
+
|
|
7
|
+
class AgentResponse(BaseModel):
|
|
8
|
+
response: str
|
|
9
|
+
|
|
10
|
+
class AgentRegistrar:
|
|
11
|
+
def __init__(self, mcp: FastMCP):
|
|
12
|
+
self.mcp = mcp
|
|
13
|
+
|
|
14
|
+
def register(
|
|
15
|
+
self,
|
|
16
|
+
*,
|
|
17
|
+
name: str,
|
|
18
|
+
description: str,
|
|
19
|
+
build_agent: Callable[[], object],
|
|
20
|
+
vc_agent: bool = False,
|
|
21
|
+
has_field_description: bool = False,
|
|
22
|
+
octagon_activated: bool = False
|
|
23
|
+
):
|
|
24
|
+
"""
|
|
25
|
+
Registers an agent as an MCP tool.
|
|
26
|
+
|
|
27
|
+
Args:
|
|
28
|
+
name (str): Display name of the agent (used in tool name).
|
|
29
|
+
description (str): Description shown in the tool.
|
|
30
|
+
build_agent (Callable): Function that returns an initialized Agent.
|
|
31
|
+
traced (bool): Whether to wrap the agent run in a tracing context.
|
|
32
|
+
has_field_description (bool): Whether to apply a field-level description to the input.
|
|
33
|
+
"""
|
|
34
|
+
agent = build_agent()
|
|
35
|
+
tool_name = f"octagon-{name.lower().replace(' ', '-')}-agent"
|
|
36
|
+
|
|
37
|
+
# Conditionally define the tool with or without input field metadata
|
|
38
|
+
if has_field_description:
|
|
39
|
+
@self.mcp.tool(name=tool_name, description=description)
|
|
40
|
+
async def _tool(query: str = Field(..., description="Investment-related question or query.")) -> AgentResponse:
|
|
41
|
+
return await self._run_agent(agent, query, name, vc_agent)
|
|
42
|
+
else:
|
|
43
|
+
@self.mcp.tool(name=tool_name, description=description)
|
|
44
|
+
async def _tool(query: str) -> AgentResponse:
|
|
45
|
+
return await self._run_agent(agent, query, name, vc_agent)
|
|
46
|
+
|
|
47
|
+
async def _run_agent(self, agent, query: str, name: str, vc_agent: bool) -> AgentResponse:
|
|
48
|
+
try:
|
|
49
|
+
if vc_agent:
|
|
50
|
+
with trace(f"{name} analysis"):
|
|
51
|
+
# Agent runs first, fetching data internally via tools
|
|
52
|
+
orchestrator_result = await Runner.run(agent, query)
|
|
53
|
+
|
|
54
|
+
# Capture interim outputs (stock data fetched)
|
|
55
|
+
for item in orchestrator_result.new_items:
|
|
56
|
+
if isinstance(item, MessageOutputItem):
|
|
57
|
+
text = ItemHelpers.text_message_output(item)
|
|
58
|
+
if text:
|
|
59
|
+
print(f" - Data fetched: {text}")
|
|
60
|
+
|
|
61
|
+
final_output = orchestrator_result.final_output
|
|
62
|
+
else:
|
|
63
|
+
# Regular agent execution without orchestration
|
|
64
|
+
result = await Runner.run(agent, query)
|
|
65
|
+
final_output = result.final_output
|
|
66
|
+
|
|
67
|
+
return AgentResponse(response=final_output)
|
|
68
|
+
|
|
69
|
+
except Exception as e:
|
|
70
|
+
return AgentResponse(response=str(e))
|
|
71
|
+
|
octagon_vc_agents/cli.py
ADDED
|
@@ -0,0 +1,160 @@
|
|
|
1
|
+
"""
|
|
2
|
+
Command-line interface for the Octagon VC Agents.
|
|
3
|
+
|
|
4
|
+
This module provides a command-line interface for running and installing the MCP server.
|
|
5
|
+
"""
|
|
6
|
+
|
|
7
|
+
import getpass
|
|
8
|
+
import json
|
|
9
|
+
import os
|
|
10
|
+
import platform
|
|
11
|
+
import sys
|
|
12
|
+
from pathlib import Path
|
|
13
|
+
from typing import Dict, List, Optional
|
|
14
|
+
|
|
15
|
+
import typer
|
|
16
|
+
from openai import OpenAI
|
|
17
|
+
from rich.console import Console
|
|
18
|
+
|
|
19
|
+
from .server import mcp # Import the MCP server instance directly
|
|
20
|
+
from .client import octagon_client # Import the Octagon client instance
|
|
21
|
+
|
|
22
|
+
app = typer.Typer(help="Octagon VC Agents - AI-driven venture capitalist agents powered by Octagon Private Markets")
|
|
23
|
+
console = Console()
|
|
24
|
+
|
|
25
|
+
|
|
26
|
+
def which(cmd: str, path: Optional[str] = None) -> Optional[str]:
|
|
27
|
+
"""Find the path to an executable."""
|
|
28
|
+
if path is None:
|
|
29
|
+
path = os.environ.get("PATH", "")
|
|
30
|
+
|
|
31
|
+
if platform.system() == "Windows":
|
|
32
|
+
cmd = cmd + ".exe"
|
|
33
|
+
paths = path.split(";")
|
|
34
|
+
else:
|
|
35
|
+
paths = path.split(":")
|
|
36
|
+
|
|
37
|
+
for p in paths:
|
|
38
|
+
cmd_path = os.path.join(p, cmd)
|
|
39
|
+
if os.path.isfile(cmd_path) and os.access(cmd_path, os.X_OK):
|
|
40
|
+
return cmd_path
|
|
41
|
+
|
|
42
|
+
return None
|
|
43
|
+
|
|
44
|
+
|
|
45
|
+
def update_claude_config(
|
|
46
|
+
server_name: str, command: str, args: List[str], env_vars: Optional[Dict[str, str]] = None
|
|
47
|
+
) -> bool:
|
|
48
|
+
"""Update the Claude desktop app configuration to include this server."""
|
|
49
|
+
# Find the Claude config file
|
|
50
|
+
config_file = None
|
|
51
|
+
if platform.system() == "Darwin": # macOS
|
|
52
|
+
config_file = Path(
|
|
53
|
+
Path.home(), "Library", "Application Support", "Claude", "servers_config.json"
|
|
54
|
+
)
|
|
55
|
+
elif platform.system() == "Windows":
|
|
56
|
+
config_file = Path(Path.home(), "AppData", "Roaming", "Claude", "servers_config.json")
|
|
57
|
+
elif platform.system() == "Linux":
|
|
58
|
+
config_file = Path(Path.home(), ".config", "Claude", "servers_config.json")
|
|
59
|
+
|
|
60
|
+
if not config_file:
|
|
61
|
+
console.print("[bold red]Error:[/] Could not determine Claude config file location.")
|
|
62
|
+
return False
|
|
63
|
+
|
|
64
|
+
# Create the config file if it doesn't exist
|
|
65
|
+
config_file.parent.mkdir(parents=True, exist_ok=True)
|
|
66
|
+
if not config_file.exists():
|
|
67
|
+
config_file.write_text("{}")
|
|
68
|
+
|
|
69
|
+
try:
|
|
70
|
+
config = json.loads(config_file.read_text())
|
|
71
|
+
if "mcpServers" not in config:
|
|
72
|
+
config["mcpServers"] = {}
|
|
73
|
+
|
|
74
|
+
# Always preserve existing env vars and merge with new ones
|
|
75
|
+
if server_name in config["mcpServers"] and "env" in config["mcpServers"][server_name]:
|
|
76
|
+
existing_env = config["mcpServers"][server_name]["env"]
|
|
77
|
+
if env_vars:
|
|
78
|
+
# New vars take precedence over existing ones
|
|
79
|
+
env_vars = {**existing_env, **env_vars}
|
|
80
|
+
else:
|
|
81
|
+
env_vars = existing_env
|
|
82
|
+
|
|
83
|
+
server_config = {"command": command, "args": args}
|
|
84
|
+
|
|
85
|
+
# Add environment variables if specified
|
|
86
|
+
if env_vars:
|
|
87
|
+
server_config["env"] = env_vars
|
|
88
|
+
|
|
89
|
+
config["mcpServers"][server_name] = server_config
|
|
90
|
+
|
|
91
|
+
config_file.write_text(json.dumps(config, indent=2))
|
|
92
|
+
console.print(f"[bold green]Success:[/] Added server '{server_name}' to Claude config")
|
|
93
|
+
return True
|
|
94
|
+
except Exception as e:
|
|
95
|
+
console.print(f"[bold red]Error:[/] Failed to update Claude config: {str(e)}")
|
|
96
|
+
return False
|
|
97
|
+
|
|
98
|
+
|
|
99
|
+
@app.command()
|
|
100
|
+
def run() -> None:
|
|
101
|
+
"""Run the Octagon Investor Agents Tool MCP server."""
|
|
102
|
+
mcp.run()
|
|
103
|
+
|
|
104
|
+
|
|
105
|
+
@app.command()
|
|
106
|
+
def install() -> None:
|
|
107
|
+
"""Install the server in the Claude desktop app."""
|
|
108
|
+
name = "octagon-vc-agents"
|
|
109
|
+
|
|
110
|
+
env_dict = {}
|
|
111
|
+
local_bin = Path(Path.home(), ".local", "bin")
|
|
112
|
+
pyenv_shims = Path(Path.home(), ".pyenv", "shims")
|
|
113
|
+
path = os.environ["PATH"]
|
|
114
|
+
python_version = platform.python_version()
|
|
115
|
+
python_bin = Path(Path.home(), "Library", "Python", python_version, "bin")
|
|
116
|
+
|
|
117
|
+
if platform.system() == "Windows":
|
|
118
|
+
env_dict["PATH"] = f"{local_bin};{pyenv_shims};{python_bin};{path}"
|
|
119
|
+
else:
|
|
120
|
+
env_dict["PATH"] = f"{local_bin}:{pyenv_shims}:{python_bin}:{path}"
|
|
121
|
+
|
|
122
|
+
api_key = os.environ.get("OPENAI_API_KEY", "")
|
|
123
|
+
while not api_key:
|
|
124
|
+
api_key = getpass.getpass("Enter your OpenAI API key: ")
|
|
125
|
+
if api_key:
|
|
126
|
+
client = OpenAI(api_key=api_key)
|
|
127
|
+
try:
|
|
128
|
+
client.models.list()
|
|
129
|
+
except Exception as e:
|
|
130
|
+
console.print(
|
|
131
|
+
f"[bold red]Error:[/] Failed to authenticate with OpenAI API: {str(e)}"
|
|
132
|
+
)
|
|
133
|
+
api_key = ""
|
|
134
|
+
|
|
135
|
+
env_dict["OPENAI_API_KEY"] = api_key
|
|
136
|
+
|
|
137
|
+
# Add Octagon API key
|
|
138
|
+
octagon_api_key = os.environ.get("OCTAGON_API_KEY", "")
|
|
139
|
+
while not octagon_api_key:
|
|
140
|
+
octagon_api_key = getpass.getpass("Enter your Octagon API key: ")
|
|
141
|
+
env_dict["OCTAGON_API_KEY"] = octagon_api_key
|
|
142
|
+
|
|
143
|
+
uv = which("uvx", path=env_dict["PATH"])
|
|
144
|
+
command = uv if uv else "uvx"
|
|
145
|
+
args = [name]
|
|
146
|
+
|
|
147
|
+
if update_claude_config(name, command, args, env_vars=env_dict):
|
|
148
|
+
console.print(f"[bold green]Success:[/] Successfully installed {name} in Claude app")
|
|
149
|
+
else:
|
|
150
|
+
console.print(f"[bold red]Error:[/] Failed to install {name} in Claude app")
|
|
151
|
+
sys.exit(1)
|
|
152
|
+
|
|
153
|
+
|
|
154
|
+
def main():
|
|
155
|
+
"""Entry point for the CLI when installed via pip/pipx."""
|
|
156
|
+
app()
|
|
157
|
+
|
|
158
|
+
|
|
159
|
+
if __name__ == "__main__":
|
|
160
|
+
main()
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
"""
|
|
2
|
+
Octagon client configuration and initialization.
|
|
3
|
+
"""
|
|
4
|
+
|
|
5
|
+
import os
|
|
6
|
+
import sys
|
|
7
|
+
from openai import AsyncOpenAI
|
|
8
|
+
from rich.console import Console
|
|
9
|
+
|
|
10
|
+
console = Console()
|
|
11
|
+
|
|
12
|
+
def get_octagon_client() -> AsyncOpenAI:
|
|
13
|
+
"""Initialize and return Octagon client with current environment variables"""
|
|
14
|
+
api_key = os.environ.get("OCTAGON_API_KEY")
|
|
15
|
+
if not api_key:
|
|
16
|
+
console.print("[bold red]Error:[/] OCTAGON_API_KEY environment variable is not set")
|
|
17
|
+
console.print("Please set it using: export OCTAGON_API_KEY=your_api_key")
|
|
18
|
+
sys.exit(1)
|
|
19
|
+
|
|
20
|
+
return AsyncOpenAI(
|
|
21
|
+
api_key=api_key,
|
|
22
|
+
base_url=os.environ.get("OCTAGON_BASE_URL", "https://api-gateway.octagonagents.com/v1")
|
|
23
|
+
)
|
|
24
|
+
|
|
25
|
+
octagon_client = get_octagon_client()
|