Skip to main content

MCP server that reads existing Copilot summaries aloud via Windows SAPI with voice fallback.

Project description

MCP TTS Copilot Summary

Python MCP server for Windows text-to-speech that reads existing Copilot summaries using SAPI voice fallback.

Behavior Summary

  • Exposes two MCP tools:
    • speak_text
    • speak_existing_summary
  • Consumes already-prepared summary text (no extra summarization pipeline).
  • Trigger strategy is MCP-only and instruction-driven.
  • Voice fallback policy:
    1. Use Zira if available.
    2. Else use first available SAPI voice.
    3. If no SAPI voice is available, return non-fatal skipped with warning.
  • Speech call behavior is non-blocking by default (MCP_TTS_SUMMARY_ASYNC_SPEECH=true), so Copilot can continue responding immediately.

Install

pip

python -m pip install -e .

uv

uv pip install -e .

Run

python -m mcp_tts_copilot_summary.main

Uses stdio transport.

Configuration

Environment variables:

  • MCP_TTS_SUMMARY_ENABLED (default: true)
  • MCP_TTS_SUMMARY_MIN_PARAGRAPHS (default: 4)
  • MCP_TTS_SUMMARY_MIN_NEW_CODE_LINES (default: 100)
  • MCP_TTS_SUMMARY_RATE (default: 0)
  • MCP_TTS_SUMMARY_VOLUME (default: 100)
  • MCP_TTS_SUMMARY_ASYNC_SPEECH (default: true)

Guard criteria used by tools:

  • Speak only when paragraph_count > 4 OR new_code_lines > 100.
  • If metadata is not provided, tools proceed unless disabled.

VS Code MCP Registration (Example)

See examples/mcp.json for a complete sample. If mcp-tts-copilot-summary is not on PATH, prefer launching with python -m mcp_tts_copilot_summary.main.

For this workspace on Windows, use:

{
  "mcpServers": {
    "tts-copilot-summary": {
      "command": "python",
      "args": ["-m", "mcp_tts_copilot_summary.main"],
      "env": {
        "MCP_TTS_SUMMARY_ENABLED": "true",
        "MCP_TTS_SUMMARY_MIN_PARAGRAPHS": "4",
        "MCP_TTS_SUMMARY_MIN_NEW_CODE_LINES": "100",
        "MCP_TTS_SUMMARY_RATE": "0",
        "MCP_TTS_SUMMARY_VOLUME": "100"
      }
    }
  }
}

This same config is also available at:

  • examples/mcp.json
  • .vscode/mcp.json

Agent Instruction Snippet

Use this policy in your agent instructions:

Call `speak_existing_summary` (or `speak_text`) only when:
- response has more than 4 paragraphs, OR
- response introduces more than 100 new code lines.

Pass existing summary text directly as `summary_text`.
Do not generate a second summary for TTS.

Also see examples/agent-instruction.md.

Verification

python -m pip install -e .
pytest -q

Publish to PyPI

This package is ready for both pip and uv once published on PyPI.

  1. Create a GitHub repository and push this project.
  2. In GitHub repository settings, configure trusted publishing for PyPI.
  3. The workflow at .github/workflows/publish.yml builds and attempts publish automatically on every push to main (including merges), on release publish, and on manual dispatch.
  4. For an actual new upload to PyPI, bump version in pyproject.toml before pushing. If the version already exists, publish is safely skipped.

After publication, installation works globally with either tool:

python -m pip install mcp-tts-copilot-summary
uv pip install mcp-tts-copilot-summary

Manual checks:

  1. Start MCP server and run tools/list.
  2. Confirm speak_text and speak_existing_summary are listed.
  3. Invoke either tool with sample summary text.
  4. Confirm Zira is used when available, otherwise first SAPI voice, otherwise skipped warning.

Copy-Ready Smoke Calls

Expected to speak:

{
  "summary_text": "This is a test summary for speech output.",
  "paragraph_count": 5,
  "new_code_lines": 0
}

Expected to skip (threshold not met):

{
  "summary_text": "Short summary.",
  "paragraph_count": 2,
  "new_code_lines": 10
}

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

mcp_tts_copilot_summary-0.1.1.tar.gz (6.6 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

mcp_tts_copilot_summary-0.1.1-py3-none-any.whl (7.1 kB view details)

Uploaded Python 3

File details

Details for the file mcp_tts_copilot_summary-0.1.1.tar.gz.

File metadata

  • Download URL: mcp_tts_copilot_summary-0.1.1.tar.gz
  • Upload date:
  • Size: 6.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for mcp_tts_copilot_summary-0.1.1.tar.gz
Algorithm Hash digest
SHA256 9ce9c09acfbfb7b18ff86c293669a8012ec37b02a84d01bcf8f4da0a0bfdbcc4
MD5 ac94c282440e94cad0633cea415de8f9
BLAKE2b-256 9c4767e5efd1bf4b90f4d86305a8aabbf39c00181ea8c3905c66b022184b58d8

See more details on using hashes here.

Provenance

The following attestation bundles were made for mcp_tts_copilot_summary-0.1.1.tar.gz:

Publisher: publish.yml on ArneTillmann/mcp-tts-copilot-summary

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file mcp_tts_copilot_summary-0.1.1-py3-none-any.whl.

File metadata

File hashes

Hashes for mcp_tts_copilot_summary-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 136ea2073ec97fa7cdfba4fc67baaecca1bb72b1fd2709d84dc99af61e258c84
MD5 45006fa7d53a227f706cbc58251a437c
BLAKE2b-256 898d756c615f6f0188cdd5ee33456a1ec17be10e00b8bf159088fae858cdf3c3

See more details on using hashes here.

Provenance

The following attestation bundles were made for mcp_tts_copilot_summary-0.1.1-py3-none-any.whl:

Publisher: publish.yml on ArneTillmann/mcp-tts-copilot-summary

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page