Spaces:
Running
Running
Jeremiah Lowin commited on
Change server flag to --name (#1248)
Browse files
src/fastmcp/cli/install/claude_code.py
CHANGED
|
@@ -173,7 +173,7 @@ def claude_code_command(
|
|
| 173 |
server_name: Annotated[
|
| 174 |
str | None,
|
| 175 |
cyclopts.Parameter(
|
| 176 |
-
name=["--
|
| 177 |
help="Custom name for the server in Claude Code",
|
| 178 |
),
|
| 179 |
] = None,
|
|
|
|
| 173 |
server_name: Annotated[
|
| 174 |
str | None,
|
| 175 |
cyclopts.Parameter(
|
| 176 |
+
name=["--name", "-n"],
|
| 177 |
help="Custom name for the server in Claude Code",
|
| 178 |
),
|
| 179 |
] = None,
|
src/fastmcp/cli/install/claude_desktop.py
CHANGED
|
@@ -146,7 +146,7 @@ def claude_desktop_command(
|
|
| 146 |
server_name: Annotated[
|
| 147 |
str | None,
|
| 148 |
cyclopts.Parameter(
|
| 149 |
-
name=["--
|
| 150 |
help="Custom name for the server in Claude Desktop's config",
|
| 151 |
),
|
| 152 |
] = None,
|
|
|
|
| 146 |
server_name: Annotated[
|
| 147 |
str | None,
|
| 148 |
cyclopts.Parameter(
|
| 149 |
+
name=["--name", "-n"],
|
| 150 |
help="Custom name for the server in Claude Desktop's config",
|
| 151 |
),
|
| 152 |
] = None,
|
src/fastmcp/cli/install/cursor.py
CHANGED
|
@@ -156,7 +156,7 @@ def cursor_command(
|
|
| 156 |
server_name: Annotated[
|
| 157 |
str | None,
|
| 158 |
cyclopts.Parameter(
|
| 159 |
-
name=["--
|
| 160 |
help="Custom name for the server in Cursor",
|
| 161 |
),
|
| 162 |
] = None,
|
|
|
|
| 156 |
server_name: Annotated[
|
| 157 |
str | None,
|
| 158 |
cyclopts.Parameter(
|
| 159 |
+
name=["--name", "-n"],
|
| 160 |
help="Custom name for the server in Cursor",
|
| 161 |
),
|
| 162 |
] = None,
|
tests/cli/test_install.py
CHANGED
|
@@ -37,7 +37,7 @@ class TestClaudeCodeInstall:
|
|
| 37 |
"""Test basic claude-code install command parsing."""
|
| 38 |
# Parse command with correct parameter names
|
| 39 |
command, bound, _ = install_app.parse_args(
|
| 40 |
-
["claude-code", "server.py", "--
|
| 41 |
)
|
| 42 |
|
| 43 |
# Verify parsing was successful
|
|
@@ -51,7 +51,7 @@ class TestClaudeCodeInstall:
|
|
| 51 |
[
|
| 52 |
"claude-code",
|
| 53 |
"server.py",
|
| 54 |
-
"--
|
| 55 |
"test-server",
|
| 56 |
"--with",
|
| 57 |
"package1",
|
|
@@ -93,7 +93,7 @@ class TestClaudeDesktopInstall:
|
|
| 93 |
def test_claude_desktop_basic(self):
|
| 94 |
"""Test basic claude-desktop install command parsing."""
|
| 95 |
command, bound, _ = install_app.parse_args(
|
| 96 |
-
["claude-desktop", "server.py", "--
|
| 97 |
)
|
| 98 |
|
| 99 |
assert command is not None
|
|
@@ -106,7 +106,7 @@ class TestClaudeDesktopInstall:
|
|
| 106 |
[
|
| 107 |
"claude-desktop",
|
| 108 |
"server.py",
|
| 109 |
-
"--
|
| 110 |
"test-server",
|
| 111 |
"--env",
|
| 112 |
"VAR1=value1",
|
|
@@ -145,7 +145,7 @@ class TestCursorInstall:
|
|
| 145 |
def test_cursor_basic(self):
|
| 146 |
"""Test basic cursor install command parsing."""
|
| 147 |
command, bound, _ = install_app.parse_args(
|
| 148 |
-
["cursor", "server.py", "--
|
| 149 |
)
|
| 150 |
|
| 151 |
assert command is not None
|
|
@@ -155,7 +155,7 @@ class TestCursorInstall:
|
|
| 155 |
def test_cursor_with_options(self):
|
| 156 |
"""Test cursor install with options."""
|
| 157 |
command, bound, _ = install_app.parse_args(
|
| 158 |
-
["cursor", "server.py", "--
|
| 159 |
)
|
| 160 |
|
| 161 |
assert bound.arguments["server_spec"] == "server.py"
|
|
|
|
| 37 |
"""Test basic claude-code install command parsing."""
|
| 38 |
# Parse command with correct parameter names
|
| 39 |
command, bound, _ = install_app.parse_args(
|
| 40 |
+
["claude-code", "server.py", "--name", "test-server"]
|
| 41 |
)
|
| 42 |
|
| 43 |
# Verify parsing was successful
|
|
|
|
| 51 |
[
|
| 52 |
"claude-code",
|
| 53 |
"server.py",
|
| 54 |
+
"--name",
|
| 55 |
"test-server",
|
| 56 |
"--with",
|
| 57 |
"package1",
|
|
|
|
| 93 |
def test_claude_desktop_basic(self):
|
| 94 |
"""Test basic claude-desktop install command parsing."""
|
| 95 |
command, bound, _ = install_app.parse_args(
|
| 96 |
+
["claude-desktop", "server.py", "--name", "test-server"]
|
| 97 |
)
|
| 98 |
|
| 99 |
assert command is not None
|
|
|
|
| 106 |
[
|
| 107 |
"claude-desktop",
|
| 108 |
"server.py",
|
| 109 |
+
"--name",
|
| 110 |
"test-server",
|
| 111 |
"--env",
|
| 112 |
"VAR1=value1",
|
|
|
|
| 145 |
def test_cursor_basic(self):
|
| 146 |
"""Test basic cursor install command parsing."""
|
| 147 |
command, bound, _ = install_app.parse_args(
|
| 148 |
+
["cursor", "server.py", "--name", "test-server"]
|
| 149 |
)
|
| 150 |
|
| 151 |
assert command is not None
|
|
|
|
| 155 |
def test_cursor_with_options(self):
|
| 156 |
"""Test cursor install with options."""
|
| 157 |
command, bound, _ = install_app.parse_args(
|
| 158 |
+
["cursor", "server.py", "--name", "test-server"]
|
| 159 |
)
|
| 160 |
|
| 161 |
assert bound.arguments["server_spec"] == "server.py"
|