universal-mcp-applications 0.1.4__py3-none-any.whl → 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.
Potentially problematic release.
This version of universal-mcp-applications might be problematic. Click here for more details.
- universal_mcp/applications/scraper/README.md +15 -0
- universal_mcp/applications/scraper/__init__.py +1 -0
- universal_mcp/applications/scraper/app.py +189 -0
- {universal_mcp_applications-0.1.4.dist-info → universal_mcp_applications-0.1.6.dist-info}/METADATA +1 -1
- {universal_mcp_applications-0.1.4.dist-info → universal_mcp_applications-0.1.6.dist-info}/RECORD +7 -4
- {universal_mcp_applications-0.1.4.dist-info → universal_mcp_applications-0.1.6.dist-info}/WHEEL +0 -0
- {universal_mcp_applications-0.1.4.dist-info → universal_mcp_applications-0.1.6.dist-info}/licenses/LICENSE +0 -0
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
# ScraperApp MCP Server
|
|
2
|
+
|
|
3
|
+
An MCP Server for the ScraperApp API.
|
|
4
|
+
|
|
5
|
+
## 🛠️ Tool List
|
|
6
|
+
|
|
7
|
+
This is automatically generated from OpenAPI schema for the ScraperApp API.
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
| Tool | Description |
|
|
11
|
+
|------|-------------|
|
|
12
|
+
| `linkedin_post_search` | Performs a LinkedIn search for posts. |
|
|
13
|
+
| `linkedin_list_all_posts` | Lists all LinkedIn posts for a given user identifier |
|
|
14
|
+
| `linkedin_retrieve_profile` | Retrieves a specific LinkedIn user profile by its identifier. |
|
|
15
|
+
| `linkedin_list_post_comments` | Lists all comments from a specific LinkedIn post. Can also list replies to a specific comment. |
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
from .app import ScraperApp
|
|
@@ -0,0 +1,189 @@
|
|
|
1
|
+
import os
|
|
2
|
+
from dotenv import load_dotenv
|
|
3
|
+
load_dotenv()
|
|
4
|
+
|
|
5
|
+
from typing import Any
|
|
6
|
+
|
|
7
|
+
from universal_mcp.applications.application import APIApplication
|
|
8
|
+
from universal_mcp.agentr.integration import AgentrIntegration
|
|
9
|
+
from universal_mcp.applications.unipile import UnipileApp
|
|
10
|
+
from typing import Any, Optional
|
|
11
|
+
|
|
12
|
+
class ScraperApp(APIApplication):
|
|
13
|
+
"""
|
|
14
|
+
Application for interacting with LinkedIn API.
|
|
15
|
+
Provides a simplified interface for LinkedIn search operations.
|
|
16
|
+
"""
|
|
17
|
+
|
|
18
|
+
def __init__(self, **kwargs: Any) -> None:
|
|
19
|
+
"""
|
|
20
|
+
Initialize the ScraperApp.
|
|
21
|
+
|
|
22
|
+
Args:
|
|
23
|
+
integration: The integration configuration containing credentials and other settings.
|
|
24
|
+
It is expected that the integration provides the necessary credentials
|
|
25
|
+
for LinkedIn API access.
|
|
26
|
+
"""
|
|
27
|
+
super().__init__(name="scraper", **kwargs)
|
|
28
|
+
if self.integration:
|
|
29
|
+
credentials = self.integration.get_credentials()
|
|
30
|
+
api_key = credentials.get("SCRAPER_API")
|
|
31
|
+
self.account_id = credentials.get("ACCOUNT_ID")
|
|
32
|
+
self.integration = AgentrIntegration(name="unipile", api_key=api_key, base_url="https://staging-agentr-306776579029.asia-southeast1.run.app/")
|
|
33
|
+
self._unipile_app = UnipileApp(integration=self.integration)
|
|
34
|
+
else:
|
|
35
|
+
self.account_id = None
|
|
36
|
+
self._unipile_app = None
|
|
37
|
+
|
|
38
|
+
def linkedin_post_search(
|
|
39
|
+
self,
|
|
40
|
+
category: str = "posts",
|
|
41
|
+
api: str = "classic",
|
|
42
|
+
cursor: Optional[str] = None,
|
|
43
|
+
limit: Optional[int] = None,
|
|
44
|
+
keywords: Optional[str] = None,
|
|
45
|
+
sort_by: Optional[str] = None,
|
|
46
|
+
date_posted: Optional[str] = None,
|
|
47
|
+
content_type: Optional[str] = None,
|
|
48
|
+
) -> dict[str, Any]:
|
|
49
|
+
"""
|
|
50
|
+
Performs a LinkedIn search for posts.
|
|
51
|
+
|
|
52
|
+
Args:
|
|
53
|
+
category: Type of search to perform (defaults to "posts").
|
|
54
|
+
api: Which LinkedIn API to use - "classic" or "sales_navigator".
|
|
55
|
+
cursor: Pagination cursor for the next page of entries.
|
|
56
|
+
limit: Number of items to return (up to 50 for Classic search).
|
|
57
|
+
keywords: Keywords to search for.
|
|
58
|
+
sort_by: How to sort the results, e.g., "relevance" or "date".
|
|
59
|
+
date_posted: Filter posts by when they were posted.
|
|
60
|
+
content_type: Filter by the type of content in the post. Example: "videos", "images", "live_videos", "collaborative_articles", "documents"
|
|
61
|
+
|
|
62
|
+
Returns:
|
|
63
|
+
A dictionary containing search results and pagination details.
|
|
64
|
+
|
|
65
|
+
Raises:
|
|
66
|
+
httpx.HTTPError: If the API request fails.
|
|
67
|
+
|
|
68
|
+
Tags:
|
|
69
|
+
linkedin, search, posts, api, scrapper, important
|
|
70
|
+
"""
|
|
71
|
+
|
|
72
|
+
return self._unipile_app.search(
|
|
73
|
+
account_id=self.account_id,
|
|
74
|
+
category=category,
|
|
75
|
+
api=api,
|
|
76
|
+
cursor=cursor,
|
|
77
|
+
limit=limit,
|
|
78
|
+
keywords=keywords,
|
|
79
|
+
sort_by=sort_by,
|
|
80
|
+
date_posted=date_posted,
|
|
81
|
+
content_type=content_type,
|
|
82
|
+
)
|
|
83
|
+
|
|
84
|
+
def linkedin_list_all_posts(
|
|
85
|
+
self,
|
|
86
|
+
identifier: str,
|
|
87
|
+
cursor: Optional[str] = None,
|
|
88
|
+
limit: Optional[int] = None,
|
|
89
|
+
) -> dict[str, Any]:
|
|
90
|
+
"""
|
|
91
|
+
Lists all LinkedIn posts for a given user identifier
|
|
92
|
+
|
|
93
|
+
Args:
|
|
94
|
+
identifier: The entity's provider internal ID (LinkedIn ID).starts with ACo for users, while for companies it's a series of numbers.
|
|
95
|
+
cursor: Pagination cursor for the next page of entries.
|
|
96
|
+
limit: Number of items to return (1-100, though spec allows up to 250).
|
|
97
|
+
|
|
98
|
+
Returns:
|
|
99
|
+
A dictionary containing a list of post objects and pagination details.
|
|
100
|
+
|
|
101
|
+
Raises:
|
|
102
|
+
httpx.HTTPError: If the API request fails.
|
|
103
|
+
|
|
104
|
+
Tags:
|
|
105
|
+
linkedin, post, list, user_posts, company_posts, content, api, important
|
|
106
|
+
"""
|
|
107
|
+
|
|
108
|
+
return self._unipile_app.list_user_posts(
|
|
109
|
+
identifier=identifier,
|
|
110
|
+
account_id=self.account_id,
|
|
111
|
+
cursor=cursor,
|
|
112
|
+
limit=limit,
|
|
113
|
+
)
|
|
114
|
+
|
|
115
|
+
def linkedin_retrieve_profile(
|
|
116
|
+
self,
|
|
117
|
+
identifier: str,
|
|
118
|
+
) -> dict[str, Any]:
|
|
119
|
+
"""
|
|
120
|
+
Retrieves a specific LinkedIn user profile by its identifier.
|
|
121
|
+
|
|
122
|
+
Args:
|
|
123
|
+
identifier: Can be the provider's internal id OR the provider's public id of the requested user.
|
|
124
|
+
For example, for https://www.linkedin.com/in/manojbajaj95/, the identifier is "manojbajaj95".
|
|
125
|
+
|
|
126
|
+
Returns:
|
|
127
|
+
A dictionary containing the user's profile details.
|
|
128
|
+
|
|
129
|
+
Raises:
|
|
130
|
+
httpx.HTTPError: If the API request fails.
|
|
131
|
+
|
|
132
|
+
Tags:
|
|
133
|
+
linkedin, user, profile, retrieve, get, api, important
|
|
134
|
+
"""
|
|
135
|
+
|
|
136
|
+
return self._unipile_app.retrieve_profile(
|
|
137
|
+
identifier=identifier,
|
|
138
|
+
account_id=self.account_id,
|
|
139
|
+
)
|
|
140
|
+
|
|
141
|
+
|
|
142
|
+
def linkedin_list_post_comments(
|
|
143
|
+
self,
|
|
144
|
+
post_id: str,
|
|
145
|
+
comment_id: Optional[str] = None,
|
|
146
|
+
cursor: Optional[str] = None,
|
|
147
|
+
limit: Optional[int] = None,
|
|
148
|
+
) -> dict[str, Any]:
|
|
149
|
+
"""
|
|
150
|
+
Lists all comments from a specific LinkedIn post. Can also list replies to a specific comment.
|
|
151
|
+
|
|
152
|
+
Args:
|
|
153
|
+
post_id: The social ID of the post. Example rn:li:activity:7342082869034393600
|
|
154
|
+
comment_id: If provided, retrieves replies to this comment ID instead of top-level comments.
|
|
155
|
+
cursor: Pagination cursor.
|
|
156
|
+
limit: Number of comments to return.
|
|
157
|
+
|
|
158
|
+
Returns:
|
|
159
|
+
A dictionary containing a list of comment objects and pagination details.
|
|
160
|
+
|
|
161
|
+
Raises:
|
|
162
|
+
httpx.HTTPError: If the API request fails.
|
|
163
|
+
|
|
164
|
+
Tags:
|
|
165
|
+
linkedin, post, comment, list, content, api, important
|
|
166
|
+
"""
|
|
167
|
+
|
|
168
|
+
return self._unipile_app.list_post_comments(
|
|
169
|
+
post_id=post_id,
|
|
170
|
+
account_id=self.account_id,
|
|
171
|
+
comment_id=comment_id,
|
|
172
|
+
cursor=cursor,
|
|
173
|
+
limit=limit,
|
|
174
|
+
)
|
|
175
|
+
|
|
176
|
+
|
|
177
|
+
def list_tools(self):
|
|
178
|
+
"""
|
|
179
|
+
Returns a list of available tools/functions in this application.
|
|
180
|
+
|
|
181
|
+
Returns:
|
|
182
|
+
A list of functions that can be used as tools.
|
|
183
|
+
"""
|
|
184
|
+
return [
|
|
185
|
+
self.linkedin_post_search,
|
|
186
|
+
self.linkedin_list_all_posts,
|
|
187
|
+
self.linkedin_retrieve_profile,
|
|
188
|
+
self.linkedin_list_post_comments,
|
|
189
|
+
]
|
{universal_mcp_applications-0.1.4.dist-info → universal_mcp_applications-0.1.6.dist-info}/METADATA
RENAMED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: universal-mcp-applications
|
|
3
|
-
Version: 0.1.
|
|
3
|
+
Version: 0.1.6
|
|
4
4
|
Summary: A Universal MCP Application: universal_mcp_applications
|
|
5
5
|
Project-URL: Homepage, https://github.com/universal-mcp/applications
|
|
6
6
|
Project-URL: Repository, https://github.com/universal-mcp/applications
|
{universal_mcp_applications-0.1.4.dist-info → universal_mcp_applications-0.1.6.dist-info}/RECORD
RENAMED
|
@@ -186,6 +186,9 @@ universal_mcp/applications/retell/app.py,sha256=ysvyfDBHynl5AkKT7YRaQsEeMPivMPla
|
|
|
186
186
|
universal_mcp/applications/rocketlane/README.md,sha256=o8-N0RFEOzpUrQDerIGvFp7yXLX8KTmngupFhid9XN0,2986
|
|
187
187
|
universal_mcp/applications/rocketlane/__init__.py,sha256=jl3PjnTvPdjnbFXJgLywSlE4kHrKZiFMGaf-EaDsj80,31
|
|
188
188
|
universal_mcp/applications/rocketlane/app.py,sha256=Re5-OoUWIIxL_ZJZ_RpEqz82hymgAWtdcOSJtJFzzs0,240690
|
|
189
|
+
universal_mcp/applications/scraper/README.md,sha256=ys9f2dRHGsnFkauAuGdBo3_Z_51PRn2cqGlnEv8kjPI,590
|
|
190
|
+
universal_mcp/applications/scraper/__init__.py,sha256=RnkyFDeNR1tOsY_PskHdv4C8AYRbcjMt7KyYQWiGGD8,27
|
|
191
|
+
universal_mcp/applications/scraper/app.py,sha256=CVMrERgtUritpmG2RyOMlH3iTjfBhKJwF2Lvgz51z80,6483
|
|
189
192
|
universal_mcp/applications/semanticscholar/README.md,sha256=JpLY_698pvstgoNfQ5Go8C8ehQ-o68uFDX5kr86upK0,2834
|
|
190
193
|
universal_mcp/applications/semanticscholar/__init__.py,sha256=eR36chrc0pbBsSE1GadvmQH0OmtKnSC91xbE7HcDPf0,36
|
|
191
194
|
universal_mcp/applications/semanticscholar/app.py,sha256=OHTFkR-IwRU5Rvb1bEu7XmRHikht3hEgZxszLQu6kFI,22234
|
|
@@ -264,7 +267,7 @@ universal_mcp/applications/youtube/app.py,sha256=hhKqnbXvMAyOW3LOqp-ODPdIuQorr1n
|
|
|
264
267
|
universal_mcp/applications/zenquotes/README.md,sha256=x1mZHjNKD4WOgsIhedcbbaR1nvbt794GSrKud1tSLD0,296
|
|
265
268
|
universal_mcp/applications/zenquotes/__init__.py,sha256=IkASLYaZiHJXlkGwEMk1HgIq5GwEZp5GhAIiJyjBd3g,30
|
|
266
269
|
universal_mcp/applications/zenquotes/app.py,sha256=6v8trNWjxbixdlEyaM-gJbfY8z9ZAmkIzSUks_fbsT4,1076
|
|
267
|
-
universal_mcp_applications-0.1.
|
|
268
|
-
universal_mcp_applications-0.1.
|
|
269
|
-
universal_mcp_applications-0.1.
|
|
270
|
-
universal_mcp_applications-0.1.
|
|
270
|
+
universal_mcp_applications-0.1.6.dist-info/METADATA,sha256=zWWZgM7EZvZIgFRTowMREhKbcEfh_CF1PxnuTpzOmjU,3918
|
|
271
|
+
universal_mcp_applications-0.1.6.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
|
|
272
|
+
universal_mcp_applications-0.1.6.dist-info/licenses/LICENSE,sha256=NweDZVPslBAZFzlgByF158b85GR0f5_tLQgq1NS48To,1063
|
|
273
|
+
universal_mcp_applications-0.1.6.dist-info/RECORD,,
|
{universal_mcp_applications-0.1.4.dist-info → universal_mcp_applications-0.1.6.dist-info}/WHEEL
RENAMED
|
File without changes
|
|
File without changes
|