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.
Cursor supports MCP servers through multiple transport methods including STDIO, SSE, and Streamable HTTP, allowing you to extend Cursor’s AI assistant with custom tools, resources, and prompts from your FastMCP servers.
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.
New in version 2.10.3The 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.0By default, FastMCP installs servers globally for Cursor. You can also install servers to project-specific workspaces using the --workspace flag:
Copy
# Install to current directory's .cursor/ folderfastmcp install cursor server.py --workspace .# Install to specific workspacefastmcp install cursor server.py --workspace /path/to/project
This creates a .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:
Copy
# These are equivalent if your server object is named 'mcp'fastmcp install cursor server.pyfastmcp install cursor server.py:mcp# Use explicit object name if your server has a different namefastmcp install cursor server.py:my_custom_server
After running the command, Cursor will open automatically and prompt you to install the server. The command will be uv, which is expected as this is a Python STDIO server. Click “Install” to confirm:
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:
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:
Copy
fastmcp install cursor server.py --python 3.11
Project directory: Use --project to run your server within a specific project context. This ensures uv discovers all project configuration files and uses the correct virtual environment:
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.
If your server needs environment variables (like API keys), you must include them:
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.
You can generate MCP JSON configuration for manual use:
Copy
# Generate configuration and output to stdoutfastmcp install mcp-json server.py --server-name "Dice Roller" --with pandas# Copy configuration to clipboard for easy pastingfastmcp install mcp-json server.py --server-name "Dice Roller" --copy
This generates the standard mcpServers configuration format that can be used with any MCP-compatible client.
If your server has dependencies, you can use 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:
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.