Replit gives you two valid shapes for recurring work, and choosing the wrong one makes the setup harder than it needs to be. A Scheduled Deployment runs a command in the app environment and then stops. Crontap calls an HTTP endpoint that an existing deployment already serves. This guide uses Replit Agent to publish an Autoscale API route, connects Crontap through Replit's custom OAuth MCP flow, and verifies a recurring inventory snapshot. You need a published Replit app and a Crontap account.
Before you start
- Put endpoint tokens in Replit Secrets and the Crontap UI, not in Agent chat or MCP arguments.
- Verified against Replit custom MCP and Replit deployment types on 2026-09-15.
Choose the scheduling shape
- Scheduled Deployment: Replit owns the clock and runs a command in the app environment. It has no public URL and is not managed through Crontap MCP.
- Crontap plus a deployed API: an Autoscale or Reserved VM deployment serves the URL, while Crontap sends the recurring request. Replit Agent can manage the Crontap resource through MCP.
Step 1
Publish an idempotent API route
Ask Agent to add POST /api/inventory/snapshot. Require X-Inventory-Key to
match INVENTORY_KEY, then upsert a snapshot keyed by date. Add the value in
Replit Secrets. Publish the app as Autoscale, call the production route with
curl, and inspect the request in deployment logs.
Add POST /api/inventory/snapshot to this app. Require X-Inventory-Key to match the INVENTORY_KEY secret, compute today's inventory totals, and upsert one row keyed by snapshot_date. Return JSON with the date and item count. Do not expose the secret in code or logs.Before publishing, inspect the generated route. Authentication should run before the inventory query, and the database should enforce a unique key on snapshot_date rather than relying only on application logic. Confirm that a successful response contains the snapshot date and item count, while failures use an appropriate non-2xx status. This makes Crontap history useful without returning private row data. In Replit deployment logs, record the route, status, and request ID, but not X-Inventory-Key.
Connect Crontap MCP in Replit
Step 2
Add the custom MCP server
Go to replit.com/integrations, scroll to MCP Servers for Replit Agent, and
select Add MCP server. Name it Crontap and enter
https://mcp.crontap.com/mcp. Do not add custom headers. Choose Test and
save, then complete the OAuth flow Replit opens.
- Crontap
- Connected
- Authentication
- OAuth 2.1
Replit makes the tools available across projects after connection. A confirmation appears when a tool requires it. Review the target project and resource each time instead of treating the global connection as blanket permission.
Step 3
Preview the inventory cadence
In Agent chat, ask Crontap to preview every day at 01:10 in UTC. Check the upcoming dates and keep this turn read-only. The deployed app should not be called during preview.
Using the Crontap MCP server, preview every day at 01:10 in UTC. Show the three upcoming runs and do not create, update, or delete a resource.Step 4
Create the external HTTP schedule
Copy the published Autoscale URL and append /api/inventory/snapshot. Ask
Agent to create a POST schedule using the previewed cadence. Confirm the
URL, method, and timezone. Open the returned schedule in Crontap and add the
X-Inventory-Key header there.
Create a Crontap schedule named "daily inventory snapshot" that POSTs to https://YOUR-APP.replit.app/api/inventory/snapshot at the cadence we previewed. Show all fields for confirmation before the write. Leave endpoint authentication out of the tool call.Step 5
Verify the API and schedule
Retrieve the new resource by ID in Agent chat. Perform a test request from Crontap after adding the secret. In Replit's deployment logs, find the matching request and confirm the snapshot table has exactly one row for the date.
Verify it worked in both products
Replit Integrations should show the Crontap connection as saved. Agent should return one schedule ID, and a follow-up read by that ID should show the production replit.app hostname and expected next run. Crontap history should record the test status and duration, Replit deployment logs should show POST /api/inventory/snapshot, and the database should contain the expected totals. Trigger a second test to confirm the upsert does not duplicate the day's snapshot.
If a layer disagrees, check it in order. Reconnect MCP when Integrations does not show the server. Inspect the saved request when Agent can list schedules but the test fails. Inspect application logs and the database write when Crontap records success without a snapshot row. After the first timed run, match the Crontap history timestamp to the Replit deployment log before leaving the schedule active.
Troubleshooting
Test and save cannot reach Crontap
Use the complete HTTPS endpoint ending in /mcp and remove custom headers. Crontap relies on the OAuth flow that Replit opens after testing the server.
Agent cannot see the server
Return to Integrations and verify the saved status. Reconnect if authorization expired. The connection is account-wide, so also confirm you are using the intended Replit account.
The scheduled request hits 404
Do not use a workspace preview URL. Copy the public Autoscale or Reserved VM deployment hostname and verify the route path.
The route returns 401
Compare INVENTORY_KEY in Replit Secrets with the header value stored in Crontap. Keep both values out of chat and logs.
Next steps
- Return to the Crontap MCP hub for tool and account details.
- Compare custom connector setup in Bolt and terminal setup in Gemini CLI.
- Read Schedule tasks in Replit apps for a deeper native-versus-external comparison.
Ready to schedule the deployed API? Free forever tier. No credit card. Create your Crontap account →
Verified against current official Replit documentation on 2026-09-15. Sources: Replit custom MCP and Replit deployment types.
FAQ
Replit scheduling questions
- When should I use Replit scheduling instead of Crontap?
- Use a Scheduled Deployment when a command should run in the app environment and stop. Use Crontap when an Autoscale or Reserved VM deployment already exposes the operation as an HTTP route.
- Which Replit deployments can receive Crontap requests?
- Use a public API route on an Autoscale or Reserved VM deployment. Copy its production replit.app URL rather than a workspace preview address.
- Can Replit Agent connect to Crontap MCP?
- Yes. Replit documents adding a custom HTTPS MCP endpoint and walking through any OAuth flow the server requires, followed by Test and save.
- Where should the Replit endpoint token be stored?
- Store the value in Replit Secrets and in the Crontap schedule header. Keep it out of Agent chat, source code, logs, and MCP tool arguments.
