Install and use FastMCP servers in Cursor
uv
commands.server.py
.
New in version: 2.10.3
The easiest way to install a FastMCP server in Cursor is using the fastmcp install cursor
command. This automatically handles the configuration, dependency management, and opens Cursor with a deeplink to install the server.
New in version: 2.12.0
By default, FastMCP installs servers globally for Cursor. You can also install servers to project-specific workspaces using the --workspace
flag:
.cursor/mcp.json
configuration file in the specified workspace directory, allowing different projects to have their own MCP server configurations.
The install command supports the same file.py:object
notation as the run
command. If no object is specified, it will automatically look for a FastMCP server object named mcp
, server
, or app
in your file:
uv
, which is expected as this is a Python STDIO server. Click “Install” to confirm:
--with
flag to specify packages your server needs. You can use this flag multiple times:
requirements.txt
file, use --with-requirements
to install all dependencies at once:
--with-editable
to install them in editable mode:
fastmcp.json
configuration file (recommended):
--python
to specify which Python version your server should use. This is essential when your server requires specific Python features:
--project
to run your server within a specific project context. This ensures uv
discovers all project configuration files and uses the correct virtual environment:
.env
file:
uv
must be installed and available in your system PATH. Cursor runs in its own isolated environment and needs uv
to manage dependencies.mcpServers
configuration format that can be used with any MCP-compatible client.
~/.cursor/mcp.json
mcpServers
key, which contains the configuration for each MCP server.
uv
or another package manager to set up the environment.
When manually configuring dependencies, the recommended approach is to use uv
with FastMCP. The configuration should use uv run
to create an isolated environment with your specified packages:
uv
must be installed and available in your system PATH. Cursor runs in its own isolated environment and needs uv
to manage dependencies.“Roll some dice for me”Cursor will automatically detect your
roll_dice
tool and use it to fulfill your request, returning something like:
🎲 Here are your dice rolls: 4, 6, 4 You rolled 3 dice with a total of 14! The 6 was a nice high roll there!The AI assistant can now access all the tools, resources, and prompts you’ve defined in your FastMCP server.