zshref
Offline zsh syntax reference as a CLI and MCP server for terminals and AI agents
zshref is an open-source MCP server for developer tools. It runs locally on your machine and is started by your AI client.
- Pricing
- Open source
- Platforms
- CLI, Linux, macOS
- Runs
- Locally
- Version
- 0.1.0-alpha.5
- Listing updated
Similar MCP servers
Install
Add with the CLI
Run in a terminal
claude mcp add zshref-mcp -- npx -y @carlwr/zshref-mcpAdd --scope user to use it in every project, or --scope project to share it in .mcp.json.
Or share it with your project
Add to .mcp.json
{
"mcpServers": {
"zshref-mcp": {
"command": "npx",
"args": [
"-y",
"@carlwr/zshref-mcp"
]
}
}
}Add to claude_desktop_config.json
{
"mcpServers": {
"zshref-mcp": {
"command": "npx",
"args": [
"-y",
"@carlwr/zshref-mcp"
]
}
}
}Settings → Developer → Edit Config, then quit and reopen Claude Desktop.
Add to ~/.cursor/mcp.json
{
"mcpServers": {
"zshref-mcp": {
"command": "npx",
"args": [
"-y",
"@carlwr/zshref-mcp"
]
}
}
}Use .cursor/mcp.json in a project to share it with the project.
Add to ~/.copilot/mcp-config.json
{
"mcpServers": {
"zshref-mcp": {
"type": "stdio",
"command": "npx",
"args": [
"-y",
"@carlwr/zshref-mcp"
]
}
}
}Or put the same entry in .mcp.json at your workspace root to share it.
Add with the CLI
Run in a terminal
codex mcp add zshref-mcp -- npx -y @carlwr/zshref-mcpOr add to config.toml
Add to ~/.codex/config.toml
[mcp_servers.zshref-mcp]
command = "npx"
args = ["-y", "@carlwr/zshref-mcp"]Add to your client's MCP settings (most use this shape)
{
"mcpServers": {
"zshref-mcp": {
"command": "npx",
"args": [
"-y",
"@carlwr/zshref-mcp"
]
}
}
}Gemini CLI and Antigravity
Gemini CLI
Add to ~/.gemini/settings.json
{ "mcpServers": { "zshref-mcp": { "command": "npx", "args": [ "-y", "@carlwr/zshref-mcp" ] } } }Or run: gemini mcp add -s user zshref-mcp npx -- -y @carlwr/zshref-mcp
Antigravity
Add to ~/.gemini/config/mcp_config.json
{ "mcpServers": { "zshref-mcp": { "command": "npx", "args": [ "-y", "@carlwr/zshref-mcp" ] } } }Use .agents/mcp_config.json to add it to one workspace only.
Devin Desktop (formerly Windsurf)
Add to ~/.config/devin/mcp_config.json
{ "mcpServers": { "zshref-mcp": { "command": "npx", "args": [ "-y", "@carlwr/zshref-mcp" ] } } }On Windows the file is %APPDATA%\devin\mcp_config.json. Use .devin/mcp_config.json to share it with a project.
Cline
Add to cline_mcp_settings.json
{ "mcpServers": { "zshref-mcp": { "command": "npx", "args": [ "-y", "@carlwr/zshref-mcp" ] } } }Open it from the MCP Servers icon → Configure → Configure MCP Servers.
Zed
Add to Zed settings.json
{ "context_servers": { "zshref-mcp": { "command": "npx", "args": [ "-y", "@carlwr/zshref-mcp" ] } } }Open it with zed: open settings file. Merge context_servers into the settings you already have.
JetBrains AI Assistant and Junie
AI Assistant
Add to Settings → Tools → AI Assistant → Model Context Protocol (MCP) → Add
{ "mcpServers": { "zshref-mcp": { "command": "npx", "args": [ "-y", "@carlwr/zshref-mcp" ] } } }Junie
Add to ~/.junie/mcp/mcp.json
{ "mcpServers": { "zshref-mcp": { "command": "npx", "args": [ "-y", "@carlwr/zshref-mcp" ] } } }Use .junie/mcp/mcp.json to share it with a project.
Kiro
Add to ~/.kiro/settings/mcp.json
{ "mcpServers": { "zshref-mcp": { "command": "npx", "args": [ "-y", "@carlwr/zshref-mcp" ] } } }Use .kiro/settings/mcp.json to add it to one workspace only.
Using several servers? Build one config file with the MCP config generator.
About zshref
zshref answers questions about zsh syntax without touching a shell. Options, builtins, redirections, parameter expansion, prompt escapes and ZLE widgets are parsed from upstream zsh documentation into typed records, so lookups return structured JSON rather than text scraped from the man page.
The same parsed reference is exposed two ways: a command-line tool that prints one compact JSON line per call, and an MCP server that AI clients can launch over stdio. Lookups normalize input forms such as NO_* option negation, single-letter option flags and case differences, and results flag when a match came through a lossy normalization.
It is aimed mainly at scripts and agent pipelines that need exact zsh documentation. The tool makes no network calls, runs no subprocesses and writes no files, and it is distributed as a single binary or through npm. It is still in alpha, with stable install docs not yet published.
Tools this server provides (3)
Taken from the project documentation; the running server may differ.
From the tool list in its README, going by the names, 2 of 3 tools read data; 1 name doesn't say.
From the server's own tool labels and tool names; not verified by us.
- zsh_docs
- Look up the docs for a zsh key, with optional category.
- zsh_searchName suggests: reads
- Fuzzy discovery of zsh elements by name, with optional category and limit.
- zsh_listName suggests: reads
- Enumerate zsh reference records, optionally filtered by category.
What it does
- Structured reference records
- Each syntax element is stored as a typed record parsed from upstream zsh documentation.
- Offline lookups
- Queries run entirely locally with no network access or shell execution.
- Fuzzy search and listing
- Find elements by partial name and enumerate records within a category.
- JSON output for pipelines
- CLI output is compact JSON on stdout, suitable for piping into jq or other tools.
- MCP server over stdio
- Three tools for docs, search and list can be added to MCP clients with a single config entry.
- Normalized key resolution
- Handles NO_* negation, single-letter option flags and redirection forms when resolving keys.
Good for
- Look up what a zsh option such as AUTO_CD does while writing a script
- Let an AI coding agent check zsh syntax without running a shell
- Search the zsh manual for builtins or reserved words by partial name
- Pipe documented zsh element details into other command-line tooling
- Provide zsh reference lookups in air-gapped or minimal container environments
Pricing
Open source
Free and MIT licensed
zshref FAQ
Does zshref run any shell commands or access the network?
No. It has no shell execution, subprocesses, network access or filesystem writes, and the MCP server reads no environment variables.
How is zshref installed?
It can be run with npx -y @carlwr/zshref-mcp, installed globally from npm as @carlwr/zshref, installed with cargo binstall or cargo install for alpha versions, or built from source.
Which MCP tools does the server provide?
zsh_docs looks up documentation for a key, zsh_search performs fuzzy name discovery, and zsh_list enumerates records, optionally filtered by category.
Is zshref ready for production use?
The project describes itself as pre-release alpha, and stable installation documentation is not yet available.
Is zshref free?
Yes. zshref is open source, so you can use and self-host it for free.
How do I add zshref to Claude Code?
Run this command in your terminal: claude mcp add zshref-mcp -- npx -y @carlwr/zshref-mcp
What are the best alternatives to zshref?
The closest alternatives to zshref are Ref Tools MCP, Zread MCP, Ref Tools MCP, Llmref and Zephex.
Where this comes from
- Description: written from the project's README and its MCP Registry entry.
- Install steps: from the official MCP Registry entry.