Skip to content

Commit 9a1786c

Browse files
committed
fix: add reliable local Inspector launcher
1 parent 8c2d64d commit 9a1786c

2 files changed

Lines changed: 32 additions & 0 deletions

File tree

README.md

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,19 @@ uv run vocagateway-mcp
4343
destination before it opens an audio file. The server does not log bearer tokens,
4444
audio bytes, or transcript content.
4545

46+
### Interactive Inspector test
47+
48+
With a local VocaGateway running at `127.0.0.1:8765`, launch the Inspector with
49+
the included wrapper. It loads the existing local gateway token without printing
50+
it and avoids relying on an editable-package console-script wrapper:
51+
52+
```sh
53+
npx @modelcontextprotocol/inspector bash \
54+
/absolute/path/to/vocagateway-mcp/scripts/inspect-local.sh
55+
```
56+
57+
Connect, then call `get_gateway_status`, `list_models`, and `transcribe_file`.
58+
4659
Container images use the same stdio entry point:
4760

4861
```sh

scripts/inspect-local.sh

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
#!/usr/bin/env bash
2+
set -euo pipefail
3+
4+
script_dir="$(cd -- "$(dirname -- "${BASH_SOURCE[0]}")" && pwd)"
5+
repo_dir="$(cd -- "${script_dir}/.." && pwd)"
6+
7+
export PYTHONPATH="${repo_dir}/src${PYTHONPATH:+:${PYTHONPATH}}"
8+
export VOCAGATEWAY_URL="${VOCAGATEWAY_URL:-http://127.0.0.1:8765}"
9+
10+
if [[ -z "${VOCAGATEWAY_TOKEN:-}" ]]; then
11+
token_file="${VOCAGATEWAY_TOKEN_FILE:-${HOME}/.config/vocagateway/token}"
12+
if [[ ! -r "${token_file}" ]]; then
13+
echo "VocaGateway token file is not readable: ${token_file}" >&2
14+
exit 1
15+
fi
16+
export VOCAGATEWAY_TOKEN="$(<"${token_file}")"
17+
fi
18+
19+
exec "${repo_dir}/.venv/bin/python" -m vocagateway_mcp.server

0 commit comments

Comments
 (0)