Skip to content

Commit 2284e85

Browse files
committed
docs: add study-speak MCP server docs, fix agent MCP configs, expand voice guide
- Add study-speak section to agents/mcp/README.md - Add MCP server setup, available voices, config details to voice-output.md - Fix all agent mcp.json files: replace non-existent speak-mcp with uvx approach - Fix mcp_speak.py timeout: 30s → 120s to match standalone server
1 parent 5cfdf74 commit 2284e85

9 files changed

Lines changed: 137 additions & 3 deletions

File tree

‎.secrets.baseline‎

Lines changed: 6 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

‎agents/amp/mcp.json‎

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
{
2+
"mcpServers": {
3+
"speaker": {
4+
"command": "uvx",
5+
"args": ["--from", "mcp[cli]", "mcp", "run", "/Users/ataylor/code/personal/tools/socratic-study-mentor/agents/mcp/study-speak-server.py"]
6+
}
7+
}
8+
}

‎agents/claude/mcp.json‎

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
{
2+
"mcpServers": {
3+
"speaker": {
4+
"command": "uvx",
5+
"args": ["--from", "mcp[cli]", "mcp", "run", "/Users/ataylor/code/personal/tools/socratic-study-mentor/agents/mcp/study-speak-server.py"]
6+
}
7+
}
8+
}

‎agents/crush/crush.json‎

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
{
2+
"$schema": "https://charm.land/crush.json",
3+
"mcp": {
4+
"speaker": {
5+
"type": "stdio",
6+
"command": "uvx",
7+
"args": ["--from", "mcp[cli]", "mcp", "run", "/Users/ataylor/code/personal/tools/socratic-study-mentor/agents/mcp/study-speak-server.py"],
8+
"timeout": 120
9+
}
10+
}
11+
}

‎agents/gemini/mcp.json‎

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
{
2+
"mcpServers": {
3+
"speaker": {
4+
"command": "uvx",
5+
"args": ["--from", "mcp[cli]", "mcp", "run", "/Users/ataylor/code/personal/tools/socratic-study-mentor/agents/mcp/study-speak-server.py"]
6+
}
7+
}
8+
}

‎agents/mcp/README.md‎

Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,56 @@
22

33
Optional MCP (Model Context Protocol) servers that enhance the study mentor experience.
44

5+
## Study-Speak TTS
6+
7+
Speak agent responses aloud using local TTS. Wraps the `study-speak` CLI as an MCP tool.
8+
9+
**Install the TTS package:**
10+
```bash
11+
uv tool install "./packages/agent-session-tools[tts]" --force
12+
```
13+
14+
**Agent configs** — each agent's `mcp.json` already references the speaker server. To use it manually:
15+
16+
=== "Kiro CLI"
17+
18+
The Kiro agent config (`agents/kiro/study-mentor.json`) includes the MCP server automatically. It runs:
19+
```bash
20+
uvx --from "mcp[cli]" mcp run agents/mcp/study-speak-server.py
21+
```
22+
23+
=== "Claude Code / Gemini / OpenCode / Amp"
24+
25+
Add to your MCP config (see agent-specific paths below):
26+
```json
27+
{
28+
"mcpServers": {
29+
"speaker": {
30+
"command": "uvx",
31+
"args": ["--from", "mcp[cli]", "mcp", "run", "/path/to/socratic-study-mentor/agents/mcp/study-speak-server.py"]
32+
}
33+
}
34+
}
35+
```
36+
37+
**Configuration** — `~/.config/studyctl/config.yaml`:
38+
39+
```yaml
40+
tts:
41+
backend: kokoro # kokoro | qwen3 | macos
42+
voice: am_michael # kokoro voices: am_michael, af_heart, bf_emma, etc.
43+
speed: 1.0 # 0.5 = slow, 1.0 = normal, 1.5 = fast, 2.0 = very fast
44+
macos_voice: Samantha # fallback voice for macOS say
45+
```
46+
47+
**Toggle during a session:**
48+
49+
- Kiro: `@speak-start` / `@speak-stop`
50+
- Claude Code: `/speak-start` / `/speak-stop`
51+
- Others: `@speak-start` / `@speak-stop`
52+
53+
See [Voice Output Guide](../voice-output.md) for full details, backend comparison, and troubleshooting.
54+
555
## Apple Calendar & Reminders (macOS only)
656

757
Native calendar time-blocking and reminder notifications.

‎agents/opencode/mcp.json‎

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
{
2+
"mcpServers": {
3+
"speaker": {
4+
"command": "uvx",
5+
"args": ["--from", "mcp[cli]", "mcp", "run", "/Users/ataylor/code/personal/tools/socratic-study-mentor/agents/mcp/study-speak-server.py"]
6+
}
7+
}
8+
}

‎docs/voice-output.md‎

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -79,6 +79,43 @@ tts:
7979
macos_voice: Samantha # fallback voice for macOS say
8080
```
8181
82+
### Available Kokoro Voices
83+
84+
| Voice | Description |
85+
|-------|-------------|
86+
| `am_michael` | American male (default) |
87+
| `af_heart` | American female |
88+
| `bf_emma` | British female |
89+
90+
Pass any kokoro voice name with `-v` or set in config. See [kokoro-onnx voices](https://github.com/thewh1teagle/kokoro-onnx#voices) for the full list.
91+
92+
---
93+
94+
## MCP Server Setup
95+
96+
The study-speak MCP server lets AI agents call the TTS tool directly. The standalone server lives at `agents/mcp/study-speak-server.py`.
97+
98+
### Kiro CLI
99+
100+
Configured automatically via `agents/kiro/study-mentor.json`. No manual setup needed — the install script handles it.
101+
102+
### Claude Code / Gemini / OpenCode / Amp
103+
104+
Each agent has an `mcp.json` in its `agents/` directory. The server command uses `uvx` to run the standalone MCP server:
105+
106+
```json
107+
{
108+
"mcpServers": {
109+
"speaker": {
110+
"command": "uvx",
111+
"args": ["--from", "mcp[cli]", "mcp", "run", "/absolute/path/to/agents/mcp/study-speak-server.py"]
112+
}
113+
}
114+
}
115+
```
116+
117+
Replace the path with your actual clone location. The `scripts/install-agents.sh` script sets this up automatically for detected AI tools.
118+
82119
---
83120

84121
## CLI Reference

‎packages/agent-session-tools/src/agent_session_tools/mcp_speak.py‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ def speak(text: str) -> str:
1616
"""Speak text aloud using TTS. Use for Socratic questions when voice is enabled (@speak-start)."""
1717
try:
1818
subprocess.run(
19-
[str(_SPEAK_BIN), text], check=True, timeout=30, capture_output=True
19+
[str(_SPEAK_BIN), text], check=True, timeout=120, capture_output=True
2020
)
2121
return f"🔊 Spoke: {text}"
2222
except (

0 commit comments

Comments
 (0)