atlas-introspect-mcp
atlas-introspect-mcp
MCP-сервер, который позволяет ATLAS смотреть на себя — и редактировать себя:
поверхность | что вы получаете | как |
разговоры | список, поиск, чтение полной истории чата | ATLAS REST API (только чтение) |
| чтение, добавление/замена/удаление сервера, замена файла | на диске, атомарно + с резервной копией |
рабочие области | список, создание, обновление, удаление | ATLAS REST API |
пользовательские промпты | библиотека промптов для каждого пользователя | ATLAS REST API |
файлы промптов | файлы по умолчанию | на диске, с резервной копией |
Почему это работает через HTTP API
История чатов, рабочие области и промпты хранятся в одном файле DuckDB
(data/chat_history.db). DuckDB поддерживает только одного писателя, и процесс
ATLAS удерживает блокировку записи всё время своей работы — второй процесс,
открывающий файл, даже в режиме только для чтения, завершается ошибкой
конфликта блокировок. Поэтому этот сервер обращается к ATLAS через loopback
HTTP. Это также означает, что ограничение по пользователям обеспечивается
ATLAS, а не переопределяется здесь.
Напрямую изменяются только mcp.json и prompts/*.md; у ATLAS нет API ни для
того, ни для другого.
Отдельный процесс — это то, что делает обратный вызов к ATLAS безопасным: ATLAS ожидает ответ этого сервера через stdio, пока его собственный цикл событий остаётся свободным для обработки запроса. Инструмент внутри процесса, делающий то же самое, привёл бы к взаимоблокировке.
Related MCP server: AnythingLLM Control Plane MCP Server
Идентификация
Каждый запрос привязан к одному пользователю и отправляется с заголовком
X-User-Email. При DEBUG_MODE=true ATLAS учитывает этот заголовок; при
выключенном режиме заголовок — это то, что предоставил бы прокси аутентификации,
так что один и тот же флаг работает в обоих случаях. По умолчанию используется
test@test.com — тестовый пользователь, к которому ATLAS обращается в режиме
отладки, и, следовательно, владелец разговоров, созданных через интерфейс на
этом хосте.
Установка
git clone https://github.com/garland3/atlas-introspect-mcp
cd atlas-introspect-mcp
uv venv .venv
uv pip install -e ".[dev]" --python .venv/bin/pythonАвтономная проверка (при запущенном ATLAS):
.venv/bin/atlas-introspect-mcp --list-tools
.venv/bin/python -c "
import asyncio; from fastmcp import Client
from fastmcp.client.transports import StdioTransport
async def m():
async with Client(StdioTransport(command='.venv/bin/atlas-introspect-mcp', args=['--stdio'])) as c:
print(await c.call_tool('atlas_status', {}))
asyncio.run(m())"Регистрация в ATLAS
Добавьте в ваш config/mcp.json ATLAS (абсолютные пути — команда ищется в
PATH менеджера служб, а не вашей оболочки), затем перезапустите ATLAS:
"atlas_introspect": {
"command": [
"/abs/path/to/atlas-introspect-mcp/.venv/bin/atlas-introspect-mcp",
"--stdio",
"--atlas-url", "http://127.0.0.1:8090",
"--user", "test@test.com"
],
"cwd": "/abs/path/to/atlas-introspect-mcp",
"transport": "stdio",
"groups": ["users"],
"description": "Introspect and configure this ATLAS instance: browse chat history, read/edit config/mcp.json, manage workspaces and custom prompts.",
"short_description": "ATLAS self-introspection",
"compliance_level": "Public"
}Добавьте "--read-only" в команду для сборки только для просмотра; тогда каждый
изменяющий инструмент будет отказываться вместо записи.
Порты: для stdio не нужны. --transport http по умолчанию использует 8101.
Он категорически отказывается от порта 8080 — на хосте с k3s klipper-lb
перенаправляет 8080 на Traefik включая 127.0.0.1, поэтому сервер, привязанный
к этому адресу, ничего не получает, и каждый запрос возвращается как пустой 500
без записи в вашем журнале.
Конфигурация
У каждого флага есть эквивалент в виде переменной окружения.
флаг | переменная окружения | значение по умолчанию |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| выкл. |
|
|
|
|
|
|
Инструменты
Разговоры (только чтение) — list_conversations, search_conversations,
get_conversation, list_conversation_tags
config/mcp.json — get_mcp_config, upsert_mcp_server,
delete_mcp_server, replace_mcp_config
Рабочие области — list_workspaces, create_workspace, update_workspace,
delete_workspace
Пользовательские промпты — list_custom_prompts, get_custom_prompt,
create_custom_prompt, update_custom_prompt, delete_custom_prompt
Файлы промптов на диске — list_prompt_files, read_prompt_file,
write_prompt_file
Здоровье — atlas_status
Что может укусить
Изменения
mcp.jsonне применяются сразу. ATLAS запускает stdio-серверы при старте. Каждый инструмент записи сообщает об этом в своём результате; применяйте с помощьюsystemctl --user restart atlasили./redeploy.sh --no-pull.Редактирование собственной записи работает, но вступает в силу только после перезапуска — после чего сломанная запись означает, что этот сервер исчез, и вы не сможете исправить его изнутри ATLAS. Резервные копии сохраняются рядом с файлом как
mcp.json.bak-<stamp>.upsert_mcp_serverзаменяет запись целиком, а не объединяет. Сначала прочитайте её, измените, отправьте всю обратно. То же самое дляconfigрабочей области иcontentпромпта.Инструменты разговоров предназначены только для чтения. В ATLAS есть конечные точки удаления; они намеренно не представлены здесь.
write_prompt_fileизменяет каждый чат в экземпляре. Он сначала создаёт резервную копию и, как иmcp.json, применяется при следующем перезапуске.
Тесты
.venv/bin/pytestОни покрывают логику редактирования файлов и проверки (атомарная запись, резервное копирование, отказ от обхода каталогов, предупреждения линтера, режим только для чтения) во временном каталоге — запущенный ATLAS не требуется.
Available Tools
21 toolsatlas_statusA
Check that ATLAS is up and report what this server is pointed at.
Start here when another tool fails: it distinguishes "ATLAS is down" from "the feature is disabled" from "this server is aimed at the wrong URL".
Inputs: no named parameters. Returns: object
create_custom_promptB
Add a prompt to this user's library.
Inputs: title (required), content (required). Returns: object
create_workspaceB
Create a workspace.
The selection fields are exactly what ATLAS restores when the workspace is applied; unknown keys are rejected by the API, so use these arguments rather than a free-form config blob.
Inputs: name (required), description, rag_enabled, selected_tools, +3 more. Returns: object
delete_custom_promptA
Delete a custom prompt. Not recoverable — confirm with the user first.
Inputs: prompt_id (required). Returns: object
delete_mcp_serverA
Remove a server entry from config/mcp.json (previous file is backed up).
Inputs: name (required). Returns: object
delete_workspaceA
Delete a workspace. Not recoverable — confirm with the user first.
Inputs: workspace_id (required). Returns: object
get_conversationA
Read one full conversation, including its messages.
Long messages are clipped per-message so a single large tool result cannot
swamp the answer; raise max_message_chars when you need the full text of
a specific turn.
Inputs: conversation_id (required), include_metadata, max_message_chars. Returns: object
get_custom_promptA
Read one custom prompt in full, by id.
Inputs: prompt_id (required). Returns: object
get_mcp_configA
Read config/mcp.json — the whole file, or one server entry.
Inputs: lint, server. Returns: object
list_conversationsA
List saved conversations, newest first.
Returns id, title, model, timestamps, message count, and a short preview.
Use get_conversation for the messages themselves.
Inputs: tag, limit, offset. Returns: object
list_conversation_tagsA
List the tags this user has applied to conversations.
Inputs: no named parameters. Returns: object
list_custom_promptsB
List this user's custom prompt library.
Inputs: include_content. Returns: object
list_prompt_filesA
List the markdown prompt files ATLAS loads from disk.
These are the defaults (system prompt, agent reason/observe/summary prompts), separate from the per-user library above. Editing one changes behaviour for every chat, and takes effect on the next ATLAS restart.
Inputs: no named parameters. Returns: object
list_workspacesA
List this user's workspaces (saved bundles of prompt/tool/RAG selections).
Inputs: no named parameters. Returns: object
read_prompt_fileC
Read one on-disk prompt file.
Inputs: name (required). Returns: object
replace_mcp_configA
Overwrite config/mcp.json with a complete JSON document.
For restructuring several entries at once. Rejected unless content parses
as an object of objects; the previous file is backed up either way. Prefer
upsert_mcp_server for a single-server change.
Inputs: content (required). Returns: object
search_conversationsC
Search conversations by title and message content.
Inputs: query (required), limit. Returns: object
update_custom_promptA
Edit a custom prompt's title or content.
content replaces the whole text — read it with get_custom_prompt first
if you are amending rather than rewriting.
Inputs: prompt_id (required), title, content. Returns: object
update_workspaceA
Update a workspace's name, description, or selections.
config replaces the whole selection snapshot when given — read the
current one with list_workspaces first. Allowed keys: active_prompt_key,
selected_tools, selected_prompts, selected_data_sources, rag_enabled.
Anything else is rejected by ATLAS.
Inputs: workspace_id (required), name, config, description. Returns: object
upsert_mcp_serverA
Add or replace one server entry in config/mcp.json.
The entry is replaced wholesale, not merged — read the current entry with
get_mcp_config first and send it back with your change applied. The rest
of the file is untouched, and the previous file is backed up.
A stdio entry looks like::
{"command": ["/abs/path/.venv/bin/entrypoint", "--stdio"],
"cwd": "/abs/path", "transport": "stdio",
"groups": ["users"], "description": "what it does"}Inputs: name (required), config (required). Returns: object
write_prompt_fileA
Overwrite an on-disk prompt file, backing up the previous version.
Affects every chat in this instance and applies on the next ATLAS restart.
Confirm with the user before changing system_prompt.md.
Inputs: name (required), content (required). Returns: object
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 21 tools
Each tool targets a distinct resource and action: conversations, workspaces, custom prompts, prompt files, and MCP config are cleanly separated. Even similar operations like search_conversations vs list_conversations are differentiated by their descriptions (search vs browse). No two tools appear to do the same thing.
All tool names follow a consistent verb_noun pattern (list_, get_, create_, update_, delete_, read_, write_, search_, upsert_, replace_) with snake_case throughout. Only 'atlas_status' deviates slightly, but it's a special health-check tool and still fits the imperative style.
At 21 tools, the server is on the heavier side, but the scope (managing conversations, workspaces, prompts, prompt files, and MCP config) justifies the count. Each tool addresses a specific need, and there is no obvious duplication or bloat.
Workspaces, custom prompts, and MCP config all have full CRUD (or equivalent) coverage. Conversations lack create/delete, and tags are read-only, but those may be intentionally absent for an introspection tool. The ability to read and write prompt files covers the on-disk prompt management need. Minor gaps exist, but agents can work around them.
Maintenance
Related MCP Connectors
Your org's AI agents, tasks, runs, search, and brain files as MCP tools and resources.
Remote MCP server to run your Atako AI agents: chat, projects, files, integrations and channels.
Nifty's MCP server — exposes tasks, projects, messages, and files as tools for AI agents.
Remote MCP server exposing your Node Command fleet (files, shell, processes, browser) to AI hosts.
Related MCP Servers
- AlicenseAqualityDmaintenanceEnables MCP-based interaction with a local Hermes Agent installation, providing file read/search, skill management, and optional sandboxed write, terminal, and memory tools.9MIT
- AlicenseAqualityBmaintenanceEnables managing and controlling AnythingLLM instances through MCP, providing tools to list, create, and delete workspaces, retrieve system environment settings, and get vector counts.51MIT
- AlicenseNot gradedqualityCmaintenanceEnables ChatGPT and other MCP clients to browse, search, edit and upload files, run commands and interactive terminals, inspect Git history and worktrees, dispatch coding agents, and install composable plugins within locally registered workspaces. Requests execute under the user's own machine with per-request approval or auto-approval, keeping files, tasks and results local unless explicitly returned.1MIT
- AlicenseNot gradedqualityBmaintenanceEnables administration of LibreChat through MCP, providing tools to manage Skills, Agents, scheduled tasks, Prompt library, and visibility/permissions. It also offers a generic API request tool for interacting with upstream endpoints.MIT