ocr-arena-mcp 0.1.0-beta.1 → 0.1.0-beta.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -8,14 +8,23 @@ Your documents and keys go only to the model providers you pick.
8
8
 
9
9
  ## Install (beta)
10
10
 
11
- Node 20 or newer. Add it to your agent; keys go in a `.env` file in your project (see Keys below).
11
+ Node 20 or newer. Add it to your agent, then say "help me get started with OCR Arena". Keys are added in a private key
12
+ manager the server opens on your computer (see Keys below).
12
13
 
13
14
  **Claude Code**
14
15
  ```bash
15
16
  claude mcp add ocr-arena -- npx -y ocr-arena-mcp@beta
16
17
  ```
17
18
 
18
- **Cursor / Claude Desktop / Windsurf** (`mcp.json`)
19
+ **Claude desktop app (chat)**: Settings → Developer → Edit Config, then add to `claude_desktop_config.json` and restart
20
+ the app. Chat apps don't say which folder you're working in, so name it with `OCR_ARENA_WORKSPACE` (results live there;
21
+ without it the workspace is `~/ocr-arena`). Folders elsewhere work too: you're asked to allow each one the first time.
22
+ ```json
23
+ { "mcpServers": { "ocr-arena": { "command": "npx", "args": ["-y", "ocr-arena-mcp@beta"],
24
+ "env": { "OCR_ARENA_WORKSPACE": "/path/to/your/documents" } } } }
25
+ ```
26
+
27
+ **Cursor / Windsurf** (`mcp.json`)
19
28
  ```json
20
29
  { "mcpServers": { "ocr-arena": { "command": "npx", "args": ["-y", "ocr-arena-mcp@beta"] } } }
21
30
  ```
@@ -28,15 +37,31 @@ samples or an industry preset. No keys yet? Preview a preset or the samples with
28
37
  saved from an earlier OCR Arena run, no cost). Results always say when you're looking at saved outputs.
29
38
 
30
39
  **Fastest start:** Extend. Sign up at [dashboard.extend.ai](https://dashboard.extend.ai) (new accounts get $100 in free
31
- credits, about 10,000 pages), create a key, add `EXTEND_API_KEY=…` to your project's `.env`, and ask your agent to run
32
- `doctor` again. No restart needed. Or just say "help me get started with OCR Arena" (`/ocr-arena:get-started`).
40
+ credits, about 10,000 pages), create a key, and paste it in the key manager. No restart needed. Or just say "help me get
41
+ started with OCR Arena" (`/ocr-arena:get-started`).
42
+
43
+ ## What you'll see
44
+
45
+ Every evaluation goes through four steps: **Set up → Run → Grade → Report**. In chat apps that show MCP Apps (Claude,
46
+ ChatGPT and others), each step is a card in the conversation, in OCR Arena's design:
47
+
48
+ - **Set up:** which models are ready, and a button to the key manager.
49
+ - **Plan:** documents, pages, calls and cost per model, with "Run it" when a big run needs your OK.
50
+ - **Run** and **Grade:** a progress bar per model while the models read your documents and the judge grades them.
51
+ - **Report:** the ranking, and buttons to open the report, review every output (each document with every model's
52
+ boxes, answers and grades) and download everything as one zip.
53
+
54
+ Elsewhere (Claude Code, Cursor) you get the same steps as short text, with progress and links.
33
55
 
34
56
  ## Keys
35
57
 
36
- One variable per provider; set only the ones you want. They're read from the server's environment, then from `.env.local`
37
- / `.env` in your workspace, then `~/.config/ocr-arena/.env` (or `OCR_ARENA_ENV_FILE`). Files are re-read on every call,
38
- so a key you add mid-session works right away. `doctor` shows what's set and where it came from (never the values).
39
- Don't paste keys into the chat: put them in `.env` yourself.
58
+ Ask for the key manager (`add_keys`, or the card's button): a page on your computer (127.0.0.1, protected by a
59
+ per-session token) where you paste a key per provider. Keys are saved to `~/.config/ocr-arena/.env`, readable only by
60
+ you, and never pass through the chat. The card updates when you save.
61
+
62
+ Prefer files? Keys are also read from the server's environment and from `.env.local` / `.env` in your workspace (or
63
+ `OCR_ARENA_ENV_FILE`), re-read on every call, so a key added mid-session works right away. `doctor` shows what's set
64
+ and where it came from (never the values). Don't paste keys into the chat.
40
65
 
