{
  "markdown": "# june-mcp\n\n<!-- mcp-name: io.github.Junemind/june-mcp -->\n\n**Give your agent a memory.** `june-mcp` is the official [MCP](https://modelcontextprotocol.io)\nserver for [Junê](https://june.januraine.ai) — it connects any MCP host (Claude Desktop, Claude\nCode, and friends) to a June knowledge graph, so your agent can *ask*, *search*, and *remember*\nagainst a shared, cited, tenant-isolated memory.\n\nThis package is a thin, zero-logic connector: all retrieval, graph assembly, and answering happen\non the June endpoint you point it at. No engine code lives here — which is why it's small enough\nto read in one sitting.\n\n```\nClaude Desktop / Claude Code  ──stdio──▶  june-mcp  ──HTTPS──▶  your June endpoint\n                                                                 (graph · retrieval · answers)\n```\n\n## Install\n\n```bash\npip install june-mcp          # just the connector   (or: pipx install june-mcp)\npip install june-ai           # umbrella: june-mcp + june-bench (the benchmark suite)\npip install \"june-bench[mcp]\" # the bench, with the connector as an extra\n```\n\n## Point it at a June endpoint\n\n`june-mcp` speaks to any June service. Three ways to have one:\n\n1. **Junê desktop app (local-first).** Run the [Junê app](https://github.com/Junemind/June_releases)\n   and connect to its local engine — your files, graph, and keys stay on your machine.\n2. **Your own June service.** Pro/Team customers running the `june-local` engine package point\n   `JUNE_BASE_URL` at their own server.\n3. **Hosted (Team).** Point at your hosted June workspace endpoint with the API key from your\n   console.\n\n## Configure\n\nThe server is **fail-closed**: it refuses to start unless it knows where to connect and as whom,\nand tells you *everything* that's missing in one message (not one error at a time).\n\n| env | required | meaning |\n|---|---|---|\n| `JUNE_BASE_URL` | ✅ | Your June endpoint, e.g. `http://localhost:8000` |\n| `JUNE_CANVAS` | ✅ | The canvas (workspace) to bind this connection to — a **name** (`work`) or a canvas id. Names resolve to the id at startup; ambiguous names fail closed |\n| `JUNE_CANVAS_CREATE` | optional | `1` creates the named canvas on first run if it doesn't exist yet (refused in read-only mode) |\n| `JUNE_API_KEY` | ✅ | Your June API key (`JUNE_ALLOW_ANON=1` explicitly opts out for keyless local setups) |\n| `JUNE_LLM_KEY` | optional | **Bring-your-own LLM key** for cited answers — forwarded per-request as a header, never logged, never stored on the service |\n| `JUNE_READONLY` | optional | `1` hides + refuses all write tools (memory becomes read-only) |\n| `JUNE_FILES_ROOT` | optional | Opt-in directory agents may upload files from via `june_ingest_file` — unset ⇒ that tool doesn't exist |\n| `JUNE_TIMEOUT_READ` / `JUNE_TIMEOUT_ANSWER` | optional | Per-verb timeouts (defaults 15 s / 120 s) |\n| `JUNE_TOOL_CONCURRENCY` | optional | Max tool calls executing at once on this connection (default 8). Hosts pipeline requests over one stream; this is the explicit ceiling — excess calls queue, never stampede |\n| `JUNE_DOCS_CANVAS` | optional | Canvas holding the **agent docs** (standing instructions/skills — see *Agent memory* below). Default `agent_docs`; created on the first `june_doc_save` |\n| `JUNE_DOCS_REFRESH` | optional | `0` disables the periodic `standing_docs` digest (default **on** — it's the anti-forgetting safety net) |\n| `JUNE_DOCS_REFRESH_CALLS` / `JUNE_DOCS_REFRESH_MINUTES` | optional | Digest cadence: due every N tool calls (default 12) **or** M minutes (default 10), whichever comes first |\n| `JUNE_DOCS_DIGEST_CHARS` | optional | Serialized digest size cap (default 2000) |\n| `JUNE_EXPORT_ROOT` | optional | Opt-in repo directory the agent may **export** June pages/docs into as files (see *Repo sync* below) — unset ⇒ the three repo-sync tools don't exist |\n| `JUNE_EXPORT_GIT` | optional | `1` commits exactly the files each export wrote (pathspec-limited, **never pushes**) |\n| `JUNE_EXPORT_DIR` | optional | Agent-docs subtree inside the root (default `docs/agent`) |\n| `JUNE_LOG_LEVEL` | optional | Logging is stderr-only by design — stdout is the MCP wire |\n\n## Check it before your agent does\n\n```bash\nJUNE_BASE_URL=http://localhost:8000 JUNE_API_KEY=... JUNE_CANVAS=work june-mcp --doctor\n```\n\nThe doctor verifies, in order: config → service reachable → canvas resolution (your canvas\n*name* → its id, e.g. `name \"work\" → 9147bee6-…`) → search seam healthy → tool manifest, and\nprints PASS/FAIL per check with a mapped hint (e.g. a missing name lists the canvases that DO\nexist and points at `JUNE_CANVAS_CREATE=1`). The doctor exits `0` only when every check passes\n(`1` otherwise); the server itself exits `2` on a config error instead of starting half-wired.\nRun the doctor first; it catches every common misconfiguration before your agent ever sees the server.\n\n## Wire it into Claude\n\n**Claude Desktop** — merge into `claude_desktop_config.json` (Settings → Developer):\n\n```json\n{\n  \"mcpServers\": {\n    \"june\": {\n      \"command\": \"june-mcp\",\n      \"env\": {\n        \"JUNE_BASE_URL\": \"http://localhost:8000\",\n        \"JUNE_API_KEY\": \"your-key\",\n        \"JUNE_CANVAS\": \"work\",\n        \"JUNE_LLM_KEY\": \"your-llm-provider-key\"\n      }\n    }\n  }\n}\n```\n\n**Claude Code:**\n\n```bash\nclaude mcp add june -e JUNE_BASE_URL=http://localhost:8000 \\\n  -e JUNE_API_KEY=your-key -e JUNE_CANVAS=work \\\n  -e JUNE_LLM_KEY=your-llm-provider-key -- june-mcp\n```\n\nFully restart the host (Cmd+Q on macOS), then check the server shows **29 tools**\n(30 when you opt into `june_ingest_file` via `JUNE_FILES_ROOT`).\n\n## The tools\n\n| tool | what your agent gets |\n|---|---|\n| `june_answer` | A grounded, **cited** answer from the graph — abstains rather than guesses |\n| `june_search` | Ranked evidence for a query (supports multi-hop) |\n| `june_context` | An assembled context pack under a token budget |\n| `june_neighborhood` | The graph around one node |\n| `june_subgraph` | A bounded subgraph export |\n| `june_remember` | Write a fact/note into the graph (becomes retrievable + citable immediately) |\n| `june_ingest` | Structured node/edge ingestion |\n| `june_enumerate` | EVERY node matching a predicate — recall-complete \"list ALL X\" (not top-k) |\n| `june_ingest_file` | Upload one local file (pdf/docx/xlsx/csv/html/md/images/audio) from the operator-approved folder — *only exists when you set `JUNE_FILES_ROOT`* |\n| `june_enrich` | **Pro:** background re-extraction of the canvas with the richer engine (idempotent; job + poll; 403 on free) |\n| `june_resolve` | Maintenance: merge duplicate entities via reversible `same_as` edges (runs server-side; `strong_only=false` unlocks the semantic tier on Pro) |\n| `june_docs_refresh` / `june_doc_list` / `june_doc_get` | Read the agent's **standing docs** — full digest, registry listing, one doc's body |\n| `june_doc_save` / `june_doc_delete` / `june_learn` | Write them — create/replace a doc or skill, two-phase delete, append one dated lesson |\n\nDescriptions are written for the agent (what → when → returns), and every clamped input is\n*visibly* noted back to the agent instead of silently truncated.\n\n## Agent memory — docs, skills, and the anti-forgetting digest\n\nLong sessions forget: instructions an agent read at session start (its CLAUDE.md, your\nconventions) lose force thousands of tokens later. `june-mcp` fixes this structurally.\n\nAgents save **standing docs** into June — `kind='doc'` for durable instructions\n(`pinned=true` = always in effect), `kind='skill'` for named procedures with a one-line\n`when_to_use` trigger (bodies load lazily, like skills should), `kind='learnings'` for an\nappend-only dated log written via `june_learn`. Each doc is an **ordinary June page** in the\ndocs canvas (`JUNE_DOCS_CANVAS`, default `agent_docs`), marked by a small metadata block —\nso you can open your agent's memory in the Junê app, read it, and edit it; the agent picks\nyour edits up on its next refresh.\n\nThe anti-forgetting half: on the **first tool call of every session**, and then every\n12 calls or 10 minutes (tunable), the connector attaches a compact `standing_docs` digest to\nan ordinary tool result — pinned bodies in full, skill trigger lines, doc one-liners. Tool\nresults always re-enter the model's fresh context, so the instructions can't decay the way a\nsystem prompt does, in any MCP host, with no host cooperation. A digest that can't be built\n(service busy, canvas missing) is silently skipped — it never costs the carrying call\nanything. Set `JUNE_DOCS_REFRESH=0` to turn the digest off; the doc tools keep working.\n\n**June teaches agents how to use it — from inside itself.** The first save creates the docs\ncanvas and seeds **`agent-memory-guide`**: the operating manual (what belongs in the system\ncanvas vs a workstream canvas, the three kinds and when to use each, naming, what to pin,\nrevision discipline, repo sync). It's listed in every registry and digest, agents read it with\n`june_doc_get('agent-memory-guide')` whenever unsure — and it's an ordinary page, so edit it\nand your agents follow *your* version. Before anything is saved, empty states return a `setup`\nwalkthrough instead of a shrug, and the `june_memory_setup` prompt has the agent interview you\nand save your conventions as the first docs.\n\n## Making June automatic — the agent depends on it without being told\n\n\"Use June\" should never need saying. Three mechanisms stack to make usage automatic, each\ncovering the previous one's blind spot:\n\n1. **The host hook (closes the cold start).** A server can't speak until the agent's first\n   call — so install June's standing instructions into the file your host loads natively\n   every session:\n\n   ```bash\n   JUNE_EXPORT_ROOT=/path/to/project june-mcp --install-instructions            # → CLAUDE.md\n   JUNE_EXPORT_ROOT=/path/to/project june-mcp --install-instructions AGENTS.md  # other agents\n   ```\n\n   It's written as a managed section (your own content is never touched; re-runs update it in\n   place), and it puts the june-first posture — check June before claiming ignorance, remember\n   facts unprompted, learn lessons as they happen — into the system prompt itself.\n2. **Proactive tool descriptions (never decay).** The core verbs' descriptions tell the model\n   *when to reach for them unasked* — and descriptions are re-read on every single turn, in\n   every MCP host, with no cooperation needed.\n3. **The pinned `june-first` doc (re-asserts all session).** Seeded alongside the guide, it\n   rides every `standing_docs` digest, so the posture is repeated mid-session exactly where\n   long-context drift would otherwise erode it. Like everything seeded, it's an ordinary page —\n   edit it and your agents follow your version.\n\nWhat no MCP server can do — honestly — is force a host to act: an agent whose host hides\n`SERVER_INSTRUCTIONS` *and* has no instruction file *and* never makes one June call stays\ncold. Mechanism 1 exists precisely so that case never occurs in practice.\n\n## Repo sync — the repo stays current with what June knows\n\nOpt in with `JUNE_EXPORT_ROOT=<your repo>` and three more tools appear:\n\n| tool | what it does |\n|---|---|\n| `june_docs_export` | Mirror every agent doc to `docs/agent/<name>.md` — the repo always holds the current standing instructions |\n| `june_page_export` | Export any page to a managed file, **or** into a *managed section* spliced between markers inside an existing file (`path=KNOWHOW.md section=june-learnings`) — only the marked region is ever touched |\n| `june_page_import` | The reverse: edit an exported file in your editor and import it back into its June page — agent docs keep their identity, and a stale file is **refused** rather than allowed to clobber newer knowledge |\n\nSafety rules, all enforced in code and pinned by tests: every path is fenced inside the root\n(lexical `..` check **and** symlink resolution); a file not written by june-mcp is never\noverwritten; nothing is ever deleted; and with `JUNE_EXPORT_GIT=1` each export commits exactly\nthe files it wrote — pathspec-limited, so your staged work is never swept in, and **push never\nhappens**. Exported files carry frontmatter and are byte-deterministic, so an unchanged doc\nre-exports to an identical file and git stays quiet.\n\nThe manifest (`.june-export.json`) makes currency checkable — two CLI modes for CI:\n\n```bash\njune-mcp --export         # sync agent docs + every managed page/section, commit if enabled\njune-mcp --export-check   # write NOTHING; exit 1 if the repo has drifted from June\n```\n\n`--export-check` in CI turns \"are the docs up to date?\" from a hope into a failing build.\n\n## Free vs Pro — the `june-pro` tag\n\n`june-mcp` is one package for everyone; there is no separate \"pro build\". **Pro is a property\nof the endpoint**, not the connector: connect to a Pro-activated June (a Pro license in the\napp, a Pro key on a hosted workspace) and the same tools carry Pro-grade results: every\n`june_remember` and `june_ingest_file` write runs the richer entity/edge engines automatically\n(the result reports which `engine` ran), `june_resolve` upgrades to semantic matching, and\n`june_enrich` backfills memories that were written on the free floor before you upgraded. The\nterminal shows which world you're in: `--doctor` prints an `edition` line and the server's\nstartup banner tags the connection —\n\n```\njune-mcp: connected http://localhost:8000 canvas name \"work\" → 11d2… [june-pro]\n```\n\nThe tag is read from the service's own `/v1/whoami` (the same entitlement state that gates\nPro routes server-side), so it can't disagree with what you actually get — and it's\ndisplay-only: entitlements are enforced on the service no matter what any client prints.\nOlder services without `/v1/whoami` simply show no tag.\n\n## Security model\n\nThe tool surface exposes **no canvas/workspace parameter** — the workspace is bound server-side\nfrom your connection's context, fail-closed. A cross-tenant read isn't a permission check that\ncould fail open; it's *unrepresentable* from the client. `JUNE_READONLY=1` adds a second fence\nfor read-only deployments. Your BYO LLM key rides each answer request as a header and is never\npersisted or logged by the service.\n\n## Errors\n\nEvery upstream failure maps to a typed, redacted error payload (built from exception type +\nHTTP status only — never from response bodies), so the server survives anything the endpoint\nthrows and your agent sees a clean, actionable message.\n\n## License\n\nMIT. The Junê engine itself is a separate, closed-source product — this connector is the open\npart, by design.\n",
  "bytes": 14504,
  "sha": "aab6b0f6a00e8b16db6035296cba3176349b199a67755032bd9096f6630e207b",
  "repo_slug": "junemind/june-mcp",
  "fonte": "repo",
  "truncated": false,
  "api": "https://agentalog.com/api/listings/mcp_io_github_junemind_june_mcp_fee22fda/readme"
}