masscode-mcp
# masscode-mcp
An MCP (Model Context Protocol) stdio server for [massCode](https://masscode.io),
the open-source snippet manager. It exposes your massCode library to any MCP client
(Claude Code, Claude Desktop, etc.) so an AI assistant can list, read, create and
update your snippets, folders and tags.
massCode runs a local HTTP API; this server talks to it on `localhost` and speaks
MCP over stdio.
## Requirements
- [massCode](https://masscode.io) running, with its local API/DB server enabled
- Node.js 18+
## Install
```bash
npm install
```
## Configure
Two environment variables (both optional):
| Variable | Default | Purpose |
|---|---|---|
| `MASSCODE_PORT` | `4321` | Port massCode's local API is listening on |
| `MASSCODE_API_KEY` | *(none)* | Bearer token, if your massCode build requires one |
## Use with an MCP client
Register it as a stdio server, e.g. in Claude Code:
```json
{
"mcpServers": {
"masscode": {
"command": "node",
"args": ["path/to/masscode-mcp/index.js"],
"env": { "MASSCODE_PORT": "4321" }
}
}
}
```
## Tools
- `masscode_list_folders`, `masscode_list_tags`
- `masscode_list_snippets`, `masscode_get_snippet`
- `masscode_create_folder`, `masscode_create_tag`
- `masscode_create_snippet`, `masscode_update_snippet`
## License
MIT — see [LICENSE](LICENSE).
TDQS
Scored across 8 tools
Each tool targets a distinct resource (snippet, folder, tag) and action (create, list, get, update). No two tools have overlapping purposes; list_snippets and get_snippet are clearly differentiated by search/list vs single-fetch by ID.
All tools follow a consistent snake_case pattern of masscode_<verb>_<noun>, with verbs limited to create, list, get, and update. The naming is uniform and predictable.
Eight tools is an appropriate size for a snippet management server. Each tool serves a clear function and covers the main resources without unnecessary bloat or missing essentials.
The set provides create, read, and update for snippets, but lacks delete operations for snippets, folders, and tags. Folders and tags only support create and list, leaving update and delete holes. These are notable gaps for a comprehensive snippet management tool.