lola-mcp-server 0.1.0__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.
- lola_mcp_server-0.1.0/PKG-INFO +6 -0
- lola_mcp_server-0.1.0/README.md +24 -0
- lola_mcp_server-0.1.0/lola_mcp_server.egg-info/PKG-INFO +6 -0
- lola_mcp_server-0.1.0/lola_mcp_server.egg-info/SOURCES.txt +9 -0
- lola_mcp_server-0.1.0/lola_mcp_server.egg-info/dependency_links.txt +1 -0
- lola_mcp_server-0.1.0/lola_mcp_server.egg-info/entry_points.txt +2 -0
- lola_mcp_server-0.1.0/lola_mcp_server.egg-info/requires.txt +2 -0
- lola_mcp_server-0.1.0/lola_mcp_server.egg-info/top_level.txt +1 -0
- lola_mcp_server-0.1.0/public_mcp_server.py +95 -0
- lola_mcp_server-0.1.0/pyproject.toml +11 -0
- lola_mcp_server-0.1.0/setup.cfg +4 -0
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
# Lola MCP Server
|
|
2
|
+
|
|
3
|
+
This MCP server allows MCP-compatible clients (Claude, OpenAI, Cursor, etc.)
|
|
4
|
+
to access Lola and HubSpot tools via MCP.
|
|
5
|
+
|
|
6
|
+
## Installation
|
|
7
|
+
|
|
8
|
+
pip install lola-mcp-server
|
|
9
|
+
|
|
10
|
+
## MCP Configuration
|
|
11
|
+
|
|
12
|
+
Add to your MCP config:
|
|
13
|
+
|
|
14
|
+
{
|
|
15
|
+
"mcpServers": {
|
|
16
|
+
"lola-suite": {
|
|
17
|
+
"command": "lola-mcp-server",
|
|
18
|
+
"env": {
|
|
19
|
+
"LOLA_BASE_URL": "https://extraneous-blaine-seclusive.ngrok-free.dev",
|
|
20
|
+
"LOLA_API_KEY": "SUPER_SECRET_KEY_123"
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
README.md
|
|
2
|
+
public_mcp_server.py
|
|
3
|
+
pyproject.toml
|
|
4
|
+
lola_mcp_server.egg-info/PKG-INFO
|
|
5
|
+
lola_mcp_server.egg-info/SOURCES.txt
|
|
6
|
+
lola_mcp_server.egg-info/dependency_links.txt
|
|
7
|
+
lola_mcp_server.egg-info/entry_points.txt
|
|
8
|
+
lola_mcp_server.egg-info/requires.txt
|
|
9
|
+
lola_mcp_server.egg-info/top_level.txt
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
public_mcp_server
|
|
@@ -0,0 +1,95 @@
|
|
|
1
|
+
from mcp.server.fastmcp import FastMCP
|
|
2
|
+
import httpx
|
|
3
|
+
import os
|
|
4
|
+
import asyncio
|
|
5
|
+
|
|
6
|
+
mcp = FastMCP("Lola Suite MCP Bridge")
|
|
7
|
+
|
|
8
|
+
# Change only via ENV later (no code edits needed)
|
|
9
|
+
BASE_URL = os.getenv(
|
|
10
|
+
"LOLA_BASE_URL",
|
|
11
|
+
"https://extraneous-blaine-seclusive.ngrok-free.dev"
|
|
12
|
+
)
|
|
13
|
+
|
|
14
|
+
API_KEY = os.getenv("LOLA_API_KEY", "SUPER_SECRET_KEY_123")
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
def headers():
|
|
18
|
+
return {
|
|
19
|
+
"Authorization": f"Bearer {API_KEY}",
|
|
20
|
+
"Content-Type": "application/json",
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
|
|
24
|
+
# ---------------- HEALTH CHECK ----------------
|
|
25
|
+
|
|
26
|
+
async def health_check():
|
|
27
|
+
async with httpx.AsyncClient(timeout=10.0) as client:
|
|
28
|
+
try:
|
|
29
|
+
r = await client.get(f"{BASE_URL}/tools_lola", headers=headers())
|
|
30
|
+
r.raise_for_status()
|
|
31
|
+
print(" Connected to backend:", BASE_URL)
|
|
32
|
+
except Exception as e:
|
|
33
|
+
raise RuntimeError(
|
|
34
|
+
f"Cannot reach backend at {BASE_URL}. "
|
|
35
|
+
"Make sure FastAPI and ngrok are running."
|
|
36
|
+
) from e
|
|
37
|
+
|
|
38
|
+
|
|
39
|
+
# ---------------- HUBSPOT ----------------
|
|
40
|
+
|
|
41
|
+
@mcp.tool()
|
|
42
|
+
async def hubspot_list_tools():
|
|
43
|
+
"""List all HubSpot tools"""
|
|
44
|
+
async with httpx.AsyncClient(timeout=30.0) as client:
|
|
45
|
+
r = await client.get(f"{BASE_URL}/tools_hubspot", headers=headers())
|
|
46
|
+
r.raise_for_status()
|
|
47
|
+
return r.json()
|
|
48
|
+
|
|
49
|
+
|
|
50
|
+
@mcp.tool()
|
|
51
|
+
async def hubspot_call_tool(name: str, arguments: dict):
|
|
52
|
+
"""Call a HubSpot tool"""
|
|
53
|
+
async with httpx.AsyncClient(timeout=30.0) as client:
|
|
54
|
+
r = await client.post(
|
|
55
|
+
f"{BASE_URL}/call_hubspot",
|
|
56
|
+
json={"name": name, "arguments": arguments},
|
|
57
|
+
headers=headers(),
|
|
58
|
+
)
|
|
59
|
+
r.raise_for_status()
|
|
60
|
+
return r.json()
|
|
61
|
+
|
|
62
|
+
|
|
63
|
+
# ---------------- LOLA ----------------
|
|
64
|
+
|
|
65
|
+
@mcp.tool()
|
|
66
|
+
async def lola_list_tools():
|
|
67
|
+
"""List all Lola tools"""
|
|
68
|
+
async with httpx.AsyncClient(timeout=30.0) as client:
|
|
69
|
+
r = await client.get(f"{BASE_URL}/tools_lola", headers=headers())
|
|
70
|
+
r.raise_for_status()
|
|
71
|
+
return r.json()
|
|
72
|
+
|
|
73
|
+
|
|
74
|
+
@mcp.tool()
|
|
75
|
+
async def lola_call_tool(name: str, arguments: dict):
|
|
76
|
+
"""Call a Lola tool"""
|
|
77
|
+
async with httpx.AsyncClient(timeout=30.0) as client:
|
|
78
|
+
r = await client.post(
|
|
79
|
+
f"{BASE_URL}/call_lola",
|
|
80
|
+
json={"name": name, "arguments": arguments},
|
|
81
|
+
headers=headers(),
|
|
82
|
+
)
|
|
83
|
+
r.raise_for_status()
|
|
84
|
+
return r.json()
|
|
85
|
+
|
|
86
|
+
|
|
87
|
+
# ---------------- MAIN ----------------
|
|
88
|
+
|
|
89
|
+
def main():
|
|
90
|
+
asyncio.run(health_check())
|
|
91
|
+
mcp.run()
|
|
92
|
+
|
|
93
|
+
|
|
94
|
+
if __name__ == "__main__":
|
|
95
|
+
main()
|