media-agent-mcp 0.2.0__tar.gz → 0.3.0__tar.gz
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-0.2.0 → media_agent_mcp-0.3.0}/.idea/workspace.xml +2 -2
- {media_agent_mcp-0.2.0 → media_agent_mcp-0.3.0}/PKG-INFO +1 -1
- {media_agent_mcp-0.2.0 → media_agent_mcp-0.3.0}/pyproject.toml +1 -1
- {media_agent_mcp-0.2.0 → media_agent_mcp-0.3.0}/src/media_agent_mcp/ai_models/seedance.py +4 -4
- {media_agent_mcp-0.2.0 → media_agent_mcp-0.3.0}/src/media_agent_mcp/server.py +16 -6
- {media_agent_mcp-0.2.0 → media_agent_mcp-0.3.0}/.env.template +0 -0
- {media_agent_mcp-0.2.0 → media_agent_mcp-0.3.0}/.gitignore +0 -0
- {media_agent_mcp-0.2.0 → media_agent_mcp-0.3.0}/.idea/.gitignore +0 -0
- {media_agent_mcp-0.2.0 → media_agent_mcp-0.3.0}/.idea/inspectionProfiles/Project_Default.xml +0 -0
- {media_agent_mcp-0.2.0 → media_agent_mcp-0.3.0}/.idea/inspectionProfiles/profiles_settings.xml +0 -0
- {media_agent_mcp-0.2.0 → media_agent_mcp-0.3.0}/.idea/media-agent-mcp.iml +0 -0
- {media_agent_mcp-0.2.0 → media_agent_mcp-0.3.0}/.idea/misc.xml +0 -0
- {media_agent_mcp-0.2.0 → media_agent_mcp-0.3.0}/.idea/modules.xml +0 -0
- {media_agent_mcp-0.2.0 → media_agent_mcp-0.3.0}/.idea/vcs.xml +0 -0
- {media_agent_mcp-0.2.0 → media_agent_mcp-0.3.0}/.python-version +0 -0
- {media_agent_mcp-0.2.0 → media_agent_mcp-0.3.0}/README.md +0 -0
- {media_agent_mcp-0.2.0 → media_agent_mcp-0.3.0}/src/media_agent_mcp/__init__.py +0 -0
- {media_agent_mcp-0.2.0 → media_agent_mcp-0.3.0}/src/media_agent_mcp/ai_models/__init__.py +0 -0
- {media_agent_mcp-0.2.0 → media_agent_mcp-0.3.0}/src/media_agent_mcp/ai_models/seed16.py +0 -0
- {media_agent_mcp-0.2.0 → media_agent_mcp-0.3.0}/src/media_agent_mcp/ai_models/seededit.py +0 -0
- {media_agent_mcp-0.2.0 → media_agent_mcp-0.3.0}/src/media_agent_mcp/ai_models/seedream.py +0 -0
- {media_agent_mcp-0.2.0 → media_agent_mcp-0.3.0}/src/media_agent_mcp/media_selectors/__init__.py +0 -0
- {media_agent_mcp-0.2.0 → media_agent_mcp-0.3.0}/src/media_agent_mcp/media_selectors/image_selector.py +0 -0
- {media_agent_mcp-0.2.0 → media_agent_mcp-0.3.0}/src/media_agent_mcp/media_selectors/video_selector.py +0 -0
- {media_agent_mcp-0.2.0 → media_agent_mcp-0.3.0}/src/media_agent_mcp/storage/__init__.py +0 -0
- {media_agent_mcp-0.2.0 → media_agent_mcp-0.3.0}/src/media_agent_mcp/storage/tos_client.py +0 -0
- {media_agent_mcp-0.2.0 → media_agent_mcp-0.3.0}/src/media_agent_mcp/video/__init__.py +0 -0
- {media_agent_mcp-0.2.0 → media_agent_mcp-0.3.0}/src/media_agent_mcp/video/processor.py +0 -0
- {media_agent_mcp-0.2.0 → media_agent_mcp-0.3.0}/uv.lock +0 -0
@@ -116,7 +116,7 @@
|
|
116
116
|
<option name="number" value="Default" />
|
117
117
|
<option name="presentableId" value="Default" />
|
118
118
|
<updated>1753446872370</updated>
|
119
|
-
<workItem from="1753446874397" duration="
|
119
|
+
<workItem from="1753446874397" duration="10085000" />
|
120
120
|
</task>
|
121
121
|
<servers />
|
122
122
|
</component>
|
@@ -135,7 +135,7 @@
|
|
135
135
|
</breakpoint-manager>
|
136
136
|
</component>
|
137
137
|
<component name="com.intellij.coverage.CoverageDataManagerImpl">
|
138
|
-
<SUITE FILE_PATH="coverage/media_agent_mcp$server.coverage" NAME="server Coverage Results" MODIFIED="
|
138
|
+
<SUITE FILE_PATH="coverage/media_agent_mcp$server.coverage" NAME="server Coverage Results" MODIFIED="1753504130943" SOURCE_PROVIDER="com.intellij.coverage.DefaultCoverageFileProvider" RUNNER="coverage.py" COVERAGE_BY_TEST_ENABLED="false" COVERAGE_TRACING_ENABLED="false" WORKING_DIRECTORY="$PROJECT_DIR$/src/media_agent_mcp" />
|
139
139
|
<SUITE FILE_PATH="coverage/media_agent_mcp$image_selector.coverage" NAME="image_selector Coverage Results" MODIFIED="1753447327399" SOURCE_PROVIDER="com.intellij.coverage.DefaultCoverageFileProvider" RUNNER="coverage.py" COVERAGE_BY_TEST_ENABLED="false" COVERAGE_TRACING_ENABLED="false" WORKING_DIRECTORY="$PROJECT_DIR$/src/media_agent_mcp/selectors" />
|
140
140
|
</component>
|
141
141
|
</project>
|
@@ -222,21 +222,21 @@ def _poll_video_status(task_id: str, api_key: str, max_wait_time: int = 90) -> D
|
|
222
222
|
|
223
223
|
elif status in ['queued', 'running']:
|
224
224
|
# Continue polling
|
225
|
-
time.sleep(5)
|
225
|
+
time.sleep(0.5)
|
226
226
|
continue
|
227
227
|
|
228
228
|
else:
|
229
229
|
logger.warning(f"Unknown status: {status}")
|
230
|
-
time.sleep(5)
|
230
|
+
time.sleep(0.5)
|
231
231
|
continue
|
232
232
|
|
233
233
|
except requests.exceptions.RequestException as e:
|
234
234
|
logger.error(f"Error polling status: {str(e)}")
|
235
|
-
time.sleep(5)
|
235
|
+
time.sleep(0.5)
|
236
236
|
continue
|
237
237
|
except Exception as e:
|
238
238
|
logger.error(f"Unexpected error polling status: {str(e)}")
|
239
|
-
time.sleep(5)
|
239
|
+
time.sleep(0.5)
|
240
240
|
continue
|
241
241
|
|
242
242
|
return f"Error: Video generation timed out after {max_wait_time} seconds"
|
@@ -18,6 +18,7 @@ import logging
|
|
18
18
|
from typing import Optional, Dict, Any
|
19
19
|
import json
|
20
20
|
from dotenv import load_dotenv
|
21
|
+
import uvicorn
|
21
22
|
|
22
23
|
from mcp.server.fastmcp import FastMCP
|
23
24
|
|
@@ -369,6 +370,8 @@ def main():
|
|
369
370
|
help='Host for SSE transport (default: 127.0.0.1)')
|
370
371
|
parser.add_argument('--port', type=int, default=8000,
|
371
372
|
help='Port for SSE transport (default: 8000)')
|
373
|
+
parser.add_argument('--workers', type=int, default=4,
|
374
|
+
help='Number of worker processes (default: 4)')
|
372
375
|
parser.add_argument('--version', action='store_true',
|
373
376
|
help='Show version information')
|
374
377
|
|
@@ -396,13 +399,20 @@ def main():
|
|
396
399
|
|
397
400
|
# Start the server with specified transport
|
398
401
|
if args.transport == 'sse':
|
399
|
-
logger.info(f"Starting SSE server on {args.host}:{args.port}")
|
400
|
-
|
401
|
-
|
402
|
-
|
403
|
-
|
402
|
+
logger.info(f"Starting SSE server on {args.host}:{args.port} with {args.workers} workers")
|
403
|
+
|
404
|
+
# Use uvicorn with multiple workers for better concurrency
|
405
|
+
uvicorn.run(
|
406
|
+
"media_agent_mcp.server:mcp", # Module path to FastMCP instance
|
407
|
+
host=args.host,
|
408
|
+
port=args.port,
|
409
|
+
workers=args.workers,
|
410
|
+
reload=False,
|
411
|
+
log_level="info"
|
412
|
+
)
|
404
413
|
else:
|
405
|
-
# Default stdio transport
|
414
|
+
# Default stdio transport (single process)
|
415
|
+
logger.info("Starting STDIO transport (single process)")
|
406
416
|
mcp.run(transport="stdio")
|
407
417
|
|
408
418
|
|
File without changes
|
File without changes
|
File without changes
|
{media_agent_mcp-0.2.0 → media_agent_mcp-0.3.0}/.idea/inspectionProfiles/Project_Default.xml
RENAMED
File without changes
|
{media_agent_mcp-0.2.0 → media_agent_mcp-0.3.0}/.idea/inspectionProfiles/profiles_settings.xml
RENAMED
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
{media_agent_mcp-0.2.0 → media_agent_mcp-0.3.0}/src/media_agent_mcp/media_selectors/__init__.py
RENAMED
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|