@remnic/replit 1.0.0 → 1.0.1
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.
- package/README.md +88 -0
- package/package.json +1 -1
package/README.md
ADDED
|
@@ -0,0 +1,88 @@
|
|
|
1
|
+
# @remnic/replit
|
|
2
|
+
|
|
3
|
+
MCP connector helper for using [Remnic](https://github.com/joshuaswarren/remnic) memory with [Replit Agent](https://replit.com/).
|
|
4
|
+
|
|
5
|
+
Replit Agent has no plugin system, so it can't install a Remnic hook like Claude Code or Codex can. Instead, this package takes a bearer token that you mint separately (`remnic token generate replit`) and produces the exact MCP server config + paste-ready setup instructions for Replit's **Integrations** pane, turning any Replit workspace into a Remnic memory client over HTTP + MCP.
|
|
6
|
+
|
|
7
|
+
## Install
|
|
8
|
+
|
|
9
|
+
```bash
|
|
10
|
+
pnpm add @remnic/replit
|
|
11
|
+
# or: npm i @remnic/replit
|
|
12
|
+
```
|
|
13
|
+
|
|
14
|
+
Needs a running Remnic server (see [`@remnic/server`](https://www.npmjs.com/package/@remnic/server)) or a `@remnic/cli`-managed daemon that exposes MCP on port 4318.
|
|
15
|
+
|
|
16
|
+
## Quick start
|
|
17
|
+
|
|
18
|
+
First mint a Replit-scoped token with the Remnic CLI:
|
|
19
|
+
|
|
20
|
+
```bash
|
|
21
|
+
remnic token generate replit
|
|
22
|
+
```
|
|
23
|
+
|
|
24
|
+
Then use the helper to render the setup instructions and MCP config:
|
|
25
|
+
|
|
26
|
+
```ts
|
|
27
|
+
import { generateReplitInstructions } from "@remnic/replit";
|
|
28
|
+
|
|
29
|
+
// Pass the token returned by `remnic token generate replit`:
|
|
30
|
+
const setup = generateReplitInstructions("YOUR_REMNIC_TOKEN");
|
|
31
|
+
|
|
32
|
+
console.log(setup.instructions);
|
|
33
|
+
// Paste setup.mcpConfig into Replit's Integrations > Add MCP server form.
|
|
34
|
+
```
|
|
35
|
+
|
|
36
|
+
`generateReplitInstructions(token, host?, port?)` returns:
|
|
37
|
+
|
|
38
|
+
```ts
|
|
39
|
+
interface ReplitInstallResult {
|
|
40
|
+
token: string;
|
|
41
|
+
instructions: string; // human-readable setup steps
|
|
42
|
+
mcpConfig: {
|
|
43
|
+
url: string; // http://{host}:{port}/mcp
|
|
44
|
+
headers: Record<string, string>; // Authorization + X-Engram-Client-Id
|
|
45
|
+
};
|
|
46
|
+
}
|
|
47
|
+
```
|
|
48
|
+
|
|
49
|
+
Defaults are `host="localhost"`, `port=4318`.
|
|
50
|
+
|
|
51
|
+
## Replit pane setup
|
|
52
|
+
|
|
53
|
+
Running `generateReplitInstructions` prints something like:
|
|
54
|
+
|
|
55
|
+
```
|
|
56
|
+
Replit Agent MCP Setup
|
|
57
|
+
======================
|
|
58
|
+
|
|
59
|
+
1. In your Replit workspace, open Integrations > Add MCP server
|
|
60
|
+
2. Enter URL: http://localhost:4318/mcp
|
|
61
|
+
3. Add headers:
|
|
62
|
+
- Authorization: Bearer <your-remnic-token>
|
|
63
|
+
- X-Engram-Client-Id: replit
|
|
64
|
+
4. Click Test & Save
|
|
65
|
+
```
|
|
66
|
+
|
|
67
|
+
A ready-to-paste snippet lives at `setup-snippet.json` in the package.
|
|
68
|
+
|
|
69
|
+
## Caveats
|
|
70
|
+
|
|
71
|
+
- For a **cloud** Replit workspace, the Remnic server has to be publicly reachable — via a tunnel (Cloudflare Tunnel, ngrok, Tailscale funnel), a public IP, or a reverse proxy. `localhost` only works for self-hosted Replit-likes.
|
|
72
|
+
- Replit has **no hook system**, so the agent must explicitly call Remnic MCP tools (`recall`, `observe`, `store`, `search`). Auto-recall before prompts isn't available the way it is on Claude Code, Codex, or OpenClaw. All 44 MCP tools are exposed.
|
|
73
|
+
- The token is a plain bearer token. Don't paste it into a Replit that you share with others unless each collaborator should have the same memory namespace.
|
|
74
|
+
|
|
75
|
+
## Agent note
|
|
76
|
+
|
|
77
|
+
If you're an AI agent scaffolding a Replit integration: call `generateReplitInstructions(token)` once you have a live Remnic token; don't hand-roll the MCP config (future protocol bumps will update this helper first).
|
|
78
|
+
|
|
79
|
+
## Related
|
|
80
|
+
|
|
81
|
+
- [`@remnic/cli`](https://www.npmjs.com/package/@remnic/cli) — daemon lifecycle + token minting
|
|
82
|
+
- [`@remnic/server`](https://www.npmjs.com/package/@remnic/server) — standalone HTTP + MCP server
|
|
83
|
+
- Connector guide: [docs/integration/connector-setup.md](https://github.com/joshuaswarren/remnic/blob/main/docs/integration/connector-setup.md) in the repo
|
|
84
|
+
- Source + issues: <https://github.com/joshuaswarren/remnic>
|
|
85
|
+
|
|
86
|
+
## License
|
|
87
|
+
|
|
88
|
+
MIT. See the root [LICENSE](https://github.com/joshuaswarren/remnic/blob/main/LICENSE) file.
|