Skip to content

Commit c4b98ff

Browse files
committed
Fixes
1 parent 399f205 commit c4b98ff

File tree

2 files changed

+11
-2
lines changed

2 files changed

+11
-2
lines changed

features/mcp-server.feature

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
Feature: MCP server command
22

3+
Background:
4+
Given an empty directory
5+
And an empty {HOME} directory
6+
37
Scenario: CRUD
48

59
When I run `wp mcp server add foo "https://foo.example.com/mcp"`
@@ -18,7 +22,12 @@ Feature: MCP server command
1822
| baz | https://baz.example.com/mcp | active |
1923

2024
When I run `wp mcp server remove bar baz`
21-
And I run `wp mcp server list`
25+
Then STDOUT should contain:
26+
"""
27+
Success: Removed 2 of 2 servers.
28+
"""
29+
30+
When I run `wp mcp server list`
2231
Then STDOUT should contain:
2332
"""
2433
foo.example.com

src/McpServerCommand.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -159,7 +159,7 @@ public function remove( $args, $assoc_args ): void {
159159
WP_CLI::warning( "Server '$server' not found." );
160160
++$errors;
161161
} else {
162-
unset( $config[ $args[0] ] );
162+
unset( $config[ $server ] );
163163
++$successes;
164164
}
165165
}

0 commit comments

Comments
 (0)