Prettier MCP Formatter
Server Configuration
Describes the environment variables required to run the server.
| Name | Required | Description | Default |
|---|---|---|---|
| BLACK_BIN | No | Black executable used for Python files. No shell is used. | black |
| MCP_HTTP_HOST | No | HTTP bind address. | 0.0.0.0 |
| MCP_HTTP_PATH | No | MCP endpoint path. | /mcp |
| MCP_HTTP_PORT | No | HTTP listen port. | 3072 |
| MCP_TRANSPORT | No | Transport mode: stdio or http. | stdio |
| MCP_HTTP_TOKEN | No | Bearer token, minimum 16 characters. Mutually exclusive with MCP_HTTP_ALLOW_UNAUTHENTICATED=true. | |
| BLACK_TIMEOUT_MS | No | Black subprocess timeout in milliseconds. | 30000 |
| PRETTIER_ADMIN_TOKEN | No | Enables the clean_plugin_cache tool. | |
| PRETTIER_PLUGIN_CACHE | No | Persistent cache directory. | .cache/prettier-plugins |
| PRETTIER_PLUGIN_REGISTRY | No | Administrator-controlled registry. | https://registry.npmjs.org/ |
| PRETTIER_PLUGIN_ALLOWLIST | No | Comma-separated npm package specs. Leave versions off so bumps resolve without a redeploy. Empty blocks installs. | |
| PRETTIER_PLUGIN_AUTO_INSTALL | No | Install missing allowlisted plugins. | true |
| PRETTIER_PLUGIN_MAX_MEMORY_MB | No | Memory cap for npm. | 4096 |
| MCP_HTTP_ALLOW_UNAUTHENTICATED | No | Disables bearer auth. Use only with a private tunnel. Mutually exclusive with MCP_HTTP_TOKEN. | false |
| PRETTIER_PLUGIN_INSTALL_TIMEOUT | No | Install timeout in milliseconds. | 30000 |
| PRETTIER_PLUGIN_MAX_CPU_SECONDS | No | CPU-time cap for npm. | 60 |
Instructions
Guidance the server publishes about itself, which clients place ahead of the tool catalog so the model reads it before choosing anything.
This server publishes no instructions, or was last inspected before Glama recorded them.
Capabilities
Features and capabilities supported by this server
Protocol revision2025-11-25
| Capability | Details |
|---|---|
| tools | {
"listChanged": true
} |
Tools
Functions exposed to the LLM to take actions
| Name | Description |
|---|---|
| format_codeA | Format source code. Python files (.py/.pyi, or parser=python) use bundled Black; other files use Prettier. Optionally supply a config object (or JSON string) and a list of allowlisted Prettier plugin packages. Plugins do not apply to Python files. |
| supported_extensionsA | Report the file extensions this server can format. Includes Python (.py/.pyi) when Black is available. Pass allowlisted plugin package names to include extensions those Prettier plugins provide. |
| cache_infoA | List cached Prettier plugins and the cache directory in use. |
Prompts
Interactive templates invoked by user choice
| Name | Description |
|---|---|
No prompts | |
Resources
Contextual data attached and managed by the client
| Name | Description |
|---|---|
No resources | |
TDQS
Scored across 3 tools
The three tools have clearly distinct purposes: formatting code, reporting supported extensions, and inspecting plugin cache state. There is no meaningful overlap that would cause an agent to misselect among them.
All names use snake_case, but the pattern is mixed: format_code is verb_noun while supported_extensions and cache_info are noun phrases. The names are readable and accurate, but they do not follow one predictable convention.
Three tools is well-scoped for a formatter server: one core formatting action plus two focused informational helpers. Each tool supports a real part of the formatting workflow, especially plugin-aware usage.
The surface covers the main formatting operation, extension discovery, and plugin cache inspection, which is solid for the stated purpose. Minor gaps exist around check-only/dry-run formatting or config introspection, but agents can work around them.