media-agent-mcp 0.3.7__py3-none-any.whl → 0.3.9__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.
- media_agent_mcp/async_server.py +10 -25
- {media_agent_mcp-0.3.7.dist-info → media_agent_mcp-0.3.9.dist-info}/METADATA +1 -1
- {media_agent_mcp-0.3.7.dist-info → media_agent_mcp-0.3.9.dist-info}/RECORD +6 -6
- {media_agent_mcp-0.3.7.dist-info → media_agent_mcp-0.3.9.dist-info}/WHEEL +0 -0
- {media_agent_mcp-0.3.7.dist-info → media_agent_mcp-0.3.9.dist-info}/entry_points.txt +0 -0
- {media_agent_mcp-0.3.7.dist-info → media_agent_mcp-0.3.9.dist-info}/top_level.txt +0 -0
media_agent_mcp/async_server.py
CHANGED
@@ -49,7 +49,7 @@ mcp = FastMCP("Media-Agent-MCP-Async")
|
|
49
49
|
|
50
50
|
|
51
51
|
@mcp.tool()
|
52
|
-
async def
|
52
|
+
async def video_concat_tool(video_urls: List[str]) -> str:
|
53
53
|
"""
|
54
54
|
Asynchronously concatenate multiple videos from URLs and upload to TOS.
|
55
55
|
|
@@ -63,7 +63,7 @@ async def video_concat_tool_async(video_urls: List[str]) -> str:
|
|
63
63
|
|
64
64
|
|
65
65
|
@mcp.tool()
|
66
|
-
async def
|
66
|
+
async def video_last_frame_tool(video_url: str) -> str:
|
67
67
|
"""
|
68
68
|
Asynchronously extract the last frame from a video file and upload to TOS.
|
69
69
|
|
@@ -77,7 +77,7 @@ async def video_last_frame_tool_async(video_url: str) -> str:
|
|
77
77
|
|
78
78
|
|
79
79
|
@mcp.tool()
|
80
|
-
async def
|
80
|
+
async def seedream_generate_image_tool(prompt: str, size: str = "1024x1024") -> str:
|
81
81
|
"""
|
82
82
|
Asynchronously generate an image using Seedream AI model.
|
83
83
|
|
@@ -92,7 +92,7 @@ async def seedream_generate_image_tool_async(prompt: str, size: str = "1024x1024
|
|
92
92
|
|
93
93
|
|
94
94
|
@mcp.tool()
|
95
|
-
async def
|
95
|
+
async def seedance_generate_video_tool(prompt: str, first_frame_image: str,
|
96
96
|
last_frame_image: str = None, duration: int = 5,
|
97
97
|
resolution: str = "720p") -> str:
|
98
98
|
"""
|
@@ -112,7 +112,7 @@ async def seedance_generate_video_tool_async(prompt: str, first_frame_image: str
|
|
112
112
|
|
113
113
|
|
114
114
|
@mcp.tool()
|
115
|
-
async def
|
115
|
+
async def seededit_tool(image_url: str, prompt: str, seed: int = -1,
|
116
116
|
scale: float = 0.5, charactor_keep: bool = False) -> str:
|
117
117
|
"""
|
118
118
|
Asynchronously edit an image using Seededit model.
|
@@ -131,7 +131,7 @@ async def seededit_tool_async(image_url: str, prompt: str, seed: int = -1,
|
|
131
131
|
|
132
132
|
|
133
133
|
@mcp.tool()
|
134
|
-
async def
|
134
|
+
async def vlm_vision_task_tool(messages: List) -> str:
|
135
135
|
"""
|
136
136
|
Asynchronously perform vision-language tasks using VLM model.
|
137
137
|
|
@@ -145,7 +145,7 @@ async def vlm_vision_task_tool_async(messages: List) -> str:
|
|
145
145
|
|
146
146
|
|
147
147
|
@mcp.tool()
|
148
|
-
async def
|
148
|
+
async def image_selector_tool(image_paths: List[str], prompt: str) -> str:
|
149
149
|
"""
|
150
150
|
Asynchronously select the best image from multiple options using VLM model.
|
151
151
|
|
@@ -160,7 +160,7 @@ async def image_selector_tool_async(image_paths: List[str], prompt: str) -> str:
|
|
160
160
|
|
161
161
|
|
162
162
|
@mcp.tool()
|
163
|
-
async def
|
163
|
+
async def video_selector_tool(video_paths: List[str], prompt: str) -> str:
|
164
164
|
"""
|
165
165
|
Asynchronously select the best video from multiple options using VLM model.
|
166
166
|
|
@@ -175,7 +175,7 @@ async def video_selector_tool_async(video_paths: List[str], prompt: str) -> str:
|
|
175
175
|
|
176
176
|
|
177
177
|
@mcp.tool()
|
178
|
-
async def
|
178
|
+
async def tos_save_content_tool(content: str, file_extension: str = "txt",
|
179
179
|
object_key: Optional[str] = None) -> str:
|
180
180
|
"""
|
181
181
|
Asynchronously save content to TOS and return URL.
|
@@ -205,21 +205,6 @@ async def run_multiple_tools_concurrently(*coroutines):
|
|
205
205
|
return await asyncio.gather(*coroutines, return_exceptions=True)
|
206
206
|
|
207
207
|
|
208
|
-
# Example usage function
|
209
|
-
async def example_concurrent_usage():
|
210
|
-
"""
|
211
|
-
Example of how to use multiple tools concurrently.
|
212
|
-
"""
|
213
|
-
# Example: Generate image and process video concurrently
|
214
|
-
image_task = seedream_generate_image_tool_async("A beautiful sunset", "1024x1024")
|
215
|
-
video_task = video_last_frame_tool_async("https://example.com/video.mp4")
|
216
|
-
|
217
|
-
# Run both tasks concurrently
|
218
|
-
results = await run_multiple_tools_concurrently(image_task, video_task)
|
219
|
-
|
220
|
-
return results
|
221
|
-
|
222
|
-
|
223
208
|
def main():
|
224
209
|
"""Main entry point for the Async MCP server."""
|
225
210
|
# Parse command line arguments
|
@@ -229,7 +214,7 @@ def main():
|
|
229
214
|
parser.add_argument('--host', type=str, default='127.0.0.1',
|
230
215
|
help='Host for SSE transport (default: 127.0.0.1)')
|
231
216
|
parser.add_argument('--port', type=int, default=8000,
|
232
|
-
help='Port for SSE transport (default:
|
217
|
+
help='Port for SSE transport (default: 8000)')
|
233
218
|
parser.add_argument('--version', action='store_true',
|
234
219
|
help='Show version information')
|
235
220
|
|
@@ -1,5 +1,5 @@
|
|
1
1
|
media_agent_mcp/__init__.py,sha256=4kV5u8kHrsdjpMHDNUhc8h4U6AwOyw1mNptFPd2snrQ,365
|
2
|
-
media_agent_mcp/async_server.py,sha256=
|
2
|
+
media_agent_mcp/async_server.py,sha256=QYOcX0X3vFJ4elOwb1FzFItHC9YVpjA9DCg9CBanSiw,9238
|
3
3
|
media_agent_mcp/async_wrapper.py,sha256=bHi0cCKxv6R9oHcNcNq8tV0AyKrTDV47s8BuWetqlIg,8992
|
4
4
|
media_agent_mcp/server.py,sha256=-mTeNcJXIlgByCG2HhaqV6zSbhjrQIEv_ssLN47KAzM,13759
|
5
5
|
media_agent_mcp/ai_models/__init__.py,sha256=WN8JDSJbj2-sNwaQg3MDwmm9mvJTC1mqpWliac3sHoc,427
|
@@ -14,8 +14,8 @@ media_agent_mcp/storage/__init__.py,sha256=eio7ZiSeLjCxICSZwZisiR7wKJfXlT2PV7aDE
|
|
14
14
|
media_agent_mcp/storage/tos_client.py,sha256=9c3GPmQe2stvxgZzsWYjVqKzVyvluZqYneCXYj-FQ3M,3174
|
15
15
|
media_agent_mcp/video/__init__.py,sha256=4ILnqYaUaYKI4GWOSg2SNZqt10UM1Y-8Q2SVvjoijqY,277
|
16
16
|
media_agent_mcp/video/processor.py,sha256=5ABPyj1IoD2xyIiB8dkEx4ZssPTXKHtuoFjy-dmnFks,11866
|
17
|
-
media_agent_mcp-0.3.
|
18
|
-
media_agent_mcp-0.3.
|
19
|
-
media_agent_mcp-0.3.
|
20
|
-
media_agent_mcp-0.3.
|
21
|
-
media_agent_mcp-0.3.
|
17
|
+
media_agent_mcp-0.3.9.dist-info/METADATA,sha256=HgLx9BJINu6TANDbAZT4qX4adNFegiJDR6BYqm9OwSM,10975
|
18
|
+
media_agent_mcp-0.3.9.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
|
19
|
+
media_agent_mcp-0.3.9.dist-info/entry_points.txt,sha256=qhOUwR-ORVf9GO7emhhl7Lgd6MISgqbZr8bEuSH_VdA,70
|
20
|
+
media_agent_mcp-0.3.9.dist-info/top_level.txt,sha256=WEa0YfchpTxZgiKn8gdxYgs-dir5HepJaTOrxAGx9nY,16
|
21
|
+
media_agent_mcp-0.3.9.dist-info/RECORD,,
|
File without changes
|
File without changes
|
File without changes
|