Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 6 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,11 +38,15 @@ kh protocol list # Browse available protocols

## MCP Server Mode

The recommended way to connect AI assistants to KeeperHub is the remote HTTP endpoint:

```
kh serve --mcp
claude mcp add --transport http keeperhub https://app.keeperhub.com/mcp
```

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.
No local server process required. See [docs/quickstart.md](docs/quickstart.md) for full setup instructions.

The legacy `kh serve --mcp` stdio mode is still available but deprecated.

## Documentation

Expand Down
2 changes: 1 addition & 1 deletion cmd/root_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,7 @@ func TestRootCmdHelpIncludesAllCommands(t *testing.T) {
"workflow", "run", "execute", "project",
"tag", "org", "action", "protocol",
"wallet", "template", "billing", "doctor",
"version", "auth", "config", "serve", "completion", "update",
"version", "auth", "config", "completion", "update",
}
for _, cmdName := range expectedCommands {
assert.True(t, strings.Contains(helpOutput, cmdName),
Expand Down
3 changes: 2 additions & 1 deletion cmd/serve/serve.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,8 @@ All diagnostic output (warnings, errors) is written to stderr. Only
valid JSON-RPC 2.0 messages appear on stdout.`,
Example: ` # Start an MCP stdio server (for use with Claude, Cursor, etc.)
kh serve --mcp`,
Args: cobra.NoArgs,
Deprecated: "Use the remote MCP endpoint instead: claude mcp add --transport http keeperhub https://app.keeperhub.com/mcp",
Args: cobra.NoArgs,
RunE: func(cmd *cobra.Command, args []string) error {
isMCP, err := cmd.Flags().GetBool("mcp")
if err != nil {
Expand Down
7 changes: 6 additions & 1 deletion docs/kh_serve.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,12 @@

Start a server

**Deprecated:** Use the remote MCP endpoint instead:

```
claude mcp add --transport http keeperhub https://app.keeperhub.com/mcp
```

### Synopsis

Start a KeeperHub server process.
Expand Down Expand Up @@ -44,4 +50,3 @@ kh serve [flags]
### SEE ALSO

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

12 changes: 8 additions & 4 deletions docs/quickstart.md
Original file line number Diff line number Diff line change
Expand Up @@ -58,20 +58,24 @@ kh protocol list

## MCP Server Mode

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

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

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

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

**Legacy: local stdio server (deprecated):**

`kh serve --mcp` starts a local MCP stdio server. This mode is deprecated. Prefer the remote HTTP endpoint above.

## Next Steps

- [concepts.md](concepts.md) -- authentication, output formats, configuration
Expand Down
Loading