elog-mcp
Provides read-only access to ELOG electronic logbooks, enabling full-text and attribute search, reading entries with attachments, and listing logbooks over HTTP.
README
elog-mcp
OpenAPI/MCP server giving LLM agents read-only access to ELOG electronic logbooks over HTTP. Works with any standard elogd instance.
- Search entries by full text (regex), attributes, and date range
- Read entries in full (attributes + body + attachments)
- Download attachments, discover logbooks
Strictly read-only: only HTTP GET requests are issued. TLS verification is on by default. Credentials come from the environment only and are never logged or echoed.
Installation
Requires Python >= 3.10.
uvx (recommended -- runs elog-mcp in an isolated environment, no setup):
uvx elog-mcp
pipx:
pipx install elog-mcp
pip:
pip install elog-mcp
For the OpenAPI/REST transport, install with the openapi extra:
uvx --extra openapi elog-mcp
pipx install "elog-mcp[openapi]"
pip install "elog-mcp[openapi]"
From source (development):
git clone https://github.com/ast0815/elog-mcp.git
cd elog-mcp
uv sync
uv run elog-mcp
Configuration
All settings are environment variables (ELOG_ prefix):
| Variable | Required | Meaning |
|---|---|---|
ELOG_URL |
yes | Base URL incl. subdir, e.g. https://elog.example.org/elog |
ELOG_USER / ELOG_PASSWORD |
no | Shared credentials |
ELOG_LOGBOOKS |
no | Comma-separated allow-list used by search * / listing order |
ELOG_SSL_VERIFY |
no | true (default) / false — never disable outside local tests |
ELOG_TIMEOUT |
no | HTTP timeout seconds (default 30) |
ELOG_MCP_TRANSPORT |
no | stdio (default) · streamable-http · openapi |
ELOG_MCP_HOST / ELOG_MCP_PORT |
no | Bind address/port in HTTP modes (default 127.0.0.1:8000) |
ELOG_API_KEY |
no | Require Authorization: Bearer <key> on all OpenAPI endpoints |
ELOG_CORS_ORIGINS |
no | Comma-separated CORS origins for openapi mode (default *) |
ELOG_MCP_CERTFILE / ELOG_MCP_KEYFILE |
no | TLS cert/key (PEM) — serves HTTPS in HTTP modes |
Common prefix for every deployment:
export ELOG_URL=https://elog.example.org/elog
export ELOG_USER=your-shared-user
export ELOG_PASSWORD=your-shared-password
Deployment
ELOG_MCP_TRANSPORT picks how clients talk to the server:
| Transport | Clients | Endpoint |
|---|---|---|
stdio (default) |
Claude Desktop, opencode, other local MCP hosts | spawned process |
streamable-http |
Web UIs speaking MCP over HTTP (LibreChat, …) | http://<host>:<port>/mcp |
openapi |
OpenAPI tool servers (Open WebUI, …) | spec at /openapi.json, docs at /docs, base / answers a liveness JSON |
stdio (local MCP clients)
The command you put in the client config depends on how you installed elog-mcp:
| Installation | Command |
|---|---|
| uvx (no install needed) | uvx elog-mcp |
| pipx | elog-mcp (or full path — see below) |
| pip / from source | elog-mcp (must be on PATH) |
| From source (dev) | uv run elog-mcp |
Finding the binary path. If which elog-mcp does not print a path (e.g.
you installed with pipx but your client runs in a different shell environment),
use:
pipx runpip show elog-mcp | grep Location
# → …/site-packages
# then: find …/site-packages/../../bin -name elog-mcp
or on most systems simply:
ls ~/.local/bin/elog-mcp
Use the absolute path in that case.
Claude Desktop (claude_desktop_config.json):
{
"mcpServers": {
"elog": {
"command": "uvx",
"args": ["elog-mcp"],
"env": { "ELOG_URL": "…", "ELOG_USER": "…", "ELOG_PASSWORD": "…" }
}
}
}
If you installed with pipx and prefer the standalone binary:
{
"mcpServers": {
"elog": {
"command": "/home/YOU/.local/bin/elog-mcp",
"env": { "ELOG_URL": "…", "ELOG_USER": "…", "ELOG_PASSWORD": "…" }
}
}
}
opencode (~/.config/opencode/opencode.json):
{
"mcp": {
"elog": {
"type": "local",
"command": ["uvx", "elog-mcp"],
"environment": { "ELOG_URL": "…", "ELOG_USER": "…", "ELOG_PASSWORD": "…" }
}
}
}
If you installed with pipx and prefer the standalone binary:
{
"mcp": {
"elog": {
"type": "local",
"command": ["/home/YOU/.local/bin/elog-mcp"],
"environment": { "ELOG_URL": "…", "ELOG_USER": "…", "ELOG_PASSWORD": "…" }
}
}
}
From source (without installing):
uv run elog-mcp
streamable-http (remote MCP clients)
ELOG_MCP_TRANSPORT=streamable-http elog-mcp
Register http://127.0.0.1:8000/mcp as a remote MCP server in your UI.
openapi (Open WebUI & friends)
ELOG_MCP_TRANSPORT=openapi \
ELOG_API_KEY=pick-a-random-secret \
elog-mcp
Five read-only endpoints mirror the tools below (operationIds equal the tool
names). In Open WebUI: Settings → Tools → + (user-level, fetched by your
browser) or Admin Settings → Tools (global, fetched by its backend), enter
the server URL, and put your ELOG_API_KEY value in the Bearer key field.
HTTPS: pass ELOG_MCP_CERTFILE/ELOG_MCP_KEYFILE, or put a reverse proxy
or tunnel (e.g. cloudflared tunnel --url http://localhost:8000) in front.
For locally-trusted dev certs: mkcert -install && mkcert localhost 127.0.0.1 ::1,
then feed the two files to the variables above (absolute paths).
Reachability rules of thumb:
- Everything binds
127.0.0.1by default. SetELOG_MCP_HOST=0.0.0.0and anELOG_API_KEYwhenever someone else must reach the server. - Client in Docker?
127.0.0.1inside its container is not your machine — usehttp://host.docker.internal:<port>(--add-host=host.docker.internal:host-gatewayon Linux). - Hosted instance (e.g. a university WebUI)? It can never reach your laptop's
loopback. User-level tool servers are additionally subject to that site's
Content-Security-Policy — if DevTools shows the request as
Transferred: CSP, the browser blocked it and only an IT-side
connect-srcchange helps. The practical route: deploy elog-mcp somewhere reachable and let the admins register it once as a global tool server.
Tools
Same five operations on every transport (REST routes shown for openapi):
| Tool | REST route | Purpose |
|---|---|---|
elog_list_logbooks() |
GET /logbooks |
List logbooks |
elog_search(text?, attributes?, date_from?, date_to?, last_days?, logbook="*", max_results=50, reverse=true) |
GET /search (attributes = JSON object string) |
Regex full-text + attribute + date filtering; returns excerpts |
elog_get_entry(logbook, entry_id) |
GET /logbooks/{logbook}/entries/{entry_id} |
Full entry body, attributes, threading |
elog_get_recent_entries(logbook, count=20) |
GET /logbooks/{logbook}/recent?count=N |
Newest-first shortcut |
elog_get_attachment(logbook, filename) |
GET /logbooks/{logbook}/attachments/{filename} |
Base64 attachment content |
Notes:
- Text and attribute filters are regular expressions (elogd semantics);
^value$anchors give exact matches. - Dates:
YYYY-MM-DD[ HH:MM[:SS]], or uselast_daysinstead of a range;logbook="*"searches all known logbooks. - Errors surface uniformly:
EntryNotFound,AuthFailed,ServerError,NetworkError,InvalidLogbook(REST status codes: 404/502/502/503/404, invalid query parameters → 400/422).
Development
uv run pytest # unit tests, offline
uv run pytest -m live # live suite (needs ELOG_TEST_URL)
uv run ruff check . # lint
uv run ruff format --check . # formatting gate
uv run mypy src # type check (strict)
Protocol details and wire-format references live in RESOURCES.md;
architecture and tool contracts in SPEC.md.
推荐服务器
Baidu Map
百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。
Playwright MCP Server
一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。
Magic Component Platform (MCP)
一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。
Audiense Insights MCP Server
通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。
VeyraX
一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。
graphlit-mcp-server
模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。
Kagi MCP Server
一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。
e2b-mcp-server
使用 MCP 通过 e2b 运行代码。
Neon MCP Server
用于与 Neon 管理 API 和数据库交互的 MCP 服务器
Exa MCP Server
模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。