Skip to main content
Glama
Research Observatory MCP

Research Observatory MCP

by vwnb
README.md
# Research Observatory MCP

By WCGW Software

![WCGW Software logo](logo_naked1.png)

Dependency-free local MCP server for an observatory `data.js`.

## Tools

- `observatory_read`: read snapshot, collections, archive snapshots, or validation reports.
- `observatory_crud`: create, read, update, and delete one item with safe path patches.
- `observatory_validate`: validate structure, statuses, timestamps, map nodes, and line endpoints.
- `observatory_sweep_stale`: plan or apply stale consolidation into `archive[snapshotKey]`.
- `observatory_derive_map`: build a deterministic thread map with `thread-map-v1`.
- `observatory_publish_gate`: fail-closed exact-artifact approval gate; never sends.

All write-capable tools default to `dryRun:true`. A real write requires both `dryRun:false` and `confirm:true`, plus a public `reason` of at least three characters. The server performs no network calls.

## Run

```sh
npm start
```

The MCP server speaks JSON-RPC 2.0 over stdio. It reads `./data.js` by default; set `OBSERVATORY_DATA_FILE` to point at a different data file, or pass `file` in tool arguments. Tests use `fixtures/data.js` unless `OBSERVATORY_DATA_FILE` is set.

## View

```sh
npm run view
```

Serves the bundled dashboard at `http://127.0.0.1:4173/`. The view is bound to loopback only. It exposes `/data.js` from `OBSERVATORY_DATA_FILE`, falling back to `./data.js` and then `fixtures/data.js`. Set `OBSERVATORY_VIEW_PORT` to use another port. The view performs no outbound network calls.

## Check

```sh
npm run check
```

## Deterministic script

```sh
node scripts/derive-map.mjs threads.json
```

The script accepts a JSON array of threads or an object with a `threads` array and prints `thread-map-v1` output.

## License

MIT. See `LICENSE`.