Spaces:
Running
Running
| --- | |
| title: claude | |
| sidebarTitle: claude | |
| --- | |
| # `fastmcp.cli.claude` | |
| Claude app integration utilities. | |
| ## Functions | |
| ### `get_claude_config_path` <sup><a href="https://github.com/jlowin/fastmcp/blob/main/src/fastmcp/cli/claude.py#L14" target="_blank"><Icon icon="github" style="width: 14px; height: 14px;" /></a></sup> | |
| ```python | |
| get_claude_config_path() -> Path | None | |
| ``` | |
| Get the Claude config directory based on platform. | |
| ### `update_claude_config` <sup><a href="https://github.com/jlowin/fastmcp/blob/main/src/fastmcp/cli/claude.py#L32" target="_blank"><Icon icon="github" style="width: 14px; height: 14px;" /></a></sup> | |
| ```python | |
| update_claude_config(file_spec: str, server_name: str) -> bool | |
| ``` | |
| Add or update a FastMCP server in Claude's configuration. | |
| **Args:** | |
| - `file_spec`: Path to the server file, optionally with \:object suffix | |
| - `server_name`: Name for the server in Claude's config | |
| - `with_editable`: Optional directory to install in editable mode | |
| - `with_packages`: Optional list of additional packages to install | |
| - `env_vars`: Optional dictionary of environment variables. These are merged with | |
| any existing variables, with new values taking precedence. | |
| **Raises:** | |
| - `RuntimeError`: If Claude Desktop's config directory is not found, indicating | |
| Claude Desktop may not be installed or properly set up. | |