Skip to content

Open-source social media scheduler built for AI agents and the teams behind them. Create, schedule and publish posts to every network through MCP or the REST API, or write them yourself in a composer your team will love.

refactor(mcp): move upload config from trypost.mcp to ai.mcp

Paulo Castellano7341852f5c4a
diff --git a/app/Http/Requests/Api/StoreUploadRequest.php b/app/Http/Requests/Api/StoreUploadRequest.php
index df5a1c3d6..812c8ac96 100644
--- a/app/Http/Requests/Api/StoreUploadRequest.php
+++ b/app/Http/Requests/Api/StoreUploadRequest.php
@@ -24,7 +24,7 @@ class StoreUploadRequest extends FormRequest
MediaType::Video->allowedMimeTypes(),
));
- $maxKb = (int) config('trypost.mcp.upload.max_size_mb') * 1024;
+ $maxKb = (int) config('ai.mcp.upload.max_size_mb') * 1024;
return [
'media' => [
diff --git a/app/Mcp/Tools/Post/RequestMediaUploadTool.php b/app/Mcp/Tools/Post/RequestMediaUploadTool.php
index b455ccd4b..354e91002 100644
--- a/app/Mcp/Tools/Post/RequestMediaUploadTool.php
+++ b/app/Mcp/Tools/Post/RequestMediaUploadTool.php
@@ -22,8 +22,8 @@ class RequestMediaUploadTool extends Tool
$user = $request->user();
$workspaceId = $user->current_workspace_id;
- $maxBytes = (int) config('trypost.mcp.upload.max_size_mb') * 1024 * 1024;
- $ttlMinutes = (int) config('trypost.mcp.upload.url_ttl_minutes');
+ $maxBytes = (int) config('ai.mcp.upload.max_size_mb') * 1024 * 1024;
+ $ttlMinutes = (int) config('ai.mcp.upload.url_ttl_minutes');
$token = (string) Str::uuid();
$expiresAt = CarbonImmutable::now()->addMinutes($ttlMinutes);
diff --git a/config/ai.php b/config/ai.php
index 1a393ff01..c28a3160f 100644
--- a/config/ai.php
+++ b/config/ai.php
@@ -39,6 +39,25 @@ return [
],
],
+ /*
+ |--------------------------------------------------------------------------
+ | MCP Media Upload
+ |--------------------------------------------------------------------------
+ |
+ | Settings for the MCP signed-URL upload flow. The hard cap is enforced
+ | per upload regardless of media type and is intentionally smaller than
+ | the per-type caps in config('trypost.media') because uploads flow
+ | through the app server.
+ |
+ */
+
+ 'mcp' => [
+ 'upload' => [
+ 'max_size_mb' => (int) env('MCP_UPLOAD_MAX_SIZE_MB', 50),
+ 'url_ttl_minutes' => (int) env('MCP_UPLOAD_URL_TTL_MINUTES', 15),
+ ],
+ ],
+
/*
|--------------------------------------------------------------------------
| AI Providers
diff --git a/config/trypost.php b/config/trypost.php
index 2280ac2e3..9ab2e2b90 100644
--- a/config/trypost.php
+++ b/config/trypost.php
@@ -34,24 +34,6 @@ return [
],
],
- /*
- |--------------------------------------------------------------------------
- | MCP Media Upload
- |--------------------------------------------------------------------------
- |
- | Settings for the MCP signed-URL upload flow. The hard cap is enforced
- | per upload regardless of media type and is intentionally smaller than
- | the per-type caps above because uploads flow through the app server.
- |
- */
-
- 'mcp' => [
- 'upload' => [
- 'max_size_mb' => (int) env('MCP_UPLOAD_MAX_SIZE_MB', 50),
- 'url_ttl_minutes' => (int) env('MCP_UPLOAD_URL_TTL_MINUTES', 15),
- ],
- ],
-
/*
|--------------------------------------------------------------------------
| Google Authentication