Skip to main content
Cascade is built for long-horizon agent work that touches many files at once. Dreamlit’s Model Context Protocol (MCP) server lets that same multi-step reach extend into your notification workflows, so a refactor that adds a new trigger column and an updated workflow can ship in one Cascade flow. You can ask Windsurf Cascade things like:
  • List my published workflows in Dreamlit.
  • Build a Black Friday campaign: add a discount code to my app and create the email workflow that ships it to active users.
  • Create a recurring email that sends me a weekly usage digest every Monday at 9 AM America/New_York. Include new signups, active users, and failed payments from the previous week.
  • Send me a test of the welcome email draft so I can review it in my inbox before publishing.
  • Publish the “trial ending” reminder workflow. Check for any warnings or errors before publishing.
The key advantage is the closed loop: Cascade can use context from your app, codebase, and data model to understand what you want, work back and forth with Dreamlit to fix issues, and only return a preview URL once the workflow matches your intent and is ready to review.

Why use Dreamlit MCP with Windsurf?

Cascade’s strength is multi-step agent work that spans your codebase. Dreamlit MCP lets that span extend into the notification side, so a Cascade flow can touch app code and the workflow that depends on it in one autonomous run.
  • Multi-file agent reach: Cascade can update app code and Dreamlit workflows in one coordinated flow without context-switching.
  • Long-horizon authoring: design a campaign, ship the trigger logic, draft the email workflow, run a test, all in a single Cascade session.
  • Codebase context: Cascade reads the project as a whole and picks the right table or trigger event when drafting the workflow.
  • Test and ship: send a test through send_workflow_test before publishing, all from Cascade.

Server URL

Dreamlit hosts this remote MCP server over Streamable HTTP. Windsurf can connect to remote HTTP MCP servers from Cascade settings.

Quick install

1

Open Windsurf MCP settings

Open Settings -> Tools -> Windsurf Settings -> Add Server. If you prefer raw config, click View Raw Config.
2

Add Dreamlit

Add Dreamlit to mcp_config.json:
3

Authorize Dreamlit

Save the config, refresh MCP servers in Windsurf, then complete the Dreamlit OAuth flow when prompted.
4

Refresh Cascade tools

Press the MCP refresh button after authorization. If Dreamlit tools do not appear, start a new Cascade chat or restart Windsurf.
5

Start prompting

Ask Cascade:
Use a Dreamlit personal access token when Windsurf cannot complete OAuth or when you want one project-scoped credential.
1

Create a token

Open Dreamlit, go to Project Settings -> Project Details -> MCP Access, then click Create token.
2

Choose scopes

Select the smallest set of permissions Windsurf needs.
3

Copy the token now

Dreamlit only shows the token once. Store it securely.
4

Pass the token as a Bearer token

Configure Windsurf to send:

What is MCP?

MCP is an open standard that lets Windsurf connect to external tools and data sources through one shared protocol. Instead of needing a custom Dreamlit integration, Windsurf connects to Dreamlit’s MCP server and discovers the tools Dreamlit exposes. For Dreamlit, MCP means Cascade can work with notification workflows using product-level actions:
  • Find the right workspace, project, or workflow
  • Understand Dreamlit concepts and project setup state
  • Create or update workflow drafts from plain-English prompts
  • Return preview links so you can inspect the result in Dreamlit
  • Prepare publishing and ask for explicit confirmation before anything goes live
Learn more in the official Model Context Protocol documentation.

What can Dreamlit MCP do?

Dreamlit MCP is focused on workflow authoring and safe workflow operations. It is not a low-level database API.

Prerequisites

Before connecting Windsurf:
  • Create a Dreamlit account at app.dreamlit.ai.
  • Finish workspace and project setup in Dreamlit.
  • Connect a Supabase or Postgres database.
  • Configure any channels the workflows will need, such as email domains, Brand Styles, or Slack.
  • Confirm Windsurf supports remote MCP over Streamable HTTP, or can send MCP requests through an HTTP bridge.
