This integration focuses on running local FastMCP server files with STDIO transport. For remote servers running with HTTP or SSE transport, use your client's native configuration - FastMCP's integrations focus on simplifying the complex local setup with dependencies and
uv
commands.Requirements
This integration uses STDIO transport to run your FastMCP server locally. For remote deployments, you can run your FastMCP server with HTTP or SSE transport and configure it directly in Cursor’s settings.Create a Server
The examples in this guide will use the following simple dice-rolling server, saved asserver.py
.
server.py
Install the Server
FastMCP CLI
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.
Workspace Installation
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:

Dependencies
FastMCP offers multiple ways to manage dependencies for your Cursor servers: Individual packages: Use the--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):
fastmcp.json
Python Version and Project Configuration
Control your server’s Python environment with these options: Python version: Use--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:
Environment Variables
Cursor runs servers in a completely isolated environment with no access to your shell environment or locally installed applications. You must explicitly pass any environment variables your server needs.
.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.Generate MCP JSON
Use the first-class integration above for the best experience. The MCP JSON generation is useful for advanced use cases, manual configuration, or integration with other tools.
mcpServers
configuration format that can be used with any MCP-compatible client.
Manual Configuration
For more control over the configuration, you can manually edit Cursor’s configuration file. The configuration file is located at:- All platforms:
~/.cursor/mcp.json
mcpServers
key, which contains the configuration for each MCP server.
Dependencies
If your server has dependencies, you can useuv
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.Environment Variables
You can also specify environment variables in the configuration:Cursor runs servers in a completely isolated environment with no access to your shell environment or locally installed applications. You must explicitly pass any environment variables your server needs.
Using the Server
Once your server is installed, you can start using your FastMCP server with Cursor’s AI assistant. Try asking Cursor something like:“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.