universal-mcp-applications 0.1.10__py3-none-any.whl → 0.1.12__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/google_gemini/app.py +25 -11
- universal_mcp/applications/markitdown/app.py +9 -0
- {universal_mcp_applications-0.1.10.dist-info → universal_mcp_applications-0.1.12.dist-info}/METADATA +3 -2
- {universal_mcp_applications-0.1.10.dist-info → universal_mcp_applications-0.1.12.dist-info}/RECORD +6 -6
- {universal_mcp_applications-0.1.10.dist-info → universal_mcp_applications-0.1.12.dist-info}/WHEEL +0 -0
- {universal_mcp_applications-0.1.10.dist-info → universal_mcp_applications-0.1.12.dist-info}/licenses/LICENSE +0 -0
|
@@ -3,7 +3,7 @@ import io
|
|
|
3
3
|
import os
|
|
4
4
|
import uuid
|
|
5
5
|
import wave
|
|
6
|
-
from typing import Annotated
|
|
6
|
+
from typing import Annotated
|
|
7
7
|
|
|
8
8
|
from google import genai
|
|
9
9
|
from google.genai import types
|
|
@@ -55,11 +55,13 @@ class GoogleGeminiApp(APIApplication):
|
|
|
55
55
|
|
|
56
56
|
Example:
|
|
57
57
|
response = app.generate_text("Tell me a joke.")
|
|
58
|
-
|
|
58
|
+
|
|
59
59
|
Tags:
|
|
60
60
|
important
|
|
61
61
|
"""
|
|
62
|
-
response = self.genai_client.generate_content(
|
|
62
|
+
response = self.genai_client.models.generate_content(
|
|
63
|
+
contents=prompt, model=model
|
|
64
|
+
)
|
|
63
65
|
return response.text
|
|
64
66
|
|
|
65
67
|
async def generate_image(
|
|
@@ -80,15 +82,16 @@ class GoogleGeminiApp(APIApplication):
|
|
|
80
82
|
|
|
81
83
|
Returns:
|
|
82
84
|
list: A list of dicts, each containing either 'text' or 'image_bytes'.
|
|
83
|
-
|
|
85
|
+
|
|
84
86
|
Tags:
|
|
85
87
|
important
|
|
86
88
|
"""
|
|
87
89
|
# The Gemini API is synchronous, so run in a thread
|
|
88
90
|
contents = [prompt]
|
|
89
91
|
if image:
|
|
90
|
-
if image.startswith((
|
|
92
|
+
if image.startswith(("http://", "https://")):
|
|
91
93
|
import requests
|
|
94
|
+
|
|
92
95
|
response = requests.get(image)
|
|
93
96
|
response.raise_for_status()
|
|
94
97
|
image = Image.open(io.BytesIO(response.content))
|
|
@@ -108,12 +111,17 @@ class GoogleGeminiApp(APIApplication):
|
|
|
108
111
|
# Return the raw image bytes
|
|
109
112
|
image_bytes = part.inline_data.data
|
|
110
113
|
|
|
111
|
-
|
|
112
114
|
img_base64 = base64.b64encode(image_bytes).decode("utf-8")
|
|
113
115
|
|
|
114
116
|
file_name = f"{uuid.uuid4()}.png"
|
|
115
117
|
|
|
116
|
-
return {
|
|
118
|
+
return {
|
|
119
|
+
"type": "image",
|
|
120
|
+
"data": img_base64,
|
|
121
|
+
"mime_type": "image/png",
|
|
122
|
+
"file_name": file_name,
|
|
123
|
+
"text": text,
|
|
124
|
+
}
|
|
117
125
|
|
|
118
126
|
async def generate_audio(
|
|
119
127
|
self,
|
|
@@ -128,7 +136,7 @@ class GoogleGeminiApp(APIApplication):
|
|
|
128
136
|
|
|
129
137
|
Returns:
|
|
130
138
|
str: The URL of the uploaded audio file.
|
|
131
|
-
|
|
139
|
+
|
|
132
140
|
Tags:
|
|
133
141
|
important
|
|
134
142
|
"""
|
|
@@ -164,15 +172,21 @@ class GoogleGeminiApp(APIApplication):
|
|
|
164
172
|
# read the file
|
|
165
173
|
with open(file_name, "rb") as f:
|
|
166
174
|
data = f.read()
|
|
167
|
-
|
|
175
|
+
|
|
168
176
|
# delete the file
|
|
169
177
|
os.remove(file_name)
|
|
170
178
|
|
|
171
179
|
# Convert to base64
|
|
172
180
|
import base64
|
|
173
|
-
audio_base64 = base64.b64encode(data).decode('utf-8')
|
|
174
181
|
|
|
175
|
-
|
|
182
|
+
audio_base64 = base64.b64encode(data).decode("utf-8")
|
|
183
|
+
|
|
184
|
+
return {
|
|
185
|
+
"type": "audio",
|
|
186
|
+
"data": audio_base64,
|
|
187
|
+
"mime_type": "audio/wav",
|
|
188
|
+
"file_name": file_name,
|
|
189
|
+
}
|
|
176
190
|
|
|
177
191
|
def list_tools(self):
|
|
178
192
|
return [
|
|
@@ -60,3 +60,12 @@ class MarkitdownApp(BaseApplication):
|
|
|
60
60
|
return [
|
|
61
61
|
self.convert_to_markdown,
|
|
62
62
|
]
|
|
63
|
+
|
|
64
|
+
async def main():
|
|
65
|
+
app = MarkitdownApp()
|
|
66
|
+
result = await app.convert_to_markdown("https://www.youtube.com/watch?v=Cr9B6yyLZSk")
|
|
67
|
+
print(result)
|
|
68
|
+
|
|
69
|
+
if __name__ == "__main__":
|
|
70
|
+
import asyncio
|
|
71
|
+
asyncio.run(main())
|
{universal_mcp_applications-0.1.10.dist-info → universal_mcp_applications-0.1.12.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.12
|
|
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
|
|
@@ -22,7 +22,7 @@ Requires-Dist: google-genai>=1.33.0
|
|
|
22
22
|
Requires-Dist: google-search-results>=2.4.2
|
|
23
23
|
Requires-Dist: gql[all]>=3.5.2
|
|
24
24
|
Requires-Dist: httpx-aiohttp>=0.1.8
|
|
25
|
-
Requires-Dist: markitdown[
|
|
25
|
+
Requires-Dist: markitdown[audio-transcription,az-doc-intel,docx,outlook,pdf,pptx,xls,xlsx]==0.1.3
|
|
26
26
|
Requires-Dist: office365-rest-python-client>=2.6.2
|
|
27
27
|
Requires-Dist: openai>=1.75.0
|
|
28
28
|
Requires-Dist: pyairtable>=3.1.1
|
|
@@ -35,6 +35,7 @@ Requires-Dist: requests>=2.31.0
|
|
|
35
35
|
Requires-Dist: resend>=2.10.0
|
|
36
36
|
Requires-Dist: twilio>=9.8.0
|
|
37
37
|
Requires-Dist: universal-mcp>=0.1.24rc19
|
|
38
|
+
Requires-Dist: youtube-transcript-api==1.2.2
|
|
38
39
|
Provides-Extra: dev
|
|
39
40
|
Requires-Dist: pre-commit; extra == 'dev'
|
|
40
41
|
Requires-Dist: ruff; extra == 'dev'
|
{universal_mcp_applications-0.1.10.dist-info → universal_mcp_applications-0.1.12.dist-info}/RECORD
RENAMED
|
@@ -106,7 +106,7 @@ universal_mcp/applications/google_drive/__init__.py,sha256=DTyed4ADcCmALSyPT8whj
|
|
|
106
106
|
universal_mcp/applications/google_drive/app.py,sha256=IlYwUxGRo7ISKGeWzWpc_0r4ewDo-rXLPChyMOxAc_Q,248993
|
|
107
107
|
universal_mcp/applications/google_gemini/README.md,sha256=o5cWenioUnNhn7L2fxwPLasBXzQ7mNmYp-aLLj9bHzY,2042
|
|
108
108
|
universal_mcp/applications/google_gemini/__init__.py,sha256=KZWdPU74VKBBabLpAcPNEPRPLFk8v2i0ULnT4wVHM9U,33
|
|
109
|
-
universal_mcp/applications/google_gemini/app.py,sha256=
|
|
109
|
+
universal_mcp/applications/google_gemini/app.py,sha256=E8TLYAEUKfjQUmkeZ_bS9Jutj4mdVOJd-EepT1ndVFg,6687
|
|
110
110
|
universal_mcp/applications/google_mail/README.md,sha256=TVLbil9-qjjp9kZziuWWhkiVNR1tf5XJ_q37xd6iUsg,2422
|
|
111
111
|
universal_mcp/applications/google_mail/__init__.py,sha256=_VpJPPBAJvPX3urxUD2_kiQmld91tkVFSvAcdt5XbmI,31
|
|
112
112
|
universal_mcp/applications/google_mail/app.py,sha256=vT3Lg2qZNX98PPjJ-nDkA4VtZvofu_nkXuqRo4w2Xpo,54892
|
|
@@ -143,7 +143,7 @@ universal_mcp/applications/mailchimp/__init__.py,sha256=wmXVl-NJyTNkFT5db29OZmei
|
|
|
143
143
|
universal_mcp/applications/mailchimp/app.py,sha256=_a6iByjDK1SuM3UoT5lTokptdEryUzrS8JsYNLCTwi4,466723
|
|
144
144
|
universal_mcp/applications/markitdown/README.md,sha256=rikIKv97pE_gKw3-xs5B-UmDTHCFHyUV3MX0ugAmyxI,315
|
|
145
145
|
universal_mcp/applications/markitdown/__init__.py,sha256=hWz8PzvmnG9ZtNUbWlkZaOZeNdi_ewlpcXtEW2P5pf0,31
|
|
146
|
-
universal_mcp/applications/markitdown/app.py,sha256=
|
|
146
|
+
universal_mcp/applications/markitdown/app.py,sha256=IPjSTxULuDaVLx0QN3BWlYXjhj7yOmPcMbZDo2Fl2OA,2697
|
|
147
147
|
universal_mcp/applications/miro/README.md,sha256=FM-K7FcSAe-6niWaYge4Vdi91EaE2Qz3KdRvH0ngdLQ,18707
|
|
148
148
|
universal_mcp/applications/miro/__init__.py,sha256=60-PalZbgF6QF506qaaGRkMNNzkiyyFc7Ez37fqS-qM,25
|
|
149
149
|
universal_mcp/applications/miro/app.py,sha256=Jvghd4TRBUubHaG-IEniSVdd7LwlrULpUEepjWzHC7I,198132
|
|
@@ -267,7 +267,7 @@ universal_mcp/applications/youtube/app.py,sha256=hhKqnbXvMAyOW3LOqp-ODPdIuQorr1n
|
|
|
267
267
|
universal_mcp/applications/zenquotes/README.md,sha256=x1mZHjNKD4WOgsIhedcbbaR1nvbt794GSrKud1tSLD0,296
|
|
268
268
|
universal_mcp/applications/zenquotes/__init__.py,sha256=IkASLYaZiHJXlkGwEMk1HgIq5GwEZp5GhAIiJyjBd3g,30
|
|
269
269
|
universal_mcp/applications/zenquotes/app.py,sha256=6v8trNWjxbixdlEyaM-gJbfY8z9ZAmkIzSUks_fbsT4,1076
|
|
270
|
-
universal_mcp_applications-0.1.
|
|
271
|
-
universal_mcp_applications-0.1.
|
|
272
|
-
universal_mcp_applications-0.1.
|
|
273
|
-
universal_mcp_applications-0.1.
|
|
270
|
+
universal_mcp_applications-0.1.12.dist-info/METADATA,sha256=UByR44h2UsgviawlUCiWIOrQpGVLthSSObMXnFYl_-c,4024
|
|
271
|
+
universal_mcp_applications-0.1.12.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
|
|
272
|
+
universal_mcp_applications-0.1.12.dist-info/licenses/LICENSE,sha256=NweDZVPslBAZFzlgByF158b85GR0f5_tLQgq1NS48To,1063
|
|
273
|
+
universal_mcp_applications-0.1.12.dist-info/RECORD,,
|
{universal_mcp_applications-0.1.10.dist-info → universal_mcp_applications-0.1.12.dist-info}/WHEEL
RENAMED
|
File without changes
|
|
File without changes
|