Skip to content

Commit e303637

Browse files
authored
Merge pull request #40 from KeeperHub/chore/deprecate-serve-mcp
chore: deprecate kh serve --mcp in favor of remote HTTP MCP
2 parents 83356c4 + 569df59 commit e303637

5 files changed

Lines changed: 23 additions & 9 deletions

File tree

README.md

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,11 +38,15 @@ kh protocol list # Browse available protocols
3838

3939
## MCP Server Mode
4040

41+
The recommended way to connect AI assistants to KeeperHub is the remote HTTP endpoint:
42+
4143
```
42-
kh serve --mcp
44+
claude mcp add --transport http keeperhub https://app.keeperhub.com/mcp
4345
```
4446

45-
Starts an MCP server that exposes KeeperHub actions as tools to AI assistants such as Claude Desktop. See [docs/quickstart.md](docs/quickstart.md) for setup instructions.
47+
No local server process required. See [docs/quickstart.md](docs/quickstart.md) for full setup instructions.
48+
49+
The legacy `kh serve --mcp` stdio mode is still available but deprecated.
4650

4751
## Documentation
4852

cmd/root_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -154,7 +154,7 @@ func TestRootCmdHelpIncludesAllCommands(t *testing.T) {
154154
"workflow", "run", "execute", "project",
155155
"tag", "org", "action", "protocol",
156156
"wallet", "template", "billing", "doctor",
157-
"version", "auth", "config", "serve", "completion", "update",
157+
"version", "auth", "config", "completion", "update",
158158
}
159159
for _, cmdName := range expectedCommands {
160160
assert.True(t, strings.Contains(helpOutput, cmdName),

cmd/serve/serve.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,8 @@ All diagnostic output (warnings, errors) is written to stderr. Only
2424
valid JSON-RPC 2.0 messages appear on stdout.`,
2525
Example: ` # Start an MCP stdio server (for use with Claude, Cursor, etc.)
2626
kh serve --mcp`,
27-
Args: cobra.NoArgs,
27+
Deprecated: "Use the remote MCP endpoint instead: claude mcp add --transport http keeperhub https://app.keeperhub.com/mcp",
28+
Args: cobra.NoArgs,
2829
RunE: func(cmd *cobra.Command, args []string) error {
2930
isMCP, err := cmd.Flags().GetBool("mcp")
3031
if err != nil {

docs/kh_serve.md

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,12 @@
22

33
Start a server
44

5+
**Deprecated:** Use the remote MCP endpoint instead:
6+
7+
```
8+
claude mcp add --transport http keeperhub https://app.keeperhub.com/mcp
9+
```
10+
511
### Synopsis
612

713
Start a KeeperHub server process.
@@ -44,4 +50,3 @@ kh serve [flags]
4450
### SEE ALSO
4551

4652
* [kh](kh.md) - KeeperHub CLI
47-

docs/quickstart.md

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -58,20 +58,24 @@ kh protocol list
5858

5959
## MCP Server Mode
6060

61-
The CLI can act as an [MCP](https://modelcontextprotocol.io) server, exposing KeeperHub actions as tools to AI assistants.
61+
KeeperHub exposes its actions as tools to AI assistants via the [Model Context Protocol](https://modelcontextprotocol.io).
6262

63-
**Start the MCP server:**
63+
**Recommended: remote HTTP endpoint (no local server required):**
6464
```
65-
kh serve --mcp
65+
claude mcp add --transport http keeperhub https://app.keeperhub.com/mcp
6666
```
6767

6868
**Add to Claude Desktop** (`~/Library/Application Support/Claude/claude_desktop_config.json`):
6969
```json
70-
{ "mcpServers": { "keeperhub": { "command": "kh", "args": ["serve", "--mcp"] } } }
70+
{ "mcpServers": { "keeperhub": { "type": "http", "url": "https://app.keeperhub.com/mcp" } } }
7171
```
7272

7373
Restart Claude Desktop. KeeperHub tools will appear in the tool list.
7474

75+
**Legacy: local stdio server (deprecated):**
76+
77+
`kh serve --mcp` starts a local MCP stdio server. This mode is deprecated. Prefer the remote HTTP endpoint above.
78+
7579
## Next Steps
7680

7781
- [concepts.md](concepts.md) -- authentication, output formats, configuration

0 commit comments

Comments
 (0)