Skip to main content
Glama
Prettier MCP Formatter

Prettier MCP Formatter

Server Configuration

Describes the environment variables required to run the server.

NameRequiredDescriptionDefault
BLACK_BINNoBlack executable used for Python files. No shell is used.black
MCP_HTTP_HOSTNoHTTP bind address.0.0.0.0
MCP_HTTP_PATHNoMCP endpoint path./mcp
MCP_HTTP_PORTNoHTTP listen port.3072
MCP_TRANSPORTNoTransport mode: stdio or http.stdio
MCP_HTTP_TOKENNoBearer token, minimum 16 characters. Mutually exclusive with MCP_HTTP_ALLOW_UNAUTHENTICATED=true.
BLACK_TIMEOUT_MSNoBlack subprocess timeout in milliseconds.30000
PRETTIER_ADMIN_TOKENNoEnables the clean_plugin_cache tool.
PRETTIER_PLUGIN_CACHENoPersistent cache directory..cache/prettier-plugins
PRETTIER_PLUGIN_REGISTRYNoAdministrator-controlled registry.https://registry.npmjs.org/
PRETTIER_PLUGIN_ALLOWLISTNoComma-separated npm package specs. Leave versions off so bumps resolve without a redeploy. Empty blocks installs.
PRETTIER_PLUGIN_AUTO_INSTALLNoInstall missing allowlisted plugins.true
PRETTIER_PLUGIN_MAX_MEMORY_MBNoMemory cap for npm.4096
MCP_HTTP_ALLOW_UNAUTHENTICATEDNoDisables bearer auth. Use only with a private tunnel. Mutually exclusive with MCP_HTTP_TOKEN.false
PRETTIER_PLUGIN_INSTALL_TIMEOUTNoInstall timeout in milliseconds.30000
PRETTIER_PLUGIN_MAX_CPU_SECONDSNoCPU-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

CapabilityDetails
tools
{
  "listChanged": true
}

Tools

Functions exposed to the LLM to take actions

NameDescription
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

NameDescription

No prompts

Resources

Contextual data attached and managed by the client

NameDescription

No resources

TDQS

A3.9/5.0

Scored across 3 tools

Disambiguation5/5

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.

Naming Consistency3/5

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.

Tool Count5/5

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.

Completeness4/5

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.

Maintenance

ActivityMaintained
ResponsivenessNo recent community issues