my-voice-mcp
A local-first MCP server that builds compact voice profiles from writing samples, then compares, rewrites, or generates new text in that voice.
README
My Voice MCP
my-voice-mcp is a local-first MCP server that builds compact voice profiles from writing samples, then compares, rewrites, or generates new text in that voice.
The current primary workflow is a process-first formal email flow:
- create a bundled voice profile from multiple curated email samples
- rewrite existing text in that voice
- generate new text in that voice
- compare
fastversusreviewedquality modes with a fixed human review set
Current MVP surface
voice_create_profilefor legacy single-PDF profile creationvoice_create_profile_bundlefor preferred multi-sample formal email profile creationvoice_compare_textvoice_rewrite_textvoice_generate_textvoice_list_profilesvoice_get_profilevoice_delete_profilevoice_validate_source
voice_rewrite_text and voice_generate_text support:
qualityMode: "fast"qualityMode: "reviewed"
reviewed mode uses one internal draft -> critique -> revise loop when a model-backed provider is available. If the server is running in heuristic mode, it falls back to fast.
What is implemented
- TypeScript MCP server on Node 20+
stdioand Streamable HTTP transports from one codebase- bearer-token HTTP auth with optional localhost dev bypass
- local filesystem profile storage
- single-PDF heuristic profile path
- bundled
email-formalprofile path with:- at least 3 samples required
- email normalization for greetings, signatures, and reply metadata
- provenance capture
- stable versus topic-specific marker separation
- model-backed distillation with heuristic fallback
- provider adapters for:
- heuristic
- OpenAI-compatible HTTP
- Ollama
- AWS Bedrock
- evaluation harness under
evals/email-formal
Quick start
- Install dependencies
npm install --no-audit --no-fund
- Build and test
npm run build
npm test
- Run the email-formal evaluation harness
npm run eval:email-formal
This writes review artifacts to evals/email-formal/output/.
- Start the MCP server
npm run start:stdio
or
npm run start:http
HTTP endpoints:
POST /mcpGET /healthz
Provider and Endpoint Setup
This repo has three provider paths in code today:
openai-compatibleollamabedrock
That distinction matters:
openai-compatiblemeans any endpoint that accepts OpenAI-style chat completions with abaseUrl, bearer token, and model nameollamais the first-class local-model path already implemented in this repobedrockis also an explicit provider path already implemented in this repo
Support status
Implemented in code:
openai-compatibleollamabedrock
Documented compatibility candidates through the generic openai-compatible adapter:
- Gemini via Google's OpenAI compatibility endpoint
- Claude via Anthropic's OpenAI SDK compatibility endpoint
Validated on this machine:
- heuristic fallback
- local build, test, and email-formal eval harness
Not yet validated on this machine:
- live model-backed reviewed mode
- live Ollama-backed runs
- live Gemini-backed or Claude-backed compatibility runs
Generic OpenAI-compatible endpoint
Use this when your provider exposes an OpenAI-style chat completions API.
$env:MY_VOICE_PROVIDER="openai-compatible"
$env:MY_VOICE_BASE_URL="https://your-endpoint.example/v1"
$env:MY_VOICE_MODEL="your-model"
$env:MY_VOICE_API_KEY="your-token"
Gemini through the OpenAI-compatible adapter
This repo does not have a native Gemini provider. Use the existing openai-compatible adapter.
$env:MY_VOICE_PROVIDER="openai-compatible"
$env:MY_VOICE_BASE_URL="https://generativelanguage.googleapis.com/v1beta/openai/"
$env:MY_VOICE_MODEL="gemini-3.5-flash"
$env:MY_VOICE_API_KEY="<your-gemini-api-key>"
Claude through the OpenAI-compatible adapter
This repo does not have a native Claude provider. Use the existing openai-compatible adapter.
$env:MY_VOICE_PROVIDER="openai-compatible"
$env:MY_VOICE_BASE_URL="https://api.anthropic.com/v1/"
$env:MY_VOICE_MODEL="claude-sonnet-4-5"
$env:MY_VOICE_API_KEY="<your-claude-api-key>"
Anthropic describes this as an OpenAI SDK compatibility layer rather than the full native Claude API surface, so it is useful for compatibility testing but should not be documented as first-class native support in this repo.
Ollama as the first-class local runtime
Use this when you want the simplest local-model path currently supported by the repo.
$env:MY_VOICE_PROVIDER="ollama"
$env:MY_VOICE_BASE_URL="http://localhost:11434"
$env:MY_VOICE_MODEL="qwen3-coder"
Other locally hosted OpenAI-compatible servers
If you run another local server that exposes an OpenAI-style endpoint, keep the provider as openai-compatible and point MY_VOICE_BASE_URL to that local server.
$env:MY_VOICE_PROVIDER="openai-compatible"
$env:MY_VOICE_BASE_URL="http://127.0.0.1:8000/v1"
$env:MY_VOICE_MODEL="your-local-model"
$env:MY_VOICE_API_KEY="not-needed-or-local-token"
Bedrock: native provider path vs OpenAI-compatible endpoint
This repo already has a native bedrock provider path:
$env:MY_VOICE_PROVIDER="bedrock"
$env:MY_VOICE_MODEL="<bedrock-model-id>"
$env:MY_VOICE_BEDROCK_REGION="us-east-1"
Amazon Bedrock also offers OpenAI-compatible APIs. If you want to use that route instead, treat it as openai-compatible rather than bedrock:
$env:MY_VOICE_PROVIDER="openai-compatible"
$env:MY_VOICE_BASE_URL="https://bedrock-mantle.us-east-1.api.aws/v1"
$env:MY_VOICE_MODEL="<bedrock-openai-compatible-model>"
$env:MY_VOICE_API_KEY="<bedrock-api-key>"
Local LLM Setup
Recommended local path: Ollama
- Install Ollama on the machine where
my-voice-mcpwill run. - Pull a model:
ollama pull qwen3-coder
- Confirm the service is up:
curl http://localhost:11434/api/tags
- Set env vars:
$env:MY_VOICE_PROVIDER="ollama"
$env:MY_VOICE_BASE_URL="http://localhost:11434"
$env:MY_VOICE_MODEL="qwen3-coder"
- Build and start:
npm.cmd run build
node dist/index.js stdio
- Run one rewrite or generate smoke test through your MCP client.
Advanced local path: another OpenAI-compatible server
- Start your local server and confirm its OpenAI-style base URL.
- Confirm the endpoint responds:
curl http://127.0.0.1:8000/v1/models
- Set env vars:
$env:MY_VOICE_PROVIDER="openai-compatible"
$env:MY_VOICE_BASE_URL="http://127.0.0.1:8000/v1"
$env:MY_VOICE_MODEL="your-local-model"
$env:MY_VOICE_API_KEY="local-token-or-placeholder"
- Build, start, and run one smoke test through the MCP tool flow.
Environment
MY_VOICE_PROVIDER:none,ollama,openai-compatible, orbedrockMY_VOICE_MODEL: model name or IDMY_VOICE_BASE_URL: provider base URL for Ollama or OpenAI-compatible APIsMY_VOICE_API_KEY: bearer token for OpenAI-compatible providersMY_VOICE_BEDROCK_REGION: AWS region for BedrockMY_VOICE_HTTP_BEARER_TOKEN: token required for HTTP MCP accessMY_VOICE_HTTP_ALLOW_UNAUTH_LOCALHOST: allow localhost HTTP calls without a bearer tokenMY_VOICE_DATA_DIR: local profile storage directoryMY_VOICE_MAX_SOURCE_CHARS: hard character cap for extracted source textMY_VOICE_MAX_SOURCE_TOKENS: hard token estimate cap for extracted source text
Storage layout
Profiles are stored under profiles/ by default:
profiles/
index.json
<voiceId>/
extracted.txt
guide.json
guide.md
source.pdf # legacy single-PDF profiles only
bundle-sources.json # bundled profiles only
samples/ # bundled profiles only
01-<sample>.txt
02-<sample>.txt
Evaluation set
The current review harness lives in evals/email-formal/ and includes:
- 4 bundled source samples
- 3 rewrite cases
- 3 prompt-to-draft generation cases
- a human review rubric
Use this to compare fast and reviewed output before claiming process quality.
Setup guides
- Requirements and decision log: REQUIREMENTS.md
- Active checklist: TODO.md
- Step-by-step testing and MCP client setup: TESTING.md
- Future long-form fiction handoff: NOVEL_VOICE_BOOTSTRAP.md
Reference docs
- Gemini OpenAI compatibility: Google AI for Developers
- Claude OpenAI SDK compatibility: Anthropic
- Bedrock OpenAI-compatible APIs: AWS API compatibility
- Bedrock Mantle endpoint: AWS Responses API docs
Recommended Servers
playwright-mcp
A Model Context Protocol server that enables LLMs to interact with web pages through structured accessibility snapshots without requiring vision models or screenshots.
Magic Component Platform (MCP)
An AI-powered tool that generates modern UI components from natural language descriptions, integrating with popular IDEs to streamline UI development workflow.
Audiense Insights MCP Server
Enables interaction with Audiense Insights accounts via the Model Context Protocol, facilitating the extraction and analysis of marketing insights and audience data including demographics, behavior, and influencer engagement.
VeyraX MCP
Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.
graphlit-mcp-server
The Model Context Protocol (MCP) Server enables integration between MCP clients and the Graphlit service. Ingest anything from Slack to Gmail to podcast feeds, in addition to web crawling, into a Graphlit project - and then retrieve relevant contents from the MCP client.
Kagi MCP Server
An MCP server that integrates Kagi search capabilities with Claude AI, enabling Claude to perform real-time web searches when answering questions that require up-to-date information.
E2B
Using MCP to run code via e2b.
Neon Database
MCP server for interacting with Neon Management API and databases
Qdrant Server
This repository is an example of how to create a MCP server for Qdrant, a vector search engine.
Exa Search
A Model Context Protocol (MCP) server lets AI assistants like Claude use the Exa AI Search API for web searches. This setup allows AI models to get real-time web information in a safe and controlled way.