41
66
  | Provider | Variable | Models |
42
67
  | --- | --- | --- |
@@ -83,16 +108,17 @@ missed.
83
108
  | Tool | What it does |
84
109
  | --- | --- |
85
110
  | `doctor` | Which keys are set, which models are ready, where results go |
111
+ | `add_keys` | Opens the key manager and waits for you to save |
86
112
  | `list_models` | The roster, with what's ready and how to unlock the rest |
87
113
  | `list_presets` | Industry presets: documents, answer keys and judging prompts |
88
114
  | `estimate` | Documents, pages, live calls and time, before anything runs |
89
115
  | `run_eval` | Runs files, folders, globs, a preset or public samples through models; cached, resumable, with progress. Asks for confirmation above 100 live calls |
90
- | `get_results` | Ranked summary: judged wins or accuracy, latency, failures |
116
+ | `get_results` | Ranked summary: judged wins or accuracy, latency, failures. `wait_seconds` waits for a run or judging that's still going |
91
117
  | `compare` | What one model read that another missed, on one document |
92
118
  | `draft_answer_keys` | A GPT, Claude or Gemini model writes questions (with exact answers) from each of your documents, for the LLM judge; you check them first |
93
119
  | `judge` | Blind A/B judging by the agent (`mode: "agent"`) or by you in a local page (`mode: "human"`), or an LLM judge against answer keys (`mode: "llm"`) |
94
120
  | `submit_verdicts` | The agent's verdicts for the pairs `judge` handed out |
95
- | `report` | Writes `report.md` and `report.html`, exports every output (Markdown, and JSON blocks with page and bounding box) plus `answers.csv`, `grades.csv` and `latency.csv` under `.ocr-arena/runs/<id>/export/`, and links the review page |
121
+ | `report` | Writes `report.md` and `report.html`, bundles everything in one zip, exports every output (Markdown, and JSON blocks with page and bounding box) plus `answers.csv`, `grades.csv` and `latency.csv` under `.ocr-arena/runs/<id>/export/`, and links the review page |
96
122
  | `open_workspace` | A local page (localhost only) to drag and drop files, run, judge blind and see results. `view: "review"` opens a run's review: each document rendered with every model's bounding boxes, each output block by block, the answer key with every model's answers, and the judge's grades with evidence |
97
123
 
98
124
  **Ground truth:** put the expected text next to a document (`invoice.pdf` → `invoice.expected.md`, `.gt.md` or `.md`) and
@@ -104,8 +130,12 @@ Results live in `.ocr-arena/` in your workspace: outputs, cache, reports. Re-run
104
130
 
105
131
  - **No write path to OCR Arena:** no votes, no ratings, no uploads. The server only talks to the model providers you
106
132
  pick (and downloads public sample PDFs).
107
- - **Files:** only PDFs and images are read, up to 50 MB each. Folders and patterns are searched only inside your workspace.
108
- - **Keys:** read from the environment, never logged, returned or written; scrubbed from provider error messages.
133
+ - **Files:** only PDFs and images are read, up to 50 MB each. Folders and patterns are searched inside your workspace,
134
+ or in folders you allowed (asked once per folder; remembered in `~/.config/ocr-arena/folders.json`).
135
+ - **Keys:** never logged or returned; scrubbed from provider error messages. The key manager writes only provider key
136
+ variables, to a file only you can read, and accepts writes only with its token, a JSON body and no foreign origin.
137
+ - **Failures:** a provider that rejects a key is called once, not once per document; calls that fail on a hiccup are
138
+ retried at the end of the run.
109
139
  - **Money:** `estimate` before running; runs above 100 live calls need your explicit go-ahead
110
140
  (`OCR_ARENA_CONFIRM_ABOVE` to change).
111
141
  - **Malicious documents:** OCR output is passed to the agent as delimited data and labelled untrusted.
@@ -115,7 +145,7 @@ Results live in `.ocr-arena/` in your workspace: outputs, cache, reports. Re-run
115
145
 
116
146
  ```bash
117
147
  npm run build # bundle src/ + the web app's shared adapters into dist/index.js
118
- npm test # end to end over stdio on public samples (no keys, no network)
148
+ npm test # end to end over stdio on public samples (no keys), plus the cards, key manager and folders
119
149
  npm run typecheck
120
150
  node test/live.manual.mjs dist/index.js <workspace> # real providers (needs keys)
121
151
  ```
@@ -0,0 +1,92 @@
1
+ Copyright (c) 2023 Vercel, in collaboration with basement.studio
2
+
3
+ This Font Software is licensed under the SIL Open Font License, Version 1.1.
4
+ This license is copied below, and is also available with a FAQ at:
5
+ http://scripts.sil.org/OFL
6
+
7
+ -----------------------------------------------------------
8
+ SIL OPEN FONT LICENSE Version 1.1 - 26 February 2007
9
+ -----------------------------------------------------------
10
+
11
+ PREAMBLE
12
+ The goals of the Open Font License (OFL) are to stimulate worldwide
13
+ development of collaborative font projects, to support the font creation
14
+ efforts of academic and linguistic communities, and to provide a free and
15
+ open framework in which fonts may be shared and improved in partnership
16
+ with others.
17
+
18
+ The OFL allows the licensed fonts to be used, studied, modified and
19
+ redistributed freely as long as they are not sold by themselves. The
20
+ fonts, including any derivative works, can be bundled, embedded,
21
+ redistributed and/or sold with any software provided that any reserved
22
+ names are not used by derivative works. The fonts and derivatives,
23
+ however, cannot be released under any other type of license. The
24
+ requirement for fonts to remain under this license does not apply
25
+ to any document created using the fonts or their derivatives.
26
+
27
+ DEFINITIONS
28
+ "Font Software" refers to the set of files released by the Copyright
29
+ Holder(s) under this license and clearly marked as such. This may
30
+ include source files, build scripts and documentation.
31
+
32
+ "Reserved Font Name" refers to any names specified as such after the
33
+ copyright statement(s).
34
+
35
+ "Original Version" refers to the collection of Font Software components as
36
+ distributed by the Copyright Holder(s).
37
+
38
+ "Modified Version" refers to any derivative made by adding to, deleting,
39
+ or substituting -- in part or in whole -- any of the components of the
40
+ Original Version, by changing formats or by porting the Font Software to a
41
+ new environment.
42
+
43
+ "Author" refers to any designer, engineer, programmer, technical
44
+ writer or other person who contributed to the Font Software.
45
+
46
+ PERMISSION AND CONDITIONS
47
+ Permission is hereby granted, free of charge, to any person obtaining
48
+ a copy of the Font Software, to use, study, copy, merge, embed, modify,
49
+ redistribute, and sell modified and unmodified copies of the Font
50
+ Software, subject to the following conditions:
51
+
52
+ 1) Neither the Font Software nor any of its individual components,
53
+ in Original or Modified Versions, may be sold by itself.
54
+
55
+ 2) Original or Modified Versions of the Font Software may be bundled,
56
+ redistributed and/or sold with any software, provided that each copy
57
+ contains the above copyright notice and this license. These can be
58
+ included either as stand-alone text files, human-readable headers or
59
+ in the appropriate machine-readable metadata fields within text or
60
+ binary files as long as those fields can be easily viewed by the user.
61
+
62
+ 3) No Modified Version of the Font Software may use the Reserved Font
63
+ Name(s) unless explicit written permission is granted by the corresponding
64
+ Copyright Holder. This restriction only applies to the primary font name as
65
+ presented to the users.
66
+
67
+ 4) The name(s) of the Copyright Holder(s) or the Author(s) of the Font
68
+ Software shall not be used to promote, endorse or advertise any
69
+ Modified Version, except to acknowledge the contribution(s) of the
70
+ Copyright Holder(s) and the Author(s) or with their explicit written
71
+ permission.
72
+
73
+ 5) The Font Software, modified or unmodified, in part or in whole,
74
+ must be distributed entirely under this license, and must not be
75
+ distributed under any other license. The requirement for fonts to
76
+ remain under this license does not apply to any document created
77
+ using the Font Software.
78
+
79
+ TERMINATION
80
+ This license becomes null and void if any of the above conditions are
81
+ not met.
82
+
83
+ DISCLAIMER
84
+ THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
85
+ EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF
86
+ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT
87
+ OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL THE
88
+ COPYRIGHT HOLDER BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
89
+ INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL
90
+ DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
91
+ FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM
92
+ OTHER DEALINGS IN THE FONT SOFTWARE.