Something went wrong. Try again.
mirror of github.com/PrefectHQ/fastmcp
Something went wrong. Try again.
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108---title: cursorsidebarTitle: cursor---
# `fastmcp.cli.install.cursor`
Cursor integration for FastMCP install using Cyclopts.
## Functions
### `generate_cursor_deeplink` <sup><a href="https://github.com/PrefectHQ/fastmcp/blob/main/src/fastmcp/cli/install/cursor.py#L22" target="_blank"><Icon icon="github" style="width: 14px; height: 14px;" /></a></sup>
```pythongenerate_cursor_deeplink(server_name: str, server_config: StdioMCPServer) -> str```
Generate a Cursor deeplink for installing the MCP server.
**Args:**- `server_name`: Name of the server- `server_config`: Server configuration
**Returns:**- Deeplink URL that can be clicked to install the server
### `open_deeplink` <sup><a href="https://github.com/PrefectHQ/fastmcp/blob/main/src/fastmcp/cli/install/cursor.py#L47" target="_blank"><Icon icon="github" style="width: 14px; height: 14px;" /></a></sup>
```pythonopen_deeplink(deeplink: str) -> bool```
Attempt to open a Cursor deeplink URL using the system's default handler.
**Args:**- `deeplink`: The deeplink URL to open
**Returns:**- True if the command succeeded, False otherwise
### `install_cursor_workspace` <sup><a href="https://github.com/PrefectHQ/fastmcp/blob/main/src/fastmcp/cli/install/cursor.py#L59" target="_blank"><Icon icon="github" style="width: 14px; height: 14px;" /></a></sup>
```pythoninstall_cursor_workspace(file: Path, server_object: str | None, name: str, workspace_path: Path) -> bool```
Install FastMCP server to workspace-specific Cursor configuration.
**Args:**- `file`: Path to the server file- `server_object`: Optional server object name (for \:object suffix)- `name`: Name for the server in Cursor- `workspace_path`: Path to the workspace directory- `with_editable`: Optional list of directories to install in editable mode- `with_packages`: Optional list of additional packages to install- `env_vars`: Optional dictionary of environment variables- `python_version`: Optional Python version to use- `with_requirements`: Optional requirements file to install from- `project`: Optional project directory to run within
**Returns:**- True if installation was successful, False otherwise
### `install_cursor` <sup><a href="https://github.com/PrefectHQ/fastmcp/blob/main/src/fastmcp/cli/install/cursor.py#L143" target="_blank"><Icon icon="github" style="width: 14px; height: 14px;" /></a></sup>
```pythoninstall_cursor(file: Path, server_object: str | None, name: str) -> bool```
Install FastMCP server in Cursor.
**Args:**- `file`: Path to the server file- `server_object`: Optional server object name (for \:object suffix)- `name`: Name for the server in Cursor- `with_editable`: Optional list of directories to install in editable mode- `with_packages`: Optional list of additional packages to install- `env_vars`: Optional dictionary of environment variables- `python_version`: Optional Python version to use- `with_requirements`: Optional requirements file to install from- `project`: Optional project directory to run within- `workspace`: Optional workspace directory for project-specific installation
**Returns:**- True if installation was successful, False otherwise
### `cursor_command` <sup><a href="https://github.com/PrefectHQ/fastmcp/blob/main/src/fastmcp/cli/install/cursor.py#L228" target="_blank"><Icon icon="github" style="width: 14px; height: 14px;" /></a></sup>
```pythoncursor_command(server_spec: str) -> None```
Install an MCP server in Cursor.
**Args:**- `server_spec`: Python file to install, optionally with \:object suffix