-
Notifications
You must be signed in to change notification settings - Fork 90
docs: Cover MCP setup in the 4.0 migration guide #666
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
|
|
@@ -141,15 +141,50 @@ The first run compiles the native build hooks (this can take about 30 seconds) a | |||||
|
|
||||||
| Beyond the server, `serverpod start` also launches the project's Flutter app. By default it uses Flutter's `web-server` device and opens your browser. Pass `--flutter-device <name>` to target a specific device. For IDE debugging, projects scaffolded with 3.5 include a `launch.json` that runs `serverpod start` with the debugger attached; you can copy that file into your existing project from a fresh 3.5 scaffold if you want the same setup. | ||||||
|
|
||||||
| ## Add the agent skills (optional) | ||||||
| ## Set up the agent workflow (optional) | ||||||
|
|
||||||
| Version 3.5 ships AI agent skills (for editors like Claude Code and Cursor) and an MCP server. Install them with: | ||||||
| Version 3.5 ships AI agent skills and MCP servers (for editors like Claude Code and Cursor) that let your agent build, run, and inspect your server. A new project configures these during `serverpod create`, so the smoothest way to add the same setup to your upgraded project is to run the same command against the current directory. From the project's root folder, run: | ||||||
|
|
||||||
| ```bash | ||||||
| $ serverpod create . | ||||||
| ``` | ||||||
|
|
||||||
| Serverpod detects the existing project and adds the missing pieces without touching your source code. It registers the **Serverpod** and **Dart** MCP servers and installs the agent skills for the editor you select. The registration is written to `.mcp.json`, along with editor-specific files (`.cursor/mcp.json` and `.vscode/mcp.json`) in each editor's own format. The `.mcp.json` file looks like this: | ||||||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Suggestion:
Suggested change
|
||||||
|
|
||||||
| ```json | ||||||
| { | ||||||
| "mcpServers": { | ||||||
| "serverpod": { | ||||||
| "command": "serverpod", | ||||||
| "args": ["mcp-server", "--server-dir", "<project>_server"] | ||||||
| }, | ||||||
| "dart": { | ||||||
| "command": "dart", | ||||||
| "args": ["mcp-server"] | ||||||
| } | ||||||
| } | ||||||
| } | ||||||
| ``` | ||||||
|
|
||||||
| VS Code's `.vscode/mcp.json` registers the same two servers but nests them under a `servers` key instead of `mcpServers`. | ||||||
|
|
||||||
| :::warning | ||||||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Suggestion: this warning to commit your work sits below the |
||||||
|
|
||||||
| Configuration files you created manually can be overwritten, so commit your work before running the command. | ||||||
|
|
||||||
| ::: | ||||||
|
|
||||||
| If you are using Cursor, enable the **Serverpod** and **Dart** MCP servers in your project settings (_Cursor Settings_ > _Tools & MCPs_). | ||||||
|
|
||||||
| ### Install the skills without the MCP setup | ||||||
|
|
||||||
| If you already have the MCP servers configured and only want to install or refresh the agent skills, install the skills tool: | ||||||
|
|
||||||
| ```bash | ||||||
| $ dart install skills | ||||||
| ``` | ||||||
|
|
||||||
| From your project's root folder, install the skills for your editor: | ||||||
| Then, from your project's root folder, pull the skills for your editor: | ||||||
|
|
||||||
| ```bash | ||||||
| $ skills get --ide cursor | ||||||
|
|
@@ -167,7 +202,7 @@ Copy the updated Dockerfile from the [3.5 framework template](https://github.com | |||||
|
|
||||||
| - **`serverpod start` TUI**: hot reload on save, **R** to hot restart, **M** to create a migration, **A** to apply migrations, **P** to apply a repair migration. | ||||||
| - **Flutter app spawning** from `serverpod start` so the Flutter app runs alongside the server in the same TUI. | ||||||
| - **AI agent skills and MCP server** scaffolded during `serverpod create`; existing projects opt in with `dart install skills` and `skills get`. | ||||||
| - **AI agent skills and MCP servers** scaffolded during `serverpod create`; existing projects opt in by running `serverpod create .`. | ||||||
| - **Embedded Postgres**: zero-Docker development via `dataPath`. | ||||||
| - **SQLite database support** as an alternative dialect to Postgres. | ||||||
| - **Client-side database generation** for the Flutter app. | ||||||
|
|
@@ -185,9 +220,9 @@ Copy the updated Dockerfile from the [3.5 framework template](https://github.com | |||||
|
|
||||||
| Running more than one Serverpod server on the same machine can conflict on the default ports (8080 for the main server, 8090 for the database). This is a long-standing limitation, not specific to `serverpod start`. Stop the other server, or run on different ports. | ||||||
|
|
||||||
| ### Agent skills aren't picked up after install | ||||||
| ### Agent skills or MCP servers aren't picked up after setup | ||||||
|
|
||||||
| Run `skills get` again from the project's root folder. Some editors, like Cursor, require enabling the MCP server in their settings. | ||||||
| Run `serverpod create .` again from the project's root folder. Some editors, like Cursor, require enabling the **Serverpod** and **Dart** MCP servers in their settings (_Cursor Settings_ > _Tools & MCPs_). | ||||||
|
|
||||||
| ## Still stuck? | ||||||
|
|
||||||
|
|
||||||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Comment (pre-existing, outside this diff): two stale lines worth a quick fix while this file is open. This line mentions
--flutter-device <name>, which is not a realserverpod startflag (only--flutter/--no-flutterexist). And line 25 pinsdart install serverpod_cli 3.5.0-beta.9, while the latest 3.5 beta isbeta.12. Up to you whether to fold these in here or leave them for a follow-up.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
is it not 4.0.0-beta.0 ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh, yeah it should be 4.0.0-beta.0