universal-mcp 0.1.13rc1__py3-none-any.whl → 0.1.13rc2__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.
Files changed (99) hide show
  1. {universal_mcp-0.1.13rc1.dist-info → universal_mcp-0.1.13rc2.dist-info}/METADATA +1 -1
  2. universal_mcp-0.1.13rc2.dist-info/RECORD +38 -0
  3. universal_mcp/applications/ahrefs/README.md +0 -76
  4. universal_mcp/applications/ahrefs/__init__.py +0 -0
  5. universal_mcp/applications/ahrefs/app.py +0 -2291
  6. universal_mcp/applications/cal_com_v2/README.md +0 -175
  7. universal_mcp/applications/cal_com_v2/__init__.py +0 -0
  8. universal_mcp/applications/cal_com_v2/app.py +0 -5390
  9. universal_mcp/applications/calendly/README.md +0 -78
  10. universal_mcp/applications/calendly/__init__.py +0 -0
  11. universal_mcp/applications/calendly/app.py +0 -1195
  12. universal_mcp/applications/clickup/README.md +0 -160
  13. universal_mcp/applications/clickup/__init__.py +0 -0
  14. universal_mcp/applications/clickup/app.py +0 -5009
  15. universal_mcp/applications/coda/README.md +0 -133
  16. universal_mcp/applications/coda/__init__.py +0 -0
  17. universal_mcp/applications/coda/app.py +0 -3671
  18. universal_mcp/applications/curstdata/README.md +0 -50
  19. universal_mcp/applications/curstdata/__init__.py +0 -0
  20. universal_mcp/applications/curstdata/app.py +0 -551
  21. universal_mcp/applications/e2b/README.md +0 -37
  22. universal_mcp/applications/e2b/app.py +0 -65
  23. universal_mcp/applications/elevenlabs/README.md +0 -84
  24. universal_mcp/applications/elevenlabs/__init__.py +0 -0
  25. universal_mcp/applications/elevenlabs/app.py +0 -1402
  26. universal_mcp/applications/falai/README.md +0 -42
  27. universal_mcp/applications/falai/__init__.py +0 -0
  28. universal_mcp/applications/falai/app.py +0 -332
  29. universal_mcp/applications/figma/README.md +0 -74
  30. universal_mcp/applications/figma/__init__.py +0 -0
  31. universal_mcp/applications/figma/app.py +0 -1261
  32. universal_mcp/applications/firecrawl/README.md +0 -45
  33. universal_mcp/applications/firecrawl/app.py +0 -268
  34. universal_mcp/applications/github/README.md +0 -47
  35. universal_mcp/applications/github/app.py +0 -429
  36. universal_mcp/applications/gong/README.md +0 -88
  37. universal_mcp/applications/gong/__init__.py +0 -0
  38. universal_mcp/applications/gong/app.py +0 -2297
  39. universal_mcp/applications/google_calendar/app.py +0 -442
  40. universal_mcp/applications/google_docs/README.md +0 -40
  41. universal_mcp/applications/google_docs/app.py +0 -88
  42. universal_mcp/applications/google_drive/README.md +0 -44
  43. universal_mcp/applications/google_drive/app.py +0 -286
  44. universal_mcp/applications/google_mail/README.md +0 -47
  45. universal_mcp/applications/google_mail/app.py +0 -664
  46. universal_mcp/applications/google_sheet/README.md +0 -42
  47. universal_mcp/applications/google_sheet/app.py +0 -150
  48. universal_mcp/applications/heygen/README.md +0 -69
  49. universal_mcp/applications/heygen/__init__.py +0 -0
  50. universal_mcp/applications/heygen/app.py +0 -956
  51. universal_mcp/applications/mailchimp/README.md +0 -306
  52. universal_mcp/applications/mailchimp/__init__.py +0 -0
  53. universal_mcp/applications/mailchimp/app.py +0 -10937
  54. universal_mcp/applications/markitdown/app.py +0 -44
  55. universal_mcp/applications/neon/README.md +0 -99
  56. universal_mcp/applications/neon/__init__.py +0 -0
  57. universal_mcp/applications/neon/app.py +0 -1924
  58. universal_mcp/applications/notion/README.md +0 -55
  59. universal_mcp/applications/notion/__init__.py +0 -0
  60. universal_mcp/applications/notion/app.py +0 -527
  61. universal_mcp/applications/perplexity/README.md +0 -37
  62. universal_mcp/applications/perplexity/app.py +0 -65
  63. universal_mcp/applications/reddit/README.md +0 -45
  64. universal_mcp/applications/reddit/app.py +0 -379
  65. universal_mcp/applications/replicate/README.md +0 -65
  66. universal_mcp/applications/replicate/__init__.py +0 -0
  67. universal_mcp/applications/replicate/app.py +0 -980
  68. universal_mcp/applications/resend/README.md +0 -38
  69. universal_mcp/applications/resend/app.py +0 -37
  70. universal_mcp/applications/retell_ai/README.md +0 -46
  71. universal_mcp/applications/retell_ai/__init__.py +0 -0
  72. universal_mcp/applications/retell_ai/app.py +0 -333
  73. universal_mcp/applications/rocketlane/README.md +0 -42
  74. universal_mcp/applications/rocketlane/__init__.py +0 -0
  75. universal_mcp/applications/rocketlane/app.py +0 -194
  76. universal_mcp/applications/serpapi/README.md +0 -37
  77. universal_mcp/applications/serpapi/app.py +0 -73
  78. universal_mcp/applications/shortcut/README.md +0 -153
  79. universal_mcp/applications/shortcut/__init__.py +0 -0
  80. universal_mcp/applications/shortcut/app.py +0 -3880
  81. universal_mcp/applications/spotify/README.md +0 -116
  82. universal_mcp/applications/spotify/__init__.py +0 -0
  83. universal_mcp/applications/spotify/app.py +0 -2526
  84. universal_mcp/applications/supabase/README.md +0 -112
  85. universal_mcp/applications/supabase/__init__.py +0 -0
  86. universal_mcp/applications/supabase/app.py +0 -2970
  87. universal_mcp/applications/tavily/README.md +0 -38
  88. universal_mcp/applications/tavily/app.py +0 -51
  89. universal_mcp/applications/wrike/README.md +0 -71
  90. universal_mcp/applications/wrike/__init__.py +0 -0
  91. universal_mcp/applications/wrike/app.py +0 -1372
  92. universal_mcp/applications/youtube/README.md +0 -82
  93. universal_mcp/applications/youtube/__init__.py +0 -0
  94. universal_mcp/applications/youtube/app.py +0 -1428
  95. universal_mcp/applications/zenquotes/README.md +0 -37
  96. universal_mcp/applications/zenquotes/app.py +0 -31
  97. universal_mcp-0.1.13rc1.dist-info/RECORD +0 -132
  98. {universal_mcp-0.1.13rc1.dist-info → universal_mcp-0.1.13rc2.dist-info}/WHEEL +0 -0
  99. {universal_mcp-0.1.13rc1.dist-info → universal_mcp-0.1.13rc2.dist-info}/entry_points.txt +0 -0
@@ -1,55 +0,0 @@
1
-
2
- # Notion MCP Server
3
-
4
- An MCP Server for the Notion API.
5
-
6
- ## Supported Integrations
7
-
8
- - AgentR
9
- - API Key (Coming Soon)
10
- - OAuth (Coming Soon)
11
-
12
- ## Tools
13
-
14
- This is automatically generated from OpenAPI schema for the Notion API.
15
-
16
- ## Supported Integrations
17
-
18
- This tool can be integrated with any service that supports HTTP requests.
19
-
20
- ## Tool List
21
-
22
- | Tool | Description |
23
- |------|-------------|
24
- | retrieve_a_user | Retrieves user details from the server using the specified user ID. |
25
- | list_a_ll_users | Fetches a list of all users from the API endpoint and returns the data as a dictionary. |
26
- | retrieve_your_token_sbot_user | Retrieves the authentication token for the current user from the SBOT service. |
27
- | retrieve_a_database | Retrieves database details from a specified endpoint using the provided database ID. |
28
- | update_a_database | Updates a database entry with the given ID using a PATCH request. |
29
- | query_a_database | Executes a query on a specified database using an identifier and an optional request body. |
30
- | create_a_database | Creates a new database on the server using the specified request body. |
31
- | create_a_page | Creates a new page by sending a POST request to the specified endpoint. |
32
- | retrieve_a_page | Retrieves a page by its unique identifier from a remote server. |
33
- | update_page_properties | Updates the properties of a page identified by its ID using the provided request body. |
34
- | retrieve_a_page_property_item | Retrieves the property item of a page using specified page and property identifiers. |
35
- | retrieve_block_children | Retrieves the children of a specified block using its unique identifier. |
36
- | append_block_children | Appends child elements to a block identified by its ID and returns the updated block data. |
37
- | retrieve_a_block | Retrieves a block of data from a given API endpoint using the specified block ID. |
38
- | delete_a_block | Deletes a block by its unique identifier and returns the server's response. |
39
- | update_a_block | Updates a block by sending a PATCH request to the specified endpoint. |
40
- | search | Executes a search query using the specified request body and returns the results. |
41
- | retrieve_comments | Fetches comments from a remote server for a specified block, with optional pagination. |
42
- | add_comment_to_page | Adds a comment to a page by sending a POST request with the provided request body. |
43
-
44
-
45
-
46
- ## Usage
47
-
48
- - Login to AgentR
49
- - Follow the quickstart guide to setup MCP Server for your client
50
- - Visit Apps Store and enable the Notion app
51
- - Restart the MCP Server
52
-
53
- ### Local Development
54
-
55
- - Follow the README to test with the local MCP Server
File without changes
@@ -1,527 +0,0 @@
1
- from typing import Any
2
-
3
- from universal_mcp.applications import APIApplication
4
- from universal_mcp.integrations import Integration
5
-
6
-
7
- class NotionApp(APIApplication):
8
- def __init__(self, integration: Integration = None, **kwargs) -> None:
9
- super().__init__(name="notion", integration=integration, **kwargs)
10
- self.base_url = "https://api.notion.com"
11
-
12
- def _get_headers(self):
13
- if not self.integration:
14
- raise ValueError("Integration not configured for NotionApp")
15
- credentials = self.integration.get_credentials()
16
- if "headers" in credentials:
17
- return credentials["headers"]
18
- return {
19
- "Authorization": f"Bearer {credentials['access_token']}",
20
- "Accept": "application/json",
21
- "Notion-Version": "2022-06-28",
22
- }
23
-
24
- def retrieve_a_user(self, id, request_body=None) -> dict[str, Any]:
25
- """
26
- Retrieves a user's details from the server using their unique identifier.
27
-
28
- Args:
29
- id: The unique identifier of the user to retrieve
30
- request_body: Optional request body data for the request. Defaults to None
31
-
32
- Returns:
33
- A dictionary containing user details retrieved from the server response
34
-
35
- Raises:
36
- ValueError: Raised when the 'id' parameter is None
37
- requests.exceptions.HTTPError: Raised when the server returns an unsuccessful status code
38
-
39
- Tags:
40
- retrieve, get, user, api, single-record, important
41
- """
42
- if id is None:
43
- raise ValueError("Missing required parameter 'id'")
44
- url = f"{self.base_url}/v1/users/{id}"
45
- query_params = {}
46
- response = self._get(url, params=query_params)
47
- response.raise_for_status()
48
- return response.json()
49
-
50
- def list_all_users(
51
- self,
52
- ) -> dict[str, Any]:
53
- """
54
- Retrieves a complete list of users from the API endpoint.
55
-
56
- Args:
57
- None: This method does not take any parameters.
58
-
59
- Returns:
60
- dict[str, Any]: A dictionary containing user data where keys are strings and values can be of any type, representing user information retrieved from the API.
61
-
62
- Raises:
63
- HTTPError: Raised when the API request fails or returns a non-200 status code
64
- RequestException: Raised when there are network connectivity issues or other request-related problems
65
-
66
- Tags:
67
- list, users, api, fetch, management, important
68
- """
69
- url = f"{self.base_url}/v1/users"
70
- query_params = {}
71
- response = self._get(url, params=query_params)
72
- response.raise_for_status()
73
- return response.json()
74
-
75
- def retrieve_your_token_sbot_user(
76
- self,
77
- ) -> dict[str, Any]:
78
- """
79
- Retrieves the current user's authentication token information from the SBOT service.
80
-
81
- Returns:
82
- A dictionary containing the authentication token and related user information from the JSON response.
83
-
84
- Raises:
85
- requests.exceptions.HTTPError: When the API request fails or returns a non-200 status code
86
- requests.exceptions.RequestException: When there are network connectivity issues or other request-related problems
87
-
88
- Tags:
89
- retrieve, authentication, token, user, api, important
90
- """
91
- url = f"{self.base_url}/v1/users/me"
92
- query_params = {}
93
- response = self._get(url, params=query_params)
94
- response.raise_for_status()
95
- return response.json()
96
-
97
- def retrieve_a_database(self, id) -> dict[str, Any]:
98
- """
99
- Retrieves detailed information about a specific database using its unique identifier.
100
-
101
- Args:
102
- id: Unique identifier for the database to retrieve. Must be a non-null value.
103
-
104
- Returns:
105
- A dictionary containing detailed information about the requested database.
106
-
107
- Raises:
108
- ValueError: Raised when the 'id' parameter is None
109
- HTTPError: Raised when the API request fails or returns an error status code
110
-
111
- Tags:
112
- retrieve, get, database, api, data-access, important
113
- """
114
- if id is None:
115
- raise ValueError("Missing required parameter 'id'")
116
- url = f"{self.base_url}/v1/databases/{id}"
117
- query_params = {}
118
- response = self._get(url, params=query_params)
119
- response.raise_for_status()
120
- return response.json()
121
-
122
- def update_a_database(self, id, request_body=None) -> dict[str, Any]:
123
- """
124
- Updates a database entry with the specified ID using a PATCH request.
125
-
126
- Args:
127
- id: The unique identifier of the database entry to update.
128
- request_body: Optional dictionary containing the fields and values to update. Defaults to None.
129
-
130
- Returns:
131
- dict[str, Any]: A dictionary containing the server's JSON response after the update operation.
132
-
133
- Raises:
134
- ValueError: When the 'id' parameter is None.
135
- requests.exceptions.HTTPError: When the server returns an unsuccessful status code.
136
-
137
- Tags:
138
- update, database, patch, important, api, management
139
- """
140
- if id is None:
141
- raise ValueError("Missing required parameter 'id'")
142
- url = f"{self.base_url}/v1/databases/{id}"
143
- query_params = {}
144
- response = self._patch(url, data=request_body, params=query_params)
145
- response.raise_for_status()
146
- return response.json()
147
-
148
- def query_a_database(self, id, request_body=None) -> dict[str, Any]:
149
- """
150
- Executes a database query operation using a specified database ID and optional request parameters
151
-
152
- Args:
153
- id: The unique identifier of the database to query
154
- request_body: Optional JSON-compatible dictionary representing the body of the query request; if None, no additional query data is sent
155
-
156
- Returns:
157
- A dictionary containing the response data from the database query as parsed from JSON
158
-
159
- Raises:
160
- ValueError: Raised when the required 'id' parameter is None
161
- HTTPError: Raised when the HTTP request fails or returns an error status code
162
-
163
- Tags:
164
- query, database, api, data-retrieval, http, important
165
- """
166
- if id is None:
167
- raise ValueError("Missing required parameter 'id'")
168
- url = f"{self.base_url}/v1/databases/{id}/query"
169
- query_params = {}
170
- response = self._post(url, data=request_body, params=query_params)
171
- response.raise_for_status()
172
- return response.json()
173
-
174
- def create_a_database(self, request_body=None) -> dict[str, Any]:
175
- """
176
- Creates a new database on the server by sending a POST request to the database endpoint.
177
-
178
- Args:
179
- request_body: Optional dictionary containing configuration parameters for the new database. Defaults to None.
180
-
181
- Returns:
182
- A dictionary containing the server's JSON response with details of the created database.
183
-
184
- Raises:
185
- HTTPError: Raised when the server returns a non-200 status code indicating database creation failure
186
- RequestException: Raised when network connectivity issues occur during the API request
187
- JSONDecodeError: Raised when the server response cannot be parsed as valid JSON
188
-
189
- Tags:
190
- create, database, api, management, important
191
- """
192
- url = f"{self.base_url}/v1/databases/"
193
- query_params = {}
194
- response = self._post(url, data=request_body, params=query_params)
195
- response.raise_for_status()
196
- return response.json()
197
-
198
- def create_a_page(self, request_body=None) -> dict[str, Any]:
199
- """
200
- Creates a new page by sending a POST request to the API endpoint.
201
-
202
- Args:
203
- request_body: Optional dictionary containing the page data to be sent in the POST request body. Defaults to None.
204
-
205
- Returns:
206
- Dictionary containing the JSON response from the server with details of the newly created page.
207
-
208
- Raises:
209
- HTTPError: When the server returns a non-200 status code, indicating a failed request
210
- RequestException: When network-related issues occur during the API request
211
-
212
- Tags:
213
- create, page, api, http, post, important
214
- """
215
- url = f"{self.base_url}/v1/pages/"
216
- query_params = {}
217
- response = self._post(url, data=request_body, params=query_params)
218
- response.raise_for_status()
219
- return response.json()
220
-
221
- def retrieve_a_page(self, id) -> dict[str, Any]:
222
- """
223
- Retrieves a specific page's data from a remote server using its unique identifier.
224
-
225
- Args:
226
- id: The unique identifier of the page to retrieve
227
-
228
- Returns:
229
- A dictionary containing the page data returned from the server's JSON response
230
-
231
- Raises:
232
- ValueError: When the 'id' parameter is None
233
- HTTPError: When the server returns an unsuccessful status code
234
-
235
- Tags:
236
- retrieve, fetch, api, http, get, page, important
237
- """
238
- if id is None:
239
- raise ValueError("Missing required parameter 'id'")
240
- url = f"{self.base_url}/v1/pages/{id}"
241
- query_params = {}
242
- response = self._get(url, params=query_params)
243
- response.raise_for_status()
244
- return response.json()
245
-
246
- def update_page_properties(self, id, request_body=None) -> dict[str, Any]:
247
- """
248
- Updates the properties of a page with the specified ID using the provided request body.
249
-
250
- Args:
251
- id: The unique identifier of the page to update. Must not be None.
252
- request_body: Optional dictionary containing the properties to be updated. Defaults to None.
253
-
254
- Returns:
255
- Dictionary containing the updated page properties as returned by the server.
256
-
257
- Raises:
258
- ValueError: When the required 'id' parameter is None
259
- HTTPError: When the server returns an unsuccessful status code
260
- RequestException: When there is an error making the HTTP request
261
-
262
- Tags:
263
- update, api, page-management, http, important
264
- """
265
- if id is None:
266
- raise ValueError("Missing required parameter 'id'")
267
- url = f"{self.base_url}/v1/pages/{id}"
268
- query_params = {}
269
- response = self._patch(url, data=request_body, params=query_params)
270
- response.raise_for_status()
271
- return response.json()
272
-
273
- def retrieve_a_page_property_item(self, page_id, property_id) -> dict[str, Any]:
274
- """
275
- Retrieves a specific property item from a Notion page using the page ID and property ID.
276
-
277
- Args:
278
- page_id: The unique identifier of the Notion page from which to retrieve the property
279
- property_id: The unique identifier of the specific property to retrieve
280
-
281
- Returns:
282
- A dictionary containing the property item's details from the API response
283
-
284
- Raises:
285
- ValueError: When either page_id or property_id is None
286
- HTTPError: When the API request fails or returns an error status code
287
-
288
- Tags:
289
- retrieve, get, property, page, api, notion, important
290
- """
291
- if page_id is None:
292
- raise ValueError("Missing required parameter 'page_id'")
293
- if property_id is None:
294
- raise ValueError("Missing required parameter 'property_id'")
295
- url = f"{self.base_url}/v1/pages/{page_id}/properties/{property_id}"
296
- query_params = {}
297
- response = self._get(url, params=query_params)
298
- response.raise_for_status()
299
- return response.json()
300
-
301
- def retrieve_block_children(self, id, page_size=None) -> dict[str, Any]:
302
- """
303
- Retrieves all child blocks for a specified parent block using its ID via the API.
304
-
305
- Args:
306
- id: The unique identifier of the parent block whose children are to be retrieved
307
- page_size: Optional integer specifying the maximum number of children to return per page in the response
308
-
309
- Returns:
310
- A dictionary containing the API response data with the children blocks information
311
-
312
- Raises:
313
- ValueError: When the required 'id' parameter is None
314
- HTTPError: When the API request fails or returns an error status code
315
-
316
- Tags:
317
- retrieve, list, blocks, children, pagination, api-call, important
318
- """
319
- if id is None:
320
- raise ValueError("Missing required parameter 'id'")
321
- url = f"{self.base_url}/v1/blocks/{id}/children"
322
- query_params = {k: v for k, v in [("page_size", page_size)] if v is not None}
323
- response = self._get(url, params=query_params)
324
- response.raise_for_status()
325
- return response.json()
326
-
327
- def append_block_children(self, id, request_body=None) -> dict[str, Any]:
328
- """
329
- Appends child elements to a specified block and returns the updated block data.
330
-
331
- Args:
332
- id: String identifier of the block to which children will be appended
333
- request_body: Optional dictionary containing the child elements to be appended (default: None)
334
-
335
- Returns:
336
- dict[str, Any]: A dictionary containing the updated block data after appending the children
337
-
338
- Raises:
339
- ValueError: When the required 'id' parameter is None
340
- HTTPError: When the API request fails or returns an error status code
341
-
342
- Tags:
343
- append, update, blocks, children, api, important
344
- """
345
- if id is None:
346
- raise ValueError("Missing required parameter 'id'")
347
- url = f"{self.base_url}/v1/blocks/{id}/children"
348
- query_params = {}
349
- response = self._patch(url, data=request_body, params=query_params)
350
- response.raise_for_status()
351
- return response.json()
352
-
353
- def retrieve_a_block(self, id) -> dict[str, Any]:
354
- """
355
- Retrieves a specific block of data from the API using its unique identifier.
356
-
357
- Args:
358
- id: The unique identifier for the block to be retrieved. Must be a non-None value.
359
-
360
- Returns:
361
- A dictionary containing the block data retrieved from the API, parsed from the JSON response.
362
-
363
- Raises:
364
- ValueError: When the 'id' parameter is None
365
- HTTPError: When the API request fails or returns an error status code
366
-
367
- Tags:
368
- retrieve, fetch, api, data, block, single, important
369
- """
370
- if id is None:
371
- raise ValueError("Missing required parameter 'id'")
372
- url = f"{self.base_url}/v1/blocks/{id}"
373
- query_params = {}
374
- response = self._get(url, params=query_params)
375
- response.raise_for_status()
376
- return response.json()
377
-
378
- def delete_a_block(self, id) -> dict[str, Any]:
379
- """
380
- Deletes a specified block by its ID and returns the server response.
381
-
382
- Args:
383
- id: The unique identifier of the block to be deleted. Must not be None.
384
-
385
- Returns:
386
- A dictionary containing the server's response data after the deletion operation.
387
-
388
- Raises:
389
- ValueError: When the 'id' parameter is None
390
- HTTPError: When the server returns an unsuccessful status code
391
-
392
- Tags:
393
- delete, important, management, api, http, block-management
394
- """
395
- if id is None:
396
- raise ValueError("Missing required parameter 'id'")
397
- url = f"{self.base_url}/v1/blocks/{id}"
398
- query_params = {}
399
- response = self._delete(url, params=query_params)
400
- response.raise_for_status()
401
- return response.json()
402
-
403
- def update_a_block(self, id, request_body=None) -> dict[str, Any]:
404
- """
405
- Updates a specific block resource via a PATCH request to the API endpoint
406
-
407
- Args:
408
- id: The unique identifier of the block to update
409
- request_body: Optional dictionary containing the update data for the block. Defaults to None
410
-
411
- Returns:
412
- Dictionary containing the server's JSON response with the updated block information
413
-
414
- Raises:
415
- ValueError: When the required 'id' parameter is None
416
- HTTPError: When the server responds with an error status code
417
-
418
- Tags:
419
- update, patch, api, block-management, important
420
- """
421
- if id is None:
422
- raise ValueError("Missing required parameter 'id'")
423
- url = f"{self.base_url}/v1/blocks/{id}"
424
- query_params = {}
425
- response = self._patch(url, data=request_body, params=query_params)
426
- response.raise_for_status()
427
- return response.json()
428
-
429
- def search(self, request_body=None) -> dict[str, Any]:
430
- """
431
- Executes a search operation by sending a POST request to the search endpoint and returns the results
432
-
433
- Args:
434
- request_body: Optional dictionary containing the search parameters and filters to be sent in the request. Defaults to None.
435
-
436
- Returns:
437
- A dictionary containing the parsed JSON response from the search operation with search results and metadata
438
-
439
- Raises:
440
- HTTPError: Raised when the search request fails or returns a non-200 status code
441
- JSONDecodeError: Raised when the response cannot be parsed as valid JSON
442
-
443
- Tags:
444
- search, important, http, query, api-request, json
445
- """
446
- url = f"{self.base_url}/v1/search"
447
- query_params = {}
448
- response = self._post(url, data=request_body, params=query_params)
449
- response.raise_for_status()
450
- return response.json()
451
-
452
- def retrieve_comments(
453
- self, block_id=None, page_size=None, request_body=None
454
- ) -> dict[str, Any]:
455
- """
456
- Retrieves comments from a remote server with optional block filtering and pagination support.
457
-
458
- Args:
459
- block_id: Optional string or ID that specifies which block's comments to retrieve. If None, retrieves all comments.
460
- page_size: Optional integer specifying the number of comments to return per page. If None, uses server's default pagination.
461
- request_body: Optional dictionary for future extensibility. Currently unused.
462
-
463
- Returns:
464
- Dictionary containing comment data parsed from the server's JSON response.
465
-
466
- Raises:
467
- HTTPError: Raised when the server returns a non-200 status code
468
- RequestException: Raised for network-related errors during the HTTP request
469
-
470
- Tags:
471
- retrieve, fetch, comments, api, pagination, http, important
472
- """
473
- url = f"{self.base_url}/v1/comments"
474
- query_params = {
475
- k: v
476
- for k, v in [("block_id", block_id), ("page_size", page_size)]
477
- if v is not None
478
- }
479
- response = self._get(url, params=query_params)
480
- response.raise_for_status()
481
- return response.json()
482
-
483
- def add_comment_to_page(self, request_body=None) -> dict[str, Any]:
484
- """
485
- Adds a comment to a page by making an HTTP POST request to the comments endpoint.
486
-
487
- Args:
488
- request_body: Optional dictionary containing the comment data to be posted. If None, an empty comment will be created. Defaults to None.
489
-
490
- Returns:
491
- Dictionary containing the server's JSON response with details of the created comment.
492
-
493
- Raises:
494
- HTTPError: Raised when the server returns a non-200 status code, indicating the comment creation failed.
495
- RequestException: Raised when there are network connectivity issues or other request-related problems.
496
-
497
- Tags:
498
- add, create, comment, post, api, content-management, important
499
- """
500
- url = f"{self.base_url}/v1/comments"
501
- query_params = {}
502
- response = self._post(url, data=request_body, params=query_params)
503
- response.raise_for_status()
504
- return response.json()
505
-
506
- def list_tools(self):
507
- return [
508
- self.retrieve_a_user,
509
- self.list_all_users,
510
- self.retrieve_your_token_sbot_user,
511
- self.retrieve_a_database,
512
- self.update_a_database,
513
- self.query_a_database,
514
- self.create_a_database,
515
- self.create_a_page,
516
- self.retrieve_a_page,
517
- self.update_page_properties,
518
- self.retrieve_a_page_property_item,
519
- self.retrieve_block_children,
520
- self.append_block_children,
521
- self.retrieve_a_block,
522
- self.delete_a_block,
523
- self.update_a_block,
524
- self.search,
525
- self.retrieve_comments,
526
- self.add_comment_to_page,
527
- ]
@@ -1,37 +0,0 @@
1
-
2
- # Perplexity MCP Server
3
-
4
- An MCP Server for the Perplexity API.
5
-
6
- ## Supported Integrations
7
-
8
- - AgentR
9
- - API Key (Coming Soon)
10
- - OAuth (Coming Soon)
11
-
12
- ## Tools
13
-
14
- This is automatically generated from OpenAPI schema for the Perplexity API.
15
-
16
- ## Supported Integrations
17
-
18
- This tool can be integrated with any service that supports HTTP requests.
19
-
20
- ## Tool List
21
-
22
- | Tool | Description |
23
- |------|-------------|
24
- | chat | Sends a query to a Perplexity Sonar online model and returns the response. |
25
-
26
-
27
-
28
- ## Usage
29
-
30
- - Login to AgentR
31
- - Follow the quickstart guide to setup MCP Server for your client
32
- - Visit Apps Store and enable the Perplexity app
33
- - Restart the MCP Server
34
-
35
- ### Local Development
36
-
37
- - Follow the README to test with the local MCP Server
@@ -1,65 +0,0 @@
1
- from typing import Any, Literal
2
-
3
- from universal_mcp.applications.application import APIApplication
4
- from universal_mcp.integrations import Integration
5
-
6
-
7
- class PerplexityApp(APIApplication):
8
- def __init__(self, integration: Integration | None = None) -> None:
9
- super().__init__(name="perplexity", integration=integration)
10
- self.base_url = "https://api.perplexity.ai"
11
-
12
- def chat(
13
- self,
14
- query: str,
15
- model: Literal[
16
- "r1-1776",
17
- "sonar",
18
- "sonar-pro",
19
- "sonar-reasoning",
20
- "sonar-reasoning-pro",
21
- "sonar-deep-research",
22
- ] = "sonar",
23
- temperature: float = 1,
24
- system_prompt: str = "Be precise and concise.",
25
- ) -> dict[str, Any] | str:
26
- """
27
- Initiates a chat completion request to generate AI responses using various models with customizable parameters.
28
-
29
- Args:
30
- query: The input text/prompt to send to the chat model
31
- model: The model to use for chat completion. Options include 'r1-1776', 'sonar', 'sonar-pro', 'sonar-reasoning', 'sonar-reasoning-pro', 'sonar-deep-research'. Defaults to 'sonar'
32
- temperature: Controls randomness in the model's output. Higher values make output more random, lower values more deterministic. Defaults to 1
33
- system_prompt: Initial system message to guide the model's behavior. Defaults to 'Be precise and concise.'
34
-
35
- Returns:
36
- A dictionary containing the generated content and citations, with keys 'content' (str) and 'citations' (list), or a string in some cases
37
-
38
- Raises:
39
- AuthenticationError: Raised when API authentication fails due to missing or invalid credentials
40
- HTTPError: Raised when the API request fails or returns an error status
41
-
42
- Tags:
43
- chat, generate, ai, completion, important
44
- """
45
- endpoint = f"{self.base_url}/chat/completions"
46
- messages = []
47
- if system_prompt:
48
- messages.append({"role": "system", "content": system_prompt})
49
- messages.append({"role": "user", "content": query})
50
- payload = {
51
- "model": model,
52
- "messages": messages,
53
- "temperature": temperature,
54
- # "max_tokens": 512,
55
- }
56
- data = self._post(endpoint, data=payload)
57
- response = data.json()
58
- content = response["choices"][0]["message"]["content"]
59
- citations = response.get("citations", [])
60
- return {"content": content, "citations": citations}
61
-
62
- def list_tools(self):
63
- return [
64
- self.chat,
65
- ]