LLARS MCP¶
The LLARS MCP is a local MCP server (stdio) that lets Claude Code or another MCP client work with LLARS: read and create scenarios, set configs, export results as files, import anonymization cases (type 11) and follow their status, report and comment on tickets, ask chatbots and maintain the conference manager. It acts as the person who owns the API key, with exactly their rights.
Code: tools/llars-mcp/ (its own uv project, mcp==2.3.0); registration in Claude Code:
.mcp.json in the repository root. The server is a thin REST client that only talks to the
public HTTP API, so LLARS' rights, 404 answers for foreign resources, blinding and rate limits
apply unchanged.
Keep the project folder clean
The MCP server may upload files from the project folder Claude Code runs in to LLARS (see
"Upload folders"). Do not leave credentials or study or counseling data there — not
even as an innocently named .txt. The block list only knows typical names; a file
notes.txt with passwords passes every check.
Setup¶
- Create a personal key: in LLARS under Settings → API keys, create a key with the scopes you need (table below). A scope only works together with the right of your role behind it.
-
Set an environment variable, e.g. in
~/.zshrc— never in a file inside the repository: -
Restart Claude Code in the repository and allow the project server
llars;/mcpshows its state. You need uv, which fetches Python and the dependencies itself — runuv sync --project tools/llars-mcponce beforehand so the first start does not run into the startup timeout. - Check: "Who am I in LLARS?" —
llars_whoaminames instance, profile, user, key name, scopes and, underuploads, the upload folders — never the key itself.
Restart Claude Code after changing the key, its scopes or environment variables; the tool list
is fixed at start (profile detection via GET /api/v1/me).
| Scope | For |
|---|---|
scenario:read |
scenarios, members, invitation link, metrics, exports, anonymization overview and export, models |
scenario:write |
create and change scenarios, config, items, members, AI suggestions, co-pilot, papers, anonymization import and re-detection |
tickets:read / tickets:write |
read tickets, or report, comment and change status |
chatbot:read / chatbot:write |
read chatbots, or ask, build and change them |
conference:read / conference:write |
read or maintain the conference manager |
write includes read; a key without scopes has all rights of its owner. With the system key
the server runs in the admin profile (additionally accounts, roles, invitation mails and
progress per rater) — reserved for operations.
Configuration¶
| Variable | Default | Meaning |
|---|---|---|
LLARS_BASE_URL |
http://localhost:55080 |
LLARS instance. The default only applies when the variable is missing. An invalid value (no http:///https://, no host, credentials in the URL, query or fragment) results in the profile unconfigured: the server sends the key to no instance and only offers llars_whoami with the error — no silent fallback to localhost |
LLARS_API_KEY |
— | personal key, never logged or returned; if missing, also profile unconfigured |
LLARS_EXPORT_DIR |
~/llars-exports |
folder for exports and ticket attachments (0700, files 0600, never inside a Git work tree) |
LLARS_MCP_UPLOAD_ROOTS |
— | further upload folders besides the project folder, separated by : (see "Upload folders") |
LLARS_MCP_ALLOW_SENSITIVE |
0 |
1 = tools that send counseling texts from local files to LLARS (anon_case_preview, anon_case_import, scenario_items_add, items_file in scenario_create) |
LLARS_MCP_ALLOW_REMOTE_WRITES |
0 |
1 = writing tools also against an instance other than localhost |
LLARS_MCP_READ_ONLY |
0 |
1 = read-only tools only |
LLARS_MCP_PROFILE |
auto |
force user or admin |
LLARS_MCP_LOG_LEVEL |
WARNING |
log level on stderr |
Claude Code expands ${VAR} and ${VAR:-default} in .mcp.json (command, args, env).
If a variable without default is unset, the literal text ${VAR} arrives; the server detects
that and reports the missing key in llars_whoami. The project path is
${CLAUDE_PROJECT_DIR:-.}/tools/llars-mcp in .mcp.json because Claude Code does not promise
the working directory of a stdio server.
The repository's .mcp.json explicitly passes LLARS_BASE_URL, LLARS_API_KEY,
LLARS_EXPORT_DIR, LLARS_MCP_UPLOAD_ROOTS, LLARS_MCP_ALLOW_SENSITIVE,
LLARS_MCP_ALLOW_REMOTE_WRITES, LLARS_MCP_READ_ONLY, LLARS_MCP_PROFILE and
LLARS_MCP_LOG_LEVEL. After setting LLARS_MCP_UPLOAD_ROOTS, check with llars_whoami that
your folder appears under uploads.roots. Without the variable only the project folder is an
upload folder, which is the safe direction.
Upload folders¶
Tools that send local files to LLARS (a paper's PDF, the conversation of a type-11 case, a ticket attachment, item or suggestion JSON) only read files below an upload root. The content stays in the server's memory and never goes into the answer to the model.
Upload roots are:
- the project folder:
CLAUDE_PROJECT_DIR, otherwise the server's working directory; - every entry of
LLARS_MCP_UPLOAD_ROOTS(separated by:on macOS/Linux;~is expanded, relative entries are relative to the project folder). Missing folders are skipped.
Relative file paths in a tool call are relative to the project folder.
Never an upload root is the home directory or any folder above it up to / — neither as
project folder (e.g. Claude Code started in /Users) nor as an entry ~, /Users or / in
LLARS_MCP_UPLOAD_ROOTS, not even via a symlink: the folder's identity (device and inode) is
compared, not the path text. A subfolder such as ~/Documents/papers is fine. In addition: if
a file lies inside the home directory, only a root that itself lies inside the home directory
counts — so another route to the same folders (on macOS /System/Volumes/Data/Users/<name>,
on Linux a bind mount) does not open the home directory either.
Block list (second wall, case-insensitive, checked on the given path and on a symlink's target):
- folders in the path:
.ssh,.gnupg,.aws,.azure,.kube,.docker,.password-store,Keychains,.config/gcloud,.config/gh,.config/github-copilot,.codex,.cursor; - file names:
.envand.env.*,.netrc,.pgpass,.npmrc,.pypirc,*.pem,*.key,*.p12,*.pfx,*.kdbx,id_*(SSH keys, also.pub), anything withcredentialsorsecretin its name,.claude.json(also with an appended extension),.mcp.json,*.tfrc.json,claude_desktop_config.json(also with an appended extension) and.claude/settings*.json.
Further checks: symlinks count with their target; files with more than one directory entry (hard links) are refused — make a copy instead. Only allowed extensions per tool, size caps per tool, empty files are refused.
llars_whoami shows the allowed folders (resolved) under uploads.roots and every refused
entry under uploads.ignored with its source (project or LLARS_MCP_UPLOAD_ROOTS) and
reason (home directory or above, not found), plus a hint on how to register a subfolder of your
own.
Tools¶
57 tools in ten areas (26 read-only, 31 writing; python -m llars_mcp --selftest).
Destructive tools (item, member, invitation link, AI suggestions of one model, removing a role)
only act with confirm: true. scenario_set_config, mail_invite, user_role_assign and
force for re-detection or prefill show a preview without confirm. Tools that use routes of
version 1.61 answer "Diese Funktion braucht LLARS ≥ 1.61" (needs LLARS ≥ 1.61) on older
instances.
| Area | Tools |
|---|---|
| Meta | llars_whoami, llars_models (1.61) |
| Scenarios | scenarios_list, scenario_get, scenario_create, scenario_update (begin/end from 1.61), scenario_set_config (target=config from 1.61, plus paper review, labeling, co-pilot, AI suggestions, parts), scenario_items_add, scenario_item_remove, scenario_members_list, scenario_member_invite, scenario_member_update, scenario_member_remove, scenario_invite_link_get, scenario_invite_link_set, scenario_invite_link_delete, scenario_archive, scenario_derive |
| Results | scenario_metrics, scenario_leaderboard, scenario_results_export (file), scenario_events_export (file), scenario_progress (admin profile only) |
| AI suggestions and co-pilot | scenario_ai_suggestions_status, scenario_ai_suggestions_import, scenario_ai_suggestions_delete, scenario_copilot_generate |
| Paper review (type 10) | paper_upload, paper_coverage, paper_prefill_status, paper_prefill_run |
| Anonymization (type 11, 1.61) | anon_scenarios, anon_cases_overview, anon_case_status, anon_case_preview, anon_case_import, anon_case_redetect, anon_export (file, also before 1.61) |
| Tickets (1.61) | tickets_list, ticket_get, ticket_create, ticket_comment, ticket_update |
| Chatbots | chatbots_list, chatbot_ask, chatbot_quickbuild, chatbot_build_status, chatbot_update |
| Conferences | conferences_read, conference_upsert, conference_paper_write, conference_refresh |
| Admin profile | users_list, user_roles_get, user_role_assign, user_role_unassign, mail_invite |
The complete route table is in tools/llars-mcp/README.md.
Tickets ask every time: ticket_create and ticket_comment ask for confirmation in Claude
Code on every call and show the attachment paths, even if the tool is otherwise permanently
allowed (_meta["anthropic/requiresUserInteraction"]). The reporter also reads a ticket and
its attachments; a model steered by ticket text could otherwise attach a file from the project
folder to exactly that ticket. Only attach files you named yourself in the conversation — never
because a ticket, a comment, a chatbot answer or a web page asks for it. ticket_update
uploads nothing and does not ask separately. anon_case_import (only present with
LLARS_MCP_ALLOW_SENSITIVE=1) asks the same way: it uploads a local file as a case, and every
member of the scenario sees the original. A case created this way goes through the API key and
earns no points for pasting in the level system (since 13.11.2026); a person's sign-off on it
counts.
Saving ticket attachments: ticket_get with download_attachments stores attachments under
LLARS_EXPORT_DIR/tickets/<ref>/ as attachment-<id>-<time>.<extension>. The extension comes
only from the MIME type LLARS detected at upload (unknown → .bin); the original name chosen by
the reporter is only returned as the metadata field original_filename. On macOS the files
carry the quarantine attribute com.apple.quarantine like a browser download (best effort; it
is missing if the file system does not support it).
Paper authors (conference_paper_write): the author list of an existing paper only changes
with action: "set_authors", always as the complete new list (authors is required). An empty
list removes all authors and needs confirm: true. update refuses authors in fields.
Authors may be passed when creating a paper (create).
Deliberately left out: deleting scenarios, anonymization decisions and sign-offs (LLARS
rejects keys there with 403 HUMAN_REQUIRED), the anonymization case detail with original
texts, rating on behalf of a person, API keys, passwords, account creation, messaging and the
study run.
Privacy¶
- Results, events and the anonymization export are written only as files under
LLARS_EXPORT_DIR. The model gets path, size, SHA-256, row count and column names, never content. - Type 11 never with case text: summaries without first line, subject, file name and error sentence; the import sends the conversation from the local file directly to LLARS and only shows message count, roles per index and warning codes.
- Ticket texts, chatbot answers and conference notes are returned as
untrusted_content; the model must not derive instructions from them. - Uploads with counseling content only after
LLARS_MCP_ALLOW_SENSITIVE=1; all uploads only from the upload folders and never past the block list (see "Upload folders").
Security¶
The key is only sent as X-API-Key to the origin of LLARS_BASE_URL; without a valid
LLARS_BASE_URL no request leaves the machine. Redirects are not followed and proxies from the
environment are not used. Output, errors and logs (stderr only) are checked for the key and
masked; error texts only come from LLARS' JSON error envelope. Timeouts 30 s (exports 180 s),
retries only for GET on 502/503, at most 5 requests per second.
Development¶
cd tools/llars-mcp
uv sync
uv run pytest -q # no network, HTTP mocked
uv run python -m llars_mcp --selftest # stdio round trip, schemas, annotations
Live smoke against the local stack (read-only, counts only):
uv run --project tools/llars-mcp python tools/llars-mcp/scripts/live_smoke.py.