Dreamlit MCP works against existing Dreamlit workspaces and projects. If Windsurf says setup is required, open the Dreamlit link it returns and finish setup in the web app before reconnecting.

How does authorization work?

OAuth is the best option when Windsurf supports remote server authentication. Windsurf connects to Dreamlit, Dreamlit opens a browser authorization screen, and you approve access to one Dreamlit workspace.
1

Add Dreamlit MCP

Use the server URL:
2

Approve Dreamlit access

Windsurf should open a Dreamlit authorization page. Sign in, choose the workspace, review the requested scopes, and click Allow access.
3

Check status

Ask Cascade:
Check Dreamlit MCP status and list my projects.
If Windsurf only receives read access, reconnect Dreamlit and approve workflow drafting, publishing, or analytics when prompted. Dreamlit defaults empty OAuth scope requests to the supported v1 scopes.

Permissions

Dreamlit MCP uses workflow and analytics scopes. OAuth grants are scoped to a workspace. Personal access tokens are scoped to one project.

Tools

Windsurf discovers these tools from the server. Dreamlit also exposes the dreamlit://mcp/guide resource. If Windsurf supports MCP resources, it can read the guide for prompting guidance, trigger types, unsubscribe guidance, and the recommended Dreamlit MCP flow.

How do I get Dreamlit’s analysis?

Use get_lifecycle_report for Dreamlit’s prepared analysis of key metrics worth tracking, the signup-to-paid funnel and where users drop off, deliverability health, and which lifecycle stages have no emails yet: welcome, onboarding, engagement, retention, and winback. Use get_recommendations for prioritized emails or workflows to add and what to fix or change in existing ones. Both tools are available on Pro and Scale plans and require analytics:read. These reports are prepared by Dreamlit’s agents and reviewed by our team. Use get_analytics for raw notification analytics: email and Slack sends and deliveries, email opens, clicks and bounces, overview metrics, per-recipient rows and workflow run rows. Both accept an optional projectId. You can leave it out when your token is pinned to a project or your approved workspace has one accessible project.
  • If a report is ready, the tool returns state: "ready" with its Markdown body and timestamps.
  • Otherwise, it requests one and returns state: "processing". Check back later. Dreamlit also emails the original requester when it’s ready.
  • Pass refresh: true only when the user asks for a new report; when checking on a pending report, call without refresh. Refresh reuses an open request, otherwise returns the latest report if it was ready within the last 24 hours, or creates a new request. While it is being prepared, every call returns the processing state and includes the last ready report as previousReport.
  • On Free and AppSumo plans, the tool returns plan_upgrade_required with a billing link. Upgrade to Pro or Scale to use it. On Enterprise, it returns the same code with a support link; contact us to add reports to your plan.
Ask Cascade to work in this order:
1

Check status

Start with get_status. This gives Cascade Dreamlit concepts, setup state, project context, and links back to relevant Dreamlit pages.
2

Find the target

Use list_projects and list_workflows if the project or workflow is unclear.
3

Choose a Brand Style

Use list_brand_styles when you want a specific saved Brand Style applied.
4

Inspect before editing

Use get_workflow_and_preview_url before changing an existing workflow.
5

Create or update the draft

Use create_or_update_workflow with an outcome-oriented prompt. When editing, describe the steps to change by what they do, like “the email with subject Welcome back”, not by step ID.Each call continues the workflow’s current Dreamlit chat. For an unrelated change, or if Dreamlit keeps misreading the request, pass startNewChat to start fresh. The new chat still sees the current draft.When you already know the exact new value, like a new subject line, a fixed HTML body, or a corrected query, use edit_workflow_steps instead. It’s instant, uses no AI credits, and takes step IDs from get_workflow_and_preview_url.
6

Review in Dreamlit

Open the returned workflow URL to inspect the draft, preview output, and make manual adjustments if needed.
7

Test important messages

For email or Slack messages that need to look right before going live, ask Cascade to send a test through send_workflow_test. Confirm the test before it sends, then review the real message in your inbox or Slack channel.
8

Publish deliberately

Use prepare_publish first. Only call confirm_publish after you explicitly approve the prepared publish request.

How do I test a draft email or Slack message before publishing?

Use send_workflow_test to send the current draft message to yourself (or a chosen recipient) so you can review it in the real channel before going live. Tests don’t publish, schedule, or change the workflow draft.
  • Email tests default to the authenticated user’s email address. Pass testRecipientEmail to send to a different inbox.
  • Slack tests post to the channel configured for the draft message.
  • Dreamlit returns a confirmation_required response describing the message and recipient. Cascade only sends after calling send_workflow_test again with confirmSend: true.
  • If a workflow has more than one testable message, Dreamlit returns a clarification_required response listing each message by label so you can choose one.
  • Test sends count toward the same draft rate limit as workflow authoring.
Example prompt:

Prompting Dreamlit through MCP

Dreamlit works best when you describe the notification outcome, not the internal workflow graph. Good prompts include:
  • The event or schedule that should start the workflow
  • The audience or recipient
  • The message goal
  • Data needed for targeting or personalization, including email activity such as recent opens or clicks, who opened a specific broadcast, emails that failed, or people this workflow already emailed this period
  • Timing, timezone, and business rules
  • Whether unsubscribe should be enabled
  • Tone or brand notes when they matter
Examples:

Safety and control

Dreamlit MCP is designed so Cascade can help with workflows without making surprise production changes.
  • Draft changes stay draft-only until you publish.
  • Test sends require explicit confirmation and don’t publish, schedule, or edit the draft.
  • Publishing is always a separate confirmation step with a Dreamlit preview link.
  • If an action needs setup or manual review, Dreamlit sends you back to the web app.
  • Query steps are read-only against your application data.
  • Access is limited by the permissions you approve. Personal access tokens are project-scoped and can be revoked anytime.

Troubleshooting

Dreamlit authorization is required

Reconnect the MCP server and complete the browser authorization flow. If you are using a personal access token, confirm the token is still active and that Windsurf is sending it as an Authorization: Bearer ... header.

Dreamlit tools do not appear after authorization

Start a new chat or session in Windsurf. If the tools still do not appear, restart Windsurf or restart the Dreamlit MCP server entry. Windsurf can cache the MCP server and tool list for an open session.

Additional Dreamlit permission is required

The current OAuth grant or personal access token does not include the required scope. Reconnect with the requested access, or create a token with the missing scope.

Dreamlit says to choose a project

Your approved workspace has multiple projects and Cascade did not specify one. Ask Cascade to call list_projects, then retry with the right project.

Dreamlit says setup is required

Open the returned Dreamlit setup URL, finish workspace and project setup, then reconnect Windsurf.

A workflow edit returns a browser handoff

Some changes still need the Dreamlit web app. Open the returned URL, review the draft, and continue from there.

Publishing fails after a preview

The workflow may have changed since the publish preview. Ask Cascade to run prepare_publish again, review the new preview and warnings, then confirm only if it still looks right.

Tools are visible but calls time out

Workflow authoring can take longer than read-only calls because Dreamlit is planning and applying a real workflow draft. Retry once. If it keeps failing, open the returned Dreamlit URL if one is present, or contact support.

Testing with MCP Inspector

You can use the MCP Inspector to verify the server connection.
1

Start the Inspector

2

Choose Streamable HTTP

Select Streamable HTTP as the transport.
3

Enter the server URL

4

Authenticate

Use OAuth if the Inspector supports it, or add a Bearer header:
5

Confirm the connection

Use List tools and call get_status to confirm the connection.

Next steps

Quickstart

Connect your database and create your first workflow.

Workflow basics

Learn how Dreamlit workflows are structured.

Get support

Reach the team if MCP setup blocks you.

Last validated: 2026-05-07