june-mcp 0.1.0__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
june_mcp-0.1.0/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 Junemind
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
@@ -0,0 +1,179 @@
1
+ Metadata-Version: 2.4
2
+ Name: june-mcp
3
+ Version: 0.1.0
4
+ Summary: MCP server for Junê — give any MCP agent (Claude Desktop, Claude Code, …) a shared, cited knowledge-graph memory backed by a June endpoint.
5
+ Author-email: Junemind <access@januraine.ai>
6
+ License: MIT
7
+ Project-URL: Homepage, https://june.januraine.ai
8
+ Project-URL: Releases, https://github.com/Junemind/June_releases
9
+ Project-URL: Source, https://github.com/Junemind/june-mcp
10
+ Keywords: mcp,agent-memory,knowledge-graph,claude,context
11
+ Classifier: Development Status :: 4 - Beta
12
+ Classifier: Intended Audience :: Developers
13
+ Classifier: License :: OSI Approved :: MIT License
14
+ Classifier: Programming Language :: Python :: 3 :: Only
15
+ Classifier: Programming Language :: Python :: 3.11
16
+ Classifier: Programming Language :: Python :: 3.12
17
+ Classifier: Topic :: Scientific/Engineering :: Artificial Intelligence
18
+ Requires-Python: >=3.11
19
+ Description-Content-Type: text/markdown
20
+ License-File: LICENSE
21
+ Requires-Dist: httpx>=0.27
22
+ Requires-Dist: mcp<2,>=1.0
23
+ Provides-Extra: dev
24
+ Requires-Dist: pytest>=8; extra == "dev"
25
+ Requires-Dist: ruff>=0.4; extra == "dev"
26
+ Requires-Dist: anyio>=4; extra == "dev"
27
+ Dynamic: license-file
28
+
29
+ # june-mcp
30
+
31
+ **Give your agent a memory.** `june-mcp` is the official [MCP](https://modelcontextprotocol.io)
32
+ server for [Junê](https://june.januraine.ai) — it connects any MCP host (Claude Desktop, Claude
33
+ Code, and friends) to a June knowledge graph, so your agent can *ask*, *search*, and *remember*
34
+ against a shared, cited, tenant-isolated memory.
35
+
36
+ This package is a thin, zero-logic connector: all retrieval, graph assembly, and answering happen
37
+ on the June endpoint you point it at. No engine code lives here — which is why it's small enough
38
+ to read in one sitting.
39
+
40
+ ```
41
+ Claude Desktop / Claude Code ──stdio──▶ june-mcp ──HTTPS──▶ your June endpoint
42
+ (graph · retrieval · answers)
43
+ ```
44
+
45
+ ## Install
46
+
47
+ ```bash
48
+ pip install june-mcp # just the connector (or: pipx install june-mcp)
49
+ pip install june-ai # umbrella: june-mcp + june-bench (the benchmark suite)
50
+ pip install "june-bench[mcp]" # the bench, with the connector as an extra
51
+ ```
52
+
53
+ ## Point it at a June endpoint
54
+
55
+ `june-mcp` speaks to any June service. Three ways to have one:
56
+
57
+ 1. **Junê desktop app (local-first).** Run the [Junê app](https://github.com/Junemind/June_releases)
58
+ and connect to its local engine — your files, graph, and keys stay on your machine.
59
+ 2. **Your own June service.** Pro/Team customers running the `june-local` engine package point
60
+ `JUNE_BASE_URL` at their own server.
61
+ 3. **Hosted (Team).** Point at your hosted June workspace endpoint with the API key from your
62
+ console.
63
+
64
+ ## Configure
65
+
66
+ The server is **fail-closed**: it refuses to start unless it knows where to connect and as whom,
67
+ and tells you *everything* that's missing in one message (not one error at a time).
68
+
69
+ | env | required | meaning |
70
+ |---|---|---|
71
+ | `JUNE_BASE_URL` | ✅ | Your June endpoint, e.g. `http://localhost:8000` |
72
+ | `JUNE_CANVAS` | ✅ | The canvas (workspace) **UUID** to bind this connection to — must already exist |
73
+ | `JUNE_API_KEY` | ✅ | Your June API key (`JUNE_ALLOW_ANON=1` explicitly opts out for keyless local setups) |
74
+ | `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 |
75
+ | `JUNE_READONLY` | optional | `1` hides + refuses all write tools (memory becomes read-only) |
76
+ | `JUNE_FILES_ROOT` | optional | Opt-in directory agents may upload files from via `june_ingest_file` — unset ⇒ that tool doesn't exist |
77
+ | `JUNE_TIMEOUT_READ` / `JUNE_TIMEOUT_ANSWER` | optional | Per-verb timeouts (defaults 15 s / 120 s) |
78
+ | `JUNE_LOG_LEVEL` | optional | Logging is stderr-only by design — stdout is the MCP wire |
79
+
80
+ ## Check it before your agent does
81
+
82
+ ```bash
83
+ JUNE_BASE_URL=http://localhost:8000 JUNE_API_KEY=... JUNE_CANVAS=<uuid> june-mcp --doctor
84
+ ```
85
+
86
+ The doctor verifies, in order: config → service reachable → search seam healthy → tool manifest,
87
+ and prints PASS/FAIL per check with a mapped hint (e.g. a 404 tells you `JUNE_CANVAS` must be an
88
+ *existing* canvas id, and how to create one). The doctor exits `0` only when every check passes
89
+ (`1` otherwise); the server itself exits `2` on a config error instead of starting half-wired.
90
+ Run the doctor first; it catches every common misconfiguration before your agent ever sees the server.
91
+
92
+ ## Wire it into Claude
93
+
94
+ **Claude Desktop** — merge into `claude_desktop_config.json` (Settings → Developer):
95
+
96
+ ```json
97
+ {
98
+ "mcpServers": {
99
+ "june": {
100
+ "command": "june-mcp",
101
+ "env": {
102
+ "JUNE_BASE_URL": "http://localhost:8000",
103
+ "JUNE_API_KEY": "your-key",
104
+ "JUNE_CANVAS": "your-canvas-uuid",
105
+ "JUNE_LLM_KEY": "your-llm-provider-key"
106
+ }
107
+ }
108
+ }
109
+ }
110
+ ```
111
+
112
+ **Claude Code:**
113
+
114
+ ```bash
115
+ claude mcp add june -e JUNE_BASE_URL=http://localhost:8000 \
116
+ -e JUNE_API_KEY=your-key -e JUNE_CANVAS=your-canvas-uuid \
117
+ -e JUNE_LLM_KEY=your-llm-provider-key -- june-mcp
118
+ ```
119
+
120
+ Fully restart the host (Cmd+Q on macOS), then check the server shows **10 tools**
121
+ (11 when you opt into `june_ingest_file` via `JUNE_FILES_ROOT`).
122
+
123
+ ## The tools
124
+
125
+ | tool | what your agent gets |
126
+ |---|---|
127
+ | `june_answer` | A grounded, **cited** answer from the graph — abstains rather than guesses |
128
+ | `june_search` | Ranked evidence for a query (supports multi-hop) |
129
+ | `june_context` | An assembled context pack under a token budget |
130
+ | `june_neighborhood` | The graph around one node |
131
+ | `june_subgraph` | A bounded subgraph export |
132
+ | `june_remember` | Write a fact/note into the graph (becomes retrievable + citable immediately) |
133
+ | `june_ingest` | Structured node/edge ingestion |
134
+ | `june_enumerate` | EVERY node matching a predicate — recall-complete "list ALL X" (not top-k) |
135
+ | `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`* |
136
+ | `june_enrich` | **Pro:** background re-extraction of the canvas with the richer engine (idempotent; job + poll; 403 on free) |
137
+ | `june_resolve` | Maintenance: merge duplicate entities via reversible `same_as` edges (runs server-side; `strong_only=false` unlocks the semantic tier on Pro) |
138
+
139
+ Descriptions are written for the agent (what → when → returns), and every clamped input is
140
+ *visibly* noted back to the agent instead of silently truncated.
141
+
142
+ ## Free vs Pro — the `june-pro` tag
143
+
144
+ `june-mcp` is one package for everyone; there is no separate "pro build". **Pro is a property
145
+ of the endpoint**, not the connector: connect to a Pro-activated June (a Pro license in the
146
+ app, a Pro key on a hosted workspace) and the same tools carry Pro-grade results: every
147
+ `june_remember` and `june_ingest_file` write runs the richer entity/edge engines automatically
148
+ (the result reports which `engine` ran), `june_resolve` upgrades to semantic matching, and
149
+ `june_enrich` backfills memories that were written on the free floor before you upgraded. The
150
+ terminal shows which world you're in: `--doctor` prints an `edition` line and the server's
151
+ startup banner tags the connection —
152
+
153
+ ```
154
+ june-mcp: connected http://localhost:8000 canvas=11d2… [june-pro]
155
+ ```
156
+
157
+ The tag is read from the service's own `/v1/whoami` (the same entitlement state that gates
158
+ Pro routes server-side), so it can't disagree with what you actually get — and it's
159
+ display-only: entitlements are enforced on the service no matter what any client prints.
160
+ Older services without `/v1/whoami` simply show no tag.
161
+
162
+ ## Security model
163
+
164
+ The tool surface exposes **no canvas/workspace parameter** — the workspace is bound server-side
165
+ from your connection's context, fail-closed. A cross-tenant read isn't a permission check that
166
+ could fail open; it's *unrepresentable* from the client. `JUNE_READONLY=1` adds a second fence
167
+ for read-only deployments. Your BYO LLM key rides each answer request as a header and is never
168
+ persisted or logged by the service.
169
+
170
+ ## Errors
171
+
172
+ Every upstream failure maps to a typed, redacted error payload (built from exception type +
173
+ HTTP status only — never from response bodies), so the server survives anything the endpoint
174
+ throws and your agent sees a clean, actionable message.
175
+
176
+ ## License
177
+
178
+ MIT. The Junê engine itself is a separate, closed-source product — this connector is the open
179
+ part, by design.
@@ -0,0 +1,151 @@
1
+ # june-mcp
2
+
3
+ **Give your agent a memory.** `june-mcp` is the official [MCP](https://modelcontextprotocol.io)
4
+ server for [Junê](https://june.januraine.ai) — it connects any MCP host (Claude Desktop, Claude
5
+ Code, and friends) to a June knowledge graph, so your agent can *ask*, *search*, and *remember*
6
+ against a shared, cited, tenant-isolated memory.
7
+
8
+ This package is a thin, zero-logic connector: all retrieval, graph assembly, and answering happen
9
+ on the June endpoint you point it at. No engine code lives here — which is why it's small enough
10
+ to read in one sitting.
11
+
12
+ ```
13
+ Claude Desktop / Claude Code ──stdio──▶ june-mcp ──HTTPS──▶ your June endpoint
14
+ (graph · retrieval · answers)
15
+ ```
16
+
17
+ ## Install
18
+
19
+ ```bash
20
+ pip install june-mcp # just the connector (or: pipx install june-mcp)
21
+ pip install june-ai # umbrella: june-mcp + june-bench (the benchmark suite)
22
+ pip install "june-bench[mcp]" # the bench, with the connector as an extra
23
+ ```
24
+
25
+ ## Point it at a June endpoint
26
+
27
+ `june-mcp` speaks to any June service. Three ways to have one:
28
+
29
+ 1. **Junê desktop app (local-first).** Run the [Junê app](https://github.com/Junemind/June_releases)
30
+ and connect to its local engine — your files, graph, and keys stay on your machine.
31
+ 2. **Your own June service.** Pro/Team customers running the `june-local` engine package point
32
+ `JUNE_BASE_URL` at their own server.
33
+ 3. **Hosted (Team).** Point at your hosted June workspace endpoint with the API key from your
34
+ console.
35
+
36
+ ## Configure
37
+
38
+ The server is **fail-closed**: it refuses to start unless it knows where to connect and as whom,
39
+ and tells you *everything* that's missing in one message (not one error at a time).
40
+
41
+ | env | required | meaning |
42
+ |---|---|---|
43
+ | `JUNE_BASE_URL` | ✅ | Your June endpoint, e.g. `http://localhost:8000` |
44
+ | `JUNE_CANVAS` | ✅ | The canvas (workspace) **UUID** to bind this connection to — must already exist |
45
+ | `JUNE_API_KEY` | ✅ | Your June API key (`JUNE_ALLOW_ANON=1` explicitly opts out for keyless local setups) |
46
+ | `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 |
47
+ | `JUNE_READONLY` | optional | `1` hides + refuses all write tools (memory becomes read-only) |
48
+ | `JUNE_FILES_ROOT` | optional | Opt-in directory agents may upload files from via `june_ingest_file` — unset ⇒ that tool doesn't exist |
49
+ | `JUNE_TIMEOUT_READ` / `JUNE_TIMEOUT_ANSWER` | optional | Per-verb timeouts (defaults 15 s / 120 s) |
50
+ | `JUNE_LOG_LEVEL` | optional | Logging is stderr-only by design — stdout is the MCP wire |
51
+
52
+ ## Check it before your agent does
53
+
54
+ ```bash
55
+ JUNE_BASE_URL=http://localhost:8000 JUNE_API_KEY=... JUNE_CANVAS=<uuid> june-mcp --doctor
56
+ ```
57
+
58
+ The doctor verifies, in order: config → service reachable → search seam healthy → tool manifest,
59
+ and prints PASS/FAIL per check with a mapped hint (e.g. a 404 tells you `JUNE_CANVAS` must be an
60
+ *existing* canvas id, and how to create one). The doctor exits `0` only when every check passes
61
+ (`1` otherwise); the server itself exits `2` on a config error instead of starting half-wired.
62
+ Run the doctor first; it catches every common misconfiguration before your agent ever sees the server.
63
+
64
+ ## Wire it into Claude
65
+
66
+ **Claude Desktop** — merge into `claude_desktop_config.json` (Settings → Developer):
67
+
68
+ ```json
69
+ {
70
+ "mcpServers": {
71
+ "june": {
72
+ "command": "june-mcp",
73
+ "env": {
74
+ "JUNE_BASE_URL": "http://localhost:8000",
75
+ "JUNE_API_KEY": "your-key",
76
+ "JUNE_CANVAS": "your-canvas-uuid",
77
+ "JUNE_LLM_KEY": "your-llm-provider-key"
78
+ }
79
+ }
80
+ }
81
+ }
82
+ ```
83
+
84
+ **Claude Code:**
85
+
86
+ ```bash
87
+ claude mcp add june -e JUNE_BASE_URL=http://localhost:8000 \
88
+ -e JUNE_API_KEY=your-key -e JUNE_CANVAS=your-canvas-uuid \
89
+ -e JUNE_LLM_KEY=your-llm-provider-key -- june-mcp
90
+ ```
91
+
92
+ Fully restart the host (Cmd+Q on macOS), then check the server shows **10 tools**
93
+ (11 when you opt into `june_ingest_file` via `JUNE_FILES_ROOT`).
94
+
95
+ ## The tools
96
+
97
+ | tool | what your agent gets |
98
+ |---|---|
99
+ | `june_answer` | A grounded, **cited** answer from the graph — abstains rather than guesses |
100
+ | `june_search` | Ranked evidence for a query (supports multi-hop) |
101
+ | `june_context` | An assembled context pack under a token budget |
102
+ | `june_neighborhood` | The graph around one node |
103
+ | `june_subgraph` | A bounded subgraph export |
104
+ | `june_remember` | Write a fact/note into the graph (becomes retrievable + citable immediately) |
105
+ | `june_ingest` | Structured node/edge ingestion |
106
+ | `june_enumerate` | EVERY node matching a predicate — recall-complete "list ALL X" (not top-k) |
107
+ | `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`* |
108
+ | `june_enrich` | **Pro:** background re-extraction of the canvas with the richer engine (idempotent; job + poll; 403 on free) |
109
+ | `june_resolve` | Maintenance: merge duplicate entities via reversible `same_as` edges (runs server-side; `strong_only=false` unlocks the semantic tier on Pro) |
110
+
111
+ Descriptions are written for the agent (what → when → returns), and every clamped input is
112
+ *visibly* noted back to the agent instead of silently truncated.
113
+
114
+ ## Free vs Pro — the `june-pro` tag
115
+
116
+ `june-mcp` is one package for everyone; there is no separate "pro build". **Pro is a property
117
+ of the endpoint**, not the connector: connect to a Pro-activated June (a Pro license in the
118
+ app, a Pro key on a hosted workspace) and the same tools carry Pro-grade results: every
119
+ `june_remember` and `june_ingest_file` write runs the richer entity/edge engines automatically
120
+ (the result reports which `engine` ran), `june_resolve` upgrades to semantic matching, and
121
+ `june_enrich` backfills memories that were written on the free floor before you upgraded. The
122
+ terminal shows which world you're in: `--doctor` prints an `edition` line and the server's
123
+ startup banner tags the connection —
124
+
125
+ ```
126
+ june-mcp: connected http://localhost:8000 canvas=11d2… [june-pro]
127
+ ```
128
+
129
+ The tag is read from the service's own `/v1/whoami` (the same entitlement state that gates
130
+ Pro routes server-side), so it can't disagree with what you actually get — and it's
131
+ display-only: entitlements are enforced on the service no matter what any client prints.
132
+ Older services without `/v1/whoami` simply show no tag.
133
+
134
+ ## Security model
135
+
136
+ The tool surface exposes **no canvas/workspace parameter** — the workspace is bound server-side
137
+ from your connection's context, fail-closed. A cross-tenant read isn't a permission check that
138
+ could fail open; it's *unrepresentable* from the client. `JUNE_READONLY=1` adds a second fence
139
+ for read-only deployments. Your BYO LLM key rides each answer request as a header and is never
140
+ persisted or logged by the service.
141
+
142
+ ## Errors
143
+
144
+ Every upstream failure maps to a typed, redacted error payload (built from exception type +
145
+ HTTP status only — never from response bodies), so the server survives anything the endpoint
146
+ throws and your agent sees a clean, actionable message.
147
+
148
+ ## License
149
+
150
+ MIT. The Junê engine itself is a separate, closed-source product — this connector is the open
151
+ part, by design.
@@ -0,0 +1,49 @@
1
+ [build-system]
2
+ requires = ["setuptools>=68", "wheel"]
3
+ build-backend = "setuptools.build_meta"
4
+
5
+ [project]
6
+ name = "june-mcp"
7
+ version = "0.1.0"
8
+ description = "MCP server for Junê — give any MCP agent (Claude Desktop, Claude Code, …) a shared, cited knowledge-graph memory backed by a June endpoint."
9
+ readme = "README.md"
10
+ requires-python = ">=3.11"
11
+ license = { text = "MIT" }
12
+ authors = [{ name = "Junemind", email = "access@januraine.ai" }]
13
+ keywords = ["mcp", "agent-memory", "knowledge-graph", "claude", "context"]
14
+ classifiers = [
15
+ "Development Status :: 4 - Beta",
16
+ "Intended Audience :: Developers",
17
+ "License :: OSI Approved :: MIT License",
18
+ "Programming Language :: Python :: 3 :: Only",
19
+ "Programming Language :: Python :: 3.11",
20
+ "Programming Language :: Python :: 3.12",
21
+ "Topic :: Scientific/Engineering :: Artificial Intelligence",
22
+ ]
23
+ # Thin by design: the connector client (httpx) + the MCP runtime. No engine
24
+ # code lives in this package — it is a zero-logic client of a June endpoint.
25
+ dependencies = [
26
+ "httpx>=0.27",
27
+ "mcp>=1.0,<2",
28
+ ]
29
+
30
+ [project.urls]
31
+ Homepage = "https://june.januraine.ai"
32
+ Releases = "https://github.com/Junemind/June_releases"
33
+ Source = "https://github.com/Junemind/june-mcp"
34
+
35
+ [project.optional-dependencies]
36
+ dev = ["pytest>=8", "ruff>=0.4", "anyio>=4"]
37
+
38
+ [project.scripts]
39
+ june-mcp = "june_mcp.__main__:main"
40
+
41
+ [tool.setuptools.packages.find]
42
+ where = ["src"]
43
+
44
+ [tool.setuptools.package-dir]
45
+ "" = "src"
46
+
47
+ [tool.pytest.ini_options]
48
+ pythonpath = ["src"]
49
+ testpaths = ["tests"]
@@ -0,0 +1,4 @@
1
+ [egg_info]
2
+ tag_build =
3
+ tag_date = 0
4
+
@@ -0,0 +1,24 @@
1
+ """june_client — the official connector SDK for June AI.
2
+
3
+ A tiny HTTP client a connecting app installs to talk to a June AI service without
4
+ hand-rolling REST calls. It depends only on ``httpx`` — no sqlalchemy, no FastAPI,
5
+ nothing from the core — so any app can ``pip install june-ai[client]`` (or vendor
6
+ this module) regardless of its stack.
7
+
8
+ from june_client import JuneClient, node, edge
9
+
10
+ with JuneClient("https://june.example", api_key="june_sk_…") as june:
11
+ june.ingest(
12
+ nodes=[node("…id…", "entity", "Fix login bug", source_app="myapp")],
13
+ proposals=[edge("…src…", "entity", "…tgt…", "identity", "authored_by")],
14
+ )
15
+ g = june.graph()
16
+
17
+ A connector writes zero graph logic — it only says "here are my nodes and the
18
+ edges I propose"; June AI owns storage, bounding, ranking, revocation, serving.
19
+ """
20
+ from __future__ import annotations
21
+
22
+ from june_client.client import JuneClient, edge, node
23
+
24
+ __all__ = ["JuneClient", "node", "edge"]