BlueVetaUpright MCP server
# BlueVetaUpright MCP server
An [MCP](https://modelcontextprotocol.io) server that gives any MCP-compatible AI client
(Claude Desktop, and any other MCP-aware agent) a `detect_rotation` tool: checks whether a
product photo is upright and, if not, exactly how many degrees to rotate it.
## How billing works (read this first)
This server is a thin wrapper around the real, **paid** BlueVetaUpright API
(`https://blueveta.com/api/upright/detect`). It is **bring-your-own-key (BYOK)**: every call
bills *your own* BlueVetaUpright account, exactly the same as calling the REST API directly.
There is no free tier hiding behind this tool — get a key and credits at
[blueveta.com/upright](https://blueveta.com/upright).
## Install & configure
```bash
npm install
```
Set your API key as an environment variable (recommended — configure it once in your MCP
client's server config, not per call):
```bash
export BLUEVETA_UPRIGHT_API_KEY=bvu_live_...
```
Then point your MCP client at `node src/server.js` (stdio transport) in this directory. A
call can also override the key per-invocation with an `apiKey` argument if that fits your
client's auth model better than an environment variable.
## The tool
`detect_rotation(imageUrl | imageBase64, returnImage?, apiKey?)` → the same response shape
as the REST API: `wasAlreadyUpright`, `rotationClockwise4Axis`, `confidence4Axis`,
`rotationClockwiseFull`, `confidenceFull`, `resolved`, `note`, and (when `returnImage: true`,
priced 1.5x same as the REST API) `imageBase64`/`imageMimeType` of the corrected photo.
## Development
```bash
npm test
```
Runs `detectRotation.js`'s own unit tests — the core HTTP-calling logic (which endpoint,
whose key, what gets sent) is dependency-free and tested with a mocked `fetch`, independent
of the MCP SDK wiring in `server.js`.
## Status
Built and unit-tested (2026-10-29). Published to npm as
[`blueveta-upright-mcp`](https://www.npmjs.com/package/blueveta-upright-mcp)
(v0.1.0, 2026-11-19) and listed on the official
[MCP Registry](https://github.com/modelcontextprotocol/registry) as
`com.blueveta/upright` — genuinely installable via `npx blueveta-upright-mcp`,
not just a registry listing. See `.claude/rules/upright.md` item 26 for the
current real status.
TDQS
Scored across 1 tool
There is only one tool, so there is no possibility of misselection or overlap. The tool's stated purpose (upright/rotation-angle detection with confidence and uncertainty flagging) is unambiguous.
detect_rotation follows a clear verb_noun snake_case convention. With a single tool there is no risk of mixed conventions, so the set is trivially consistent.
One tool is thin for a server surface, but the declared domain is genuinely narrow (rotation detection only), so it is borderline rather than a clear mismatch. It lands at the 'feels thin' level rather than being grossly under- or over-scoped.
The detection operation itself is well covered (angle, confidence, uncertainty flag, auth/billing notes), but there are notable gaps: no batch/multi-image handling, no tool to apply the rotation or return a corrected image, and no usage or quota check. Agents can work around these but will hit a dead end for any follow-on step.