Skip to content

Commit 568205b

Browse files
committed
docs(mcp): add a quick install section for claude mcp add
- one claude mcp add command with the env block inline - note on quoting osw[mcp] and on Windows paths - scope flags, and how to list, inspect and remove the entry
1 parent 7d77397 commit 568205b

1 file changed

Lines changed: 28 additions & 0 deletions

File tree

‎docs/cli-and-mcp.md‎

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -104,6 +104,34 @@ instance for its whole lifetime; there is no tool to switch at runtime.
104104
`.env` file that entry names. Without it the server refuses to start rather than
105105
register tools that would all fail.
106106

107+
### Quick install
108+
109+
For Claude Code, one command registers the server. Replace the domain and the
110+
credential file path with your own:
111+
112+
```bash
113+
claude mcp add osw \
114+
-e OSW_DOMAIN=wiki-dev.open-semantic-lab.org \
115+
-e OSW_CRED_FILEPATH=/abs/path/to/accounts.pwd.yaml \
116+
-- uvx --from "osw[mcp]" osw-mcp
117+
```
118+
119+
Quote `osw[mcp]`, otherwise the shell tries to expand the square brackets. On
120+
Windows, write the path with forward slashes.
121+
122+
Everything after `--` is the command Claude Code runs. `uvx` downloads and
123+
starts the server without installing it first. If osw is already installed in
124+
an environment, use that environment's `osw-mcp` instead of the `uvx` line.
125+
126+
The entry is written for the current project only. Pass `-s user` to make it
127+
available in every project, or `-s project` to write it to a `.mcp.json` that
128+
is committed with the repository. With `-s project`, keep to `OSW_CRED_FILEPATH`
129+
and never put `OSW_PASSWORD` in the `env` block.
130+
131+
Check the result with `claude mcp list` or `claude mcp get osw`, and remove the
132+
entry again with `claude mcp remove osw`. The next section explains what the
133+
entry contains, and how to point it at a `.env` file instead.
134+
107135
### Registering a server
108136

109137
A server entry can carry its settings in two ways:

0 commit comments

Comments
 (0)