Model Context Protocol server for Laserfiche document management systems
Project description
laserfiche-mcp
A Model Context Protocol server that lets Claude (Desktop, Code, or any MCP client) search and read documents in a Laserfiche repository.
v1 status: read-only, self-hosted Repository API Server. Cloud and write tools are scoped for v2 / v1.1.
What you can do with it
Once connected, Claude can:
- Search the repository with native Laserfiche search syntax
- List the contents of any folder
- Look up an entry by ID or full path
- Read all template field values on an entry
- Download an electronic document and read its text
Requirements
- A reachable Laserfiche Repository API Server (self-hosted) and a service account that can read it
- Python 3.10+ (the install path below uses
uvso you don't have to think about this) - An MCP-capable client (Claude Desktop, Claude Code, MCP Inspector, etc.)
Install
Pick whichever fits your workflow:
# Run directly without cloning
uvx laserfiche-mcp
# Or clone for development
git clone https://github.com/SamuelSHernandez/laserfiche-mcp
cd laserfiche-mcp
uv sync --extra dev
Configure
Copy the example file and fill in your repository details:
cp .env.example .env
$EDITOR .env
Minimum required variables for self-hosted basic auth:
| Variable | Example |
|---|---|
LF_REPO_API_URL |
https://lf.example.com/LFRepositoryAPI |
LF_REPOSITORY_ID |
my-repo |
LF_USERNAME |
service-account |
LF_PASSWORD |
(your service account password) |
LF_AUTH_MODE |
basic |
LF_READ_ONLY |
true (default — write tools are not yet implemented) |
See .env.example for the full list including pagination
limits, request timeout, and reserved OAuth/cloud fields.
Connect to Claude Desktop
Edit ~/Library/Application Support/Claude/claude_desktop_config.json
(macOS) or %APPDATA%\Claude\claude_desktop_config.json (Windows):
{
"mcpServers": {
"laserfiche": {
"command": "uvx",
"args": ["laserfiche-mcp"],
"env": {
"LF_REPO_API_URL": "https://lf.example.com/LFRepositoryAPI",
"LF_REPOSITORY_ID": "my-repo",
"LF_USERNAME": "service-account",
"LF_PASSWORD": "replace-me",
"LF_AUTH_MODE": "basic",
"LF_READ_ONLY": "true"
}
}
}
}
Restart Claude Desktop. The Laserfiche tools will appear in the tool picker.
Connect to Claude Code
claude mcp add laserfiche -- uvx laserfiche-mcp
(Pass env vars via --env LF_REPO_API_URL=... flags or set them in your
shell before running Claude Code.)
Test it locally with the MCP Inspector
npx @modelcontextprotocol/inspector uvx laserfiche-mcp
This opens a UI where you can call each tool directly and watch the JSON-RPC traffic — useful for verifying endpoint shapes against your specific Repository API Server version before wiring it into Claude.
Tools
| Tool | Purpose |
|---|---|
search_entries |
Run a Laserfiche search query, e.g. {LF:Name="*.pdf"} |
list_folder |
List children of a folder by ID |
get_entry |
Fetch metadata for one entry by ID |
get_entry_by_path |
Resolve a full path (e.g. \Imports\2024\Smith,John) to an entry |
get_field_values |
Read all template fields assigned to an entry |
get_document_text |
Download an electronic document's content as text (truncated by default) |
All tool descriptions are written to read like prompts — they tell the
model when to use the tool, valid input shapes, and what kind of follow-up
is expected. See src/laserfiche_mcp/server.py.
Roadmap
- v1.1 — Write tools (
update_field_values,move_entry) gated behindLF_READ_ONLY=false; OAuth/LFDS auth. - v2 — Laserfiche Cloud support.
- Beyond — Workflow trigger tools, batch field updates, advanced search builders.
Development
uv sync --extra dev
uv run pytest # smoke tests against mocked HTTP
uv run ruff check src tests
uv run mypy src
Tests use pytest-httpx to mock the Repository API; they don't require a
real Laserfiche server. For integration testing against a real repository,
use the MCP Inspector pointed at uv run laserfiche-mcp with a populated
.env.
Contributing
Issues and PRs welcome — particularly:
- Endpoint corrections for older Repository API Server versions
- LFDS OAuth token discovery in
auth.py - Cloud (
api.laserfiche.com) client implementation
This is a community project, not affiliated with or endorsed by Laserfiche.
License
Released under the MIT License. Copyright (c) 2026 Samuel S. Hernandez.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file laserfiche_mcp-0.2.0.tar.gz.
File metadata
- Download URL: laserfiche_mcp-0.2.0.tar.gz
- Upload date:
- Size: 89.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.11.12 {"installer":{"name":"uv","version":"0.11.12","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
ff64aaaaff75211437dc3d5add46958738d6b5d57dc5f3b45b3865accd4765cb
|
|
| MD5 |
2ed0332cf3aca663989f07d726cf03ef
|
|
| BLAKE2b-256 |
2c8ab9f703a4df4c159d6add2ebf9c0a71eed4a60435fc4b400f32488812639d
|
File details
Details for the file laserfiche_mcp-0.2.0-py3-none-any.whl.
File metadata
- Download URL: laserfiche_mcp-0.2.0-py3-none-any.whl
- Upload date:
- Size: 17.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.11.12 {"installer":{"name":"uv","version":"0.11.12","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
ea3f910b571a55f9e60ef00df2caa64c8f30189a7fcce70aab8950b89e03a9b0
|
|
| MD5 |
fcbec34902c142920b6a2b83810f46aa
|
|
| BLAKE2b-256 |
2424425cb16350b5825283ea38558f61cc61cd58c71ee2d7d9aa64853dbc0a64
|