Sapling MCP Server
The Sapling MCP Server makes Sapling's language APIs available as tools in Claude
Desktop, Claude Code, and other assistants that support local
Model Context Protocol servers over standard
input and output (stdio).
The server runs locally through Node.js. When you call a Sapling tool, it sends the requested text to the Sapling API and returns the API's structured response to your assistant.
Before you begin
You need:
- Node.js 18 or newer, including the
npxcommand. - A Sapling API key. Trial keys are available after registration.
- An MCP client that supports local
stdioservers.
Keep the API key in your MCP client's environment configuration. Do not place it in prompts, source code, or a committed configuration file.
Claude Desktop
Add the following entry to your Claude Desktop configuration, replacing
YOUR_API_KEY with your Sapling API key:
{
"mcpServers": {
"sapling": {
"command": "npx",
"args": ["-y", "@saplingai/mcp-server"],
"env": {
"SAPLING_API_KEY": "YOUR_API_KEY"
}
}
}
}
The configuration file is located at:
- macOS:
~/Library/Application Support/Claude/claude_desktop_config.json - Windows:
%APPDATA%\Claude\claude_desktop_config.json
Restart Claude Desktop after saving the file.
Claude Code
Run:
claude mcp add sapling --env SAPLING_API_KEY=YOUR_API_KEY \
-- npx -y @saplingai/mcp-server
Then run claude mcp list to confirm that sapling is configured.
Other MCP clients
Use the following local-server settings in any client that accepts a command, arguments, and environment variables:
| Setting | Value |
|---|---|
| Transport | stdio |
| Command | npx |
| Arguments | -y, @saplingai/mcp-server |
| Environment | SAPLING_API_KEY=YOUR_API_KEY |
The Sapling package does not expose a remote HTTP MCP endpoint. Your client
starts the local stdio process and the process calls https://api.sapling.ai.
Available tools
| Tool | Purpose | Optional inputs |
|---|---|---|
sapling_grammar_check | Grammar, spelling, punctuation, and style suggestions | session_id, lang, variety, medical, advanced_edits |
sapling_spell_check | Spelling-focused suggestions | session_id, lang |
sapling_ai_detect | AI-generated content detection | sent_scores, score_string |
sapling_rephrase | Paraphrase, tone, and tense transformations | mapping, tone_mapping, tense_mapping, num_results (1–8) |
sapling_summarize | Summarize longer text | None |
sapling_sentiment | Analyze sentiment | None |
sapling_language_detect | Detect a text's language | None |
Every tool requires a non-empty text input. For endpoint-specific limits and
response formats, see the API documentation.
Configuration
| Environment variable | Required | Default | Description |
|---|---|---|---|
SAPLING_API_KEY | Yes | — | Sapling API key used for each request |
SAPLING_API_BASE_URL | No | https://api.sapling.ai | Alternate Sapling API base URL, such as an on-premises deployment |
SAPLING_MCP_TIMEOUT_MS | No | 120000 | Positive request timeout in milliseconds |
Try it
After restarting or reconnecting your MCP client, try:
- "Check this sentence for grammar:
This are a test." - "Detect the language of:
Bonjour tout le monde." - "Rewrite this sentence in a friendlier tone."
- "Analyze the sentiment of this customer message."
Your assistant should ask for confirmation when appropriate and then call a
tool whose name begins with sapling_.
Troubleshooting
Missing SAPLING_API_KEY environment variable
Add SAPLING_API_KEY to the server's env configuration and restart the MCP
client. Setting it only in a shell that does not launch the client may not pass
it to the server.
npx or node is not found
Install Node.js 18 or newer and restart the MCP client so it receives the updated system path.
402 Payment Required
The API key may be expired, inactive, or over its monthly billing limit. Review API access and payment-required responses.
A tool times out
For unusually long API calls, set SAPLING_MCP_TIMEOUT_MS to a larger positive
number. For large documents, follow the chunking guidance on the relevant API
page.
Security and data handling
The package does not log or persist your API key or submitted text. Tool inputs are sent to the configured Sapling API endpoint for processing. Review Data Processing and contact Sapling if you require no-data-retention or an on-premises deployment.
If you set SAPLING_API_BASE_URL, the server sends your API key and submitted
text to that endpoint. Point it only at a Sapling endpoint you trust, such as
your own on-premises deployment.
Releases are published on npm as
@saplingai/mcp-server.