universal-mcp 0.1.9rc1__py3-none-any.whl → 0.1.9rc2__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 (29) hide show
  1. universal_mcp/applications/application.py +19 -30
  2. universal_mcp/applications/cal_com_v2/app.py +1676 -1021
  3. universal_mcp/applications/clickup/app.py +1496 -846
  4. universal_mcp/applications/falai/README.md +42 -0
  5. universal_mcp/applications/falai/__init__.py +0 -0
  6. universal_mcp/applications/falai/app.py +332 -0
  7. universal_mcp/applications/gong/README.md +88 -0
  8. universal_mcp/applications/gong/__init__.py +0 -0
  9. universal_mcp/applications/gong/app.py +2297 -0
  10. universal_mcp/applications/hashnode/app.py +12 -8
  11. universal_mcp/applications/hashnode/prompt.md +2 -0
  12. universal_mcp/applications/heygen/README.md +69 -0
  13. universal_mcp/applications/heygen/__init__.py +0 -0
  14. universal_mcp/applications/heygen/app.py +956 -0
  15. universal_mcp/applications/mailchimp/app.py +3848 -1794
  16. universal_mcp/applications/replicate/README.md +47 -35
  17. universal_mcp/applications/replicate/__init__.py +0 -0
  18. universal_mcp/applications/replicate/app.py +215 -204
  19. universal_mcp/applications/retell_ai/app.py +84 -67
  20. universal_mcp/applications/rocketlane/app.py +49 -35
  21. universal_mcp/applications/spotify/app.py +723 -428
  22. universal_mcp/applications/supabase/app.py +909 -583
  23. universal_mcp/servers/server.py +50 -0
  24. universal_mcp/stores/store.py +2 -3
  25. universal_mcp/utils/docstring_parser.py +67 -36
  26. {universal_mcp-0.1.9rc1.dist-info → universal_mcp-0.1.9rc2.dist-info}/METADATA +5 -1
  27. {universal_mcp-0.1.9rc1.dist-info → universal_mcp-0.1.9rc2.dist-info}/RECORD +29 -19
  28. {universal_mcp-0.1.9rc1.dist-info → universal_mcp-0.1.9rc2.dist-info}/WHEEL +0 -0
  29. {universal_mcp-0.1.9rc1.dist-info → universal_mcp-0.1.9rc2.dist-info}/entry_points.txt +0 -0
@@ -0,0 +1,42 @@
1
+
2
+ # Falai MCP Server
3
+
4
+ An MCP Server for the Falai 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 Falai 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
+ | run | Run a Fal AI application directly and wait for the result. Suitable for short-running applications with synchronous execution from the caller's perspective. |
25
+ | submit | Submits a request to the Fal AI queue for asynchronous processing and returns a request ID for tracking the job. |
26
+ | status | Checks the status of a previously submitted Fal AI request and retrieves its current execution state |
27
+ | result | Retrieves the result of a completed Fal AI request, waiting for completion if the request is still running. |
28
+ | cancel | Asynchronously cancels a running or queued Fal AI request. |
29
+ | upload_file | Uploads a local file to the Fal CDN and returns its public URL |
30
+ | generate_image | Asynchronously generates images using the 'fal-ai/flux/dev' application with customizable parameters and default settings |
31
+
32
+
33
+ ## Usage
34
+
35
+ - Login to AgentR
36
+ - Follow the quickstart guide to setup MCP Server for your client
37
+ - Visit Apps Store and enable the Falai app
38
+ - Restart the MCP Server
39
+
40
+ ### Local Development
41
+
42
+ - Follow the README to test with the local MCP Server
File without changes
@@ -0,0 +1,332 @@
1
+ from pathlib import Path
2
+ from typing import Any, Literal
3
+
4
+ from fal_client import AsyncClient, AsyncRequestHandle, Status
5
+ from loguru import logger
6
+
7
+ from universal_mcp.applications import APIApplication
8
+ from universal_mcp.exceptions import NotAuthorizedError, ToolError
9
+ from universal_mcp.integrations import Integration
10
+
11
+ Priority = Literal["normal", "low"]
12
+
13
+
14
+ class FalaiApp(APIApplication):
15
+ """
16
+ Application for interacting with the Fal AI platform.
17
+
18
+ Provides tools to run, submit, check status, retrieve results, cancel jobs,
19
+ upload files to the Fal CDN, and a specialized tool for generating images.
20
+
21
+ Authentication is handled by the configured Integration provided by the
22
+ Universal MCP server, fetching the necessary API key.
23
+ """
24
+
25
+ def __init__(self, integration: Integration, **kwargs) -> None:
26
+ super().__init__(name="falai", integration=integration, **kwargs)
27
+ self._fal_client = None
28
+
29
+ @property
30
+ def fal_client(self) -> AsyncClient:
31
+ if self._fal_client is None:
32
+ credentials = self.integration.get_credentials()
33
+ if isinstance(credentials, dict) and "api_key" in credentials:
34
+ fal_api_key = credentials["api_key"]
35
+ else:
36
+ logger.error(
37
+ f"Integration {type(self.integration).__name__} returned credentials in unexpected format."
38
+ )
39
+ raise ValueError(
40
+ "Integration did not provide credentials in the expected 'api_key' format."
41
+ )
42
+ if not fal_api_key:
43
+ raise NotAuthorizedError(
44
+ "Integration returned empty or invalid API key."
45
+ )
46
+ self._fal_client = AsyncClient(key=fal_api_key)
47
+ return self._fal_client
48
+
49
+ async def run(
50
+ self,
51
+ arguments: Any,
52
+ application: str = "fal-ai/flux/dev",
53
+ path: str = "",
54
+ timeout: float | None = None,
55
+ hint: str | None = None,
56
+ ) -> Any:
57
+ """
58
+ Run a Fal AI application directly and wait for the result. Suitable for short-running applications with synchronous execution from the caller's perspective.
59
+
60
+ Args:
61
+ arguments: A dictionary of arguments for the application
62
+ application: The name or ID of the Fal application (defaults to 'fal-ai/flux/dev')
63
+ path: Optional subpath for the application endpoint
64
+ timeout: Optional timeout in seconds for the request
65
+ hint: Optional hint for runner selection
66
+
67
+ Returns:
68
+ The result of the application execution as a Python object (converted from JSON response)
69
+
70
+ Raises:
71
+ ToolError: Raised when the Fal API request fails, wrapping the original exception
72
+
73
+ Tags:
74
+ run, execute, ai, synchronous, fal, important
75
+ """
76
+ try:
77
+ result = await self.fal_client.run(
78
+ application=application,
79
+ arguments=arguments,
80
+ path=path,
81
+ timeout=timeout,
82
+ hint=hint,
83
+ )
84
+ return result
85
+ except Exception as e:
86
+ logger.error(
87
+ f"Error running Fal application {application}: {e}", exc_info=True
88
+ )
89
+ raise ToolError(f"Failed to run Fal application {application}: {e}") from e
90
+
91
+ async def submit(
92
+ self,
93
+ arguments: Any,
94
+ application: str = "fal-ai/flux/dev",
95
+ path: str = "",
96
+ hint: str | None = None,
97
+ webhook_url: str | None = None,
98
+ priority: Priority | None = None,
99
+ ) -> str:
100
+ """
101
+ Submits a request to the Fal AI queue for asynchronous processing and returns a request ID for tracking the job.
102
+
103
+ Args:
104
+ arguments: A dictionary of arguments for the application
105
+ application: The name or ID of the Fal application, defaulting to 'fal-ai/flux/dev'
106
+ path: Optional subpath for the application endpoint
107
+ hint: Optional hint for runner selection
108
+ webhook_url: Optional URL to receive a webhook when the request completes
109
+ priority: Optional queue priority ('normal' or 'low')
110
+
111
+ Returns:
112
+ The request ID (str) of the submitted asynchronous job
113
+
114
+ Raises:
115
+ ToolError: Raised when the Fal API request fails, wrapping the original exception
116
+
117
+ Tags:
118
+ submit, async_job, start, ai, queue
119
+ """
120
+ try:
121
+ handle: AsyncRequestHandle = await self.fal_client.submit(
122
+ application=application,
123
+ arguments=arguments,
124
+ path=path,
125
+ hint=hint,
126
+ webhook_url=webhook_url,
127
+ priority=priority,
128
+ )
129
+ request_id = handle.request_id
130
+ return request_id
131
+ except Exception as e:
132
+ logger.error(
133
+ f"Error submitting Fal application {application}: {e}", exc_info=True
134
+ )
135
+ raise ToolError(
136
+ f"Failed to submit Fal application {application}: {e}"
137
+ ) from e
138
+
139
+ async def status(
140
+ self,
141
+ request_id: str,
142
+ application: str = "fal-ai/flux/dev",
143
+ with_logs: bool = False,
144
+ ) -> Status:
145
+ """
146
+ Checks the status of a previously submitted Fal AI request and retrieves its current execution state
147
+
148
+ Args:
149
+ request_id: The unique identifier of the submitted request, obtained from a previous submit operation
150
+ application: The name or ID of the Fal application (defaults to 'fal-ai/flux/dev')
151
+ with_logs: Boolean flag to include execution logs in the status response (defaults to False)
152
+
153
+ Returns:
154
+ A Status object containing the current state of the request (Queued, InProgress, or Completed)
155
+
156
+ Raises:
157
+ ToolError: Raised when the Fal API request fails or when the provided request ID is invalid
158
+
159
+ Tags:
160
+ status, check, async_job, monitoring, ai
161
+ """
162
+ try:
163
+ handle = self.fal_client.get_handle(
164
+ application=application, request_id=request_id
165
+ )
166
+ status = await handle.status(with_logs=with_logs)
167
+ return status
168
+ except Exception as e:
169
+ logger.error(
170
+ f"Error getting status for Fal request_id {request_id}: {e}",
171
+ exc_info=True,
172
+ )
173
+ raise ToolError(
174
+ f"Failed to get status for Fal request_id {request_id}: {e}"
175
+ ) from e
176
+
177
+ async def result(
178
+ self, request_id: str, application: str = "fal-ai/flux/dev"
179
+ ) -> Any:
180
+ """
181
+ Retrieves the result of a completed Fal AI request, waiting for completion if the request is still running.
182
+
183
+ Args:
184
+ request_id: The unique identifier of the submitted request
185
+ application: The name or ID of the Fal application (defaults to 'fal-ai/flux/dev')
186
+
187
+ Returns:
188
+ The result of the application execution, converted from JSON response to Python data structures (dict/list)
189
+
190
+ Raises:
191
+ ToolError: When the Fal API request fails or the request does not complete successfully
192
+
193
+ Tags:
194
+ result, async-job, status, wait, ai
195
+ """
196
+ try:
197
+ handle = self.fal_client.get_handle(
198
+ application=application, request_id=request_id
199
+ )
200
+ result = await handle.get()
201
+ return result
202
+ except Exception as e:
203
+ logger.error(
204
+ f"Error getting result for Fal request_id {request_id}: {e}",
205
+ exc_info=True,
206
+ )
207
+ raise ToolError(
208
+ f"Failed to get result for Fal request_id {request_id}: {e}"
209
+ ) from e
210
+
211
+ async def cancel(
212
+ self, request_id: str, application: str = "fal-ai/flux/dev"
213
+ ) -> None:
214
+ """
215
+ Asynchronously cancels a running or queued Fal AI request.
216
+
217
+ Args:
218
+ request_id: The unique identifier of the submitted Fal AI request to cancel
219
+ application: The name or ID of the Fal application (defaults to 'fal-ai/flux/dev')
220
+
221
+ Returns:
222
+ None. The function doesn't return any value.
223
+
224
+ Raises:
225
+ ToolError: Raised when the cancellation request fails due to API errors or if the request cannot be cancelled
226
+
227
+ Tags:
228
+ cancel, async_job, ai, fal, management
229
+ """
230
+ try:
231
+ handle = self.fal_client.get_handle(
232
+ application=application, request_id=request_id
233
+ )
234
+ await handle.cancel()
235
+ return None
236
+ except Exception as e:
237
+ logger.error(
238
+ f"Error cancelling Fal request_id {request_id}: {e}", exc_info=True
239
+ )
240
+ raise ToolError(f"Failed to cancel Fal request_id {request_id}: {e}") from e
241
+
242
+ async def upload_file(self, path: str) -> str:
243
+ """
244
+ Uploads a local file to the Fal CDN and returns its public URL
245
+
246
+ Args:
247
+ path: The absolute or relative path to the local file
248
+
249
+ Returns:
250
+ A string containing the public URL of the uploaded file on the CDN
251
+
252
+ Raises:
253
+ ToolError: If the file is not found or if the upload operation fails
254
+
255
+ Tags:
256
+ upload, file, cdn, storage, async, important
257
+ """
258
+ try:
259
+ file_url = await self.fal_client.upload_file(Path(path))
260
+ return file_url
261
+ except FileNotFoundError as e:
262
+ logger.error(f"File not found for upload: {path}", exc_info=True)
263
+ raise ToolError(f"File not found: {path}") from e
264
+ except Exception as e:
265
+ logger.error(f"Error uploading file {path} to Fal CDN: {e}", exc_info=True)
266
+ raise ToolError(f"Failed to upload file {path}: {e}") from e
267
+
268
+ async def generate_image(
269
+ self,
270
+ prompt: str,
271
+ seed: int | None = 6252023,
272
+ image_size: str | None = "landscape_4_3",
273
+ num_images: int | None = 1,
274
+ extra_arguments: dict[str, Any] | None = None,
275
+ path: str = "",
276
+ timeout: float | None = None,
277
+ hint: str | None = None,
278
+ ) -> Any:
279
+ """
280
+ Asynchronously generates images using the 'fal-ai/flux/dev' application with customizable parameters and default settings
281
+
282
+ Args:
283
+ prompt: The text prompt used to guide the image generation
284
+ seed: Random seed for reproducible image generation (default: 6252023)
285
+ image_size: Dimensions of the generated image (default: 'landscape_4_3')
286
+ num_images: Number of images to generate in one request (default: 1)
287
+ extra_arguments: Additional arguments dictionary to pass to the application, can override defaults
288
+ path: Subpath for the application endpoint (rarely used)
289
+ timeout: Maximum time in seconds to wait for the request to complete
290
+ hint: Hint string for runner selection
291
+
292
+ Returns:
293
+ A dictionary containing the generated image URLs and related metadata
294
+
295
+ Raises:
296
+ ToolError: When the image generation request fails or encounters an error
297
+
298
+ Tags:
299
+ generate, image, ai, async, important, flux, customizable, default
300
+ """
301
+ application = "fal-ai/flux/dev"
302
+ arguments = {
303
+ "prompt": prompt,
304
+ "seed": seed,
305
+ "image_size": image_size,
306
+ "num_images": num_images,
307
+ }
308
+ if extra_arguments:
309
+ arguments.update(extra_arguments)
310
+ logger.debug(f"Merged extra_arguments. Final arguments: {arguments}")
311
+ try:
312
+ result = await self.run(
313
+ application=application,
314
+ arguments=arguments,
315
+ path=path,
316
+ timeout=timeout,
317
+ hint=hint,
318
+ )
319
+ return result
320
+ except Exception:
321
+ raise
322
+
323
+ def list_tools(self) -> list[callable]:
324
+ return [
325
+ self.run,
326
+ self.submit,
327
+ self.status,
328
+ self.result,
329
+ self.cancel,
330
+ self.upload_file,
331
+ self.generate_image,
332
+ ]
@@ -0,0 +1,88 @@
1
+
2
+ # Gong MCP Server
3
+
4
+ An MCP Server for the Gong 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 Gong 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
+ | list_calls | Retrieves a list of call records within the specified date range, with optional pagination and workspace filtering. |
25
+ | add_call | Creates and submits a new call record with detailed metadata to the remote service. |
26
+ | get_call | Retrieves details for a specific call by its identifier. |
27
+ | list_calls_extensive | Retrieves a list of extensive call records matching the specified filter criteria, with optional pagination and content selection. |
28
+ | get_permission_profile | Retrieve the details of a permission profile by its profile ID. |
29
+ | update_permission_profile | Updates an existing permission profile with the specified access settings and permissions. |
30
+ | create_permission_profile | Creates a new permission profile in the specified workspace with customizable access and permission settings. |
31
+ | update_meeting | Updates the details of an existing meeting with new information such as time, invitees, and title. |
32
+ | delete_meeting | Deletes a meeting by its ID, optionally specifying the organizer's email. |
33
+ | content_viewed | Reports a content view event to the customer engagement system with detailed metadata about the event and content. |
34
+ | content_shared | Reports a content sharing event to the customer engagement system with detailed metadata about the shared content, sharer, and recipients. |
35
+ | custom_action | Submits a custom customer engagement action event with detailed reporting and context information to the server. |
36
+ | list_generic_crm_integration | Retrieves a list of generic CRM integrations from the API. |
37
+ | register_generic_crm_integration | Registers a generic CRM integration for a given owner email and integration name. |
38
+ | delete_generic_crm_integration | Deletes a generic CRM integration using the provided integration and client request IDs. |
39
+ | add_users_access_to_calls | Updates user access permissions for calls by sending a PUT request with the specified access list. |
40
+ | get_users_access_to_calls | Retrieves user access information for calls based on the provided filter criteria. |
41
+ | delete_users_access_to_calls | Deletes a list of users' access permissions to calls. |
42
+ | list_multiple_users | Retrieves a list of users based on a provided filter and optional pagination cursor. |
43
+ | list_interaction_stats | Retrieves interaction statistics based on specified filter criteria, with optional pagination support. |
44
+ | list_answered_scorecards | Retrieves a paginated list of answered scorecards based on the provided filter criteria. |
45
+ | list_multiple_users_day_by_day_activity | Retrieves day-by-day activity statistics for multiple users based on a provided filter. |
46
+ | list_multiple_users_aggregate_activity | Aggregates and returns activity statistics for multiple users based on specified filters. |
47
+ | list_multiple_users_aggregate_by_period | Aggregates activity statistics for multiple users over a specified period using given filter criteria. |
48
+ | add_meeting | Creates a new meeting with the specified details and returns the server's response as a dictionary. |
49
+ | integration_status | Retrieves the integration status for specified email addresses via the meetings API. |
50
+ | integration_settings | Sends integration type settings to the integration settings API endpoint and returns the server's response as a dictionary. |
51
+ | get_flows_for_prospects | Fetches flow data for the specified CRM prospect IDs from the API. |
52
+ | assign_prospects | Assigns a list of CRM prospect IDs to a specified flow instance and owner via an API POST request. |
53
+ | add_digital_interaction | Submits a digital interaction event record to the API with required metadata and content. |
54
+ | purge_phone_number | Erases all data associated with the specified phone number via the data privacy API. |
55
+ | purge_email_address | Permanently erases all data associated with the specified email address from the system. |
56
+ | list_crm_schema_fields | Retrieves the schema fields for a specified CRM object type associated with a given integration. |
57
+ | upload_crm_schema_field | Uploads CRM entity schema fields to the integration service for the specified CRM object type. |
58
+ | get_crm_objects | Retrieves CRM objects by their CRM IDs from a specified integration and object type. |
59
+ | get_call_transcripts | Retrieves call transcripts based on the specified filter and optional pagination cursor. |
60
+ | list_workspaces | Retrieves a list of all available workspaces from the API. |
61
+ | list_users | Retrieves a paginated list of users from the API, with optional filtering by cursor and inclusion of avatar data. |
62
+ | get_user | Retrieves user information by user ID from the API. |
63
+ | get_user_history | Retrieves the settings history for a specific user by user ID. |
64
+ | list_trackers | Retrieves a list of trackers for the specified workspace from the API. |
65
+ | list_scorecards | Retrieves a list of scorecard settings from the API. |
66
+ | list_permission_profile_users | Retrieves a list of users associated with a specified permission profile. |
67
+ | list_logs | Retrieves a list of logs for the specified log type and time range, with optional cursor-based pagination. |
68
+ | get_library_structure | Retrieves the hierarchical structure of library folders, optionally filtered by workspace ID. |
69
+ | get_calls_in_specific_folder | Retrieves the list of calls contained within a specified folder from the remote library API. |
70
+ | list_flows | Retrieves a list of flows owned by the specified user, with optional pagination and workspace filtering. |
71
+ | find_all_references_to_phone_number | Fetches all references to a specified phone number from the data privacy API. |
72
+ | find_all_references_to_email_address | Finds and returns all data references associated with a given email address. |
73
+ | get_request_status | Retrieves the status of a CRM request using the provided integration and client request IDs. |
74
+ | list_crmcalls_manual_association | Retrieves a list of manually associated CRM call records, with optional filtering by date and pagination. |
75
+ | list_permission_profile | Retrieves the list of permission profiles for the specified workspace. |
76
+
77
+
78
+
79
+ ## Usage
80
+
81
+ - Login to AgentR
82
+ - Follow the quickstart guide to setup MCP Server for your client
83
+ - Visit Apps Store and enable the Gong app
84
+ - Restart the MCP Server
85
+
86
+ ### Local Development
87
+
88
+ - Follow the README to test with the local MCP Server
File without changes