mirror of
https://github.com/PrefectHQ/fastmcp.git
synced 2026-08-09 15:19:10 +02:00
* Update repository references from jlowin/fastmcp to prefecthq/fastmcp * Retrigger CI after repo transfer * chore: Update SDK documentation * Only run deep triage on bug issues for jlowin --------- Co-authored-by: marvin-context-protocol[bot] <225465937+marvin-context-protocol[bot]@users.noreply.github.com>
49 lines
1.6 KiB
Text
49 lines
1.6 KiB
Text
---
|
|
title: mcp_json
|
|
sidebarTitle: mcp_json
|
|
---
|
|
|
|
# `fastmcp.cli.install.mcp_json`
|
|
|
|
|
|
MCP configuration JSON generation for FastMCP install using Cyclopts.
|
|
|
|
## Functions
|
|
|
|
### `install_mcp_json` <sup><a href="https://github.com/PrefectHQ/fastmcp/blob/main/src/fastmcp/cli/install/mcp_json.py#L20" target="_blank"><Icon icon="github" style="width: 14px; height: 14px;" /></a></sup>
|
|
|
|
```python
|
|
install_mcp_json(file: Path, server_object: str | None, name: str) -> bool
|
|
```
|
|
|
|
|
|
Generate MCP configuration JSON for manual installation.
|
|
|
|
**Args:**
|
|
- `file`: Path to the server file
|
|
- `server_object`: Optional server object name (for \:object suffix)
|
|
- `name`: Name for the server in MCP config
|
|
- `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
|
|
- `copy`: If True, copy to clipboard instead of printing to stdout
|
|
- `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 generation was successful, False otherwise
|
|
|
|
|
|
### `mcp_json_command` <sup><a href="https://github.com/PrefectHQ/fastmcp/blob/main/src/fastmcp/cli/install/mcp_json.py#L98" target="_blank"><Icon icon="github" style="width: 14px; height: 14px;" /></a></sup>
|
|
|
|
```python
|
|
mcp_json_command(server_spec: str) -> None
|
|
```
|
|
|
|
|
|
Generate MCP configuration JSON for manual installation.
|
|
|
|
**Args:**
|
|
- `server_spec`: Python file to install, optionally with \:object suffix
|
|
|