Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
27 changes: 27 additions & 0 deletions configs/copilot/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
# GitHub Copilot & VS Code MCP Configuration Snippets

Ready-to-adapt MCP server configurations for [EbbMem](https://ebbmem.ai) in Visual Studio Code and the GitHub Copilot cloud agent / code review.

> **Untested live notice:** Placeholder URLs (`https://ebbmem.example.com`) are used throughout. Live testing against a deployed public HTTPS endpoint and Copilot cloud sandbox is tracked as a follow-up. No GitHub MCP Registry submission has been made.

## Files

| File | Target | Auth Mode |
| --- | --- | --- |
| [`vscode.mcp.json`](./vscode.mcp.json) | `.vscode/mcp.json` (VS Code workspace) | `X-API-Key` header via `${input:ebbmem_api_key}` prompt |
| [`vscode-oauth.mcp.json`](./vscode-oauth.mcp.json) | `.vscode/mcp.json` (VS Code workspace) | OAuth 2.1 (RFC 9728 discovery) |
| [`copilot-cloud-agent.mcp.json`](./copilot-cloud-agent.mcp.json) | GitHub repo Copilot coding agent settings (`mcpServers`) | `Authorization: Bearer $COPILOT_MCP_EBBMEM_API_KEY` |

## Copilot Cloud Agent & Code Review Requirements

1. **Repository settings placement:** Paste the contents of [`copilot-cloud-agent.mcp.json`](./copilot-cloud-agent.mcp.json) into **Repository Settings -> Copilot -> Coding agent -> MCP configuration** on GitHub.com (uses top-level `mcpServers`, unlike VS Code's `.vscode/mcp.json` `servers` key).
2. **`COPILOT_MCP_` secret prefix:** Create an agent secret in repository or environment settings whose name starts with `COPILOT_MCP_` (for example `COPILOT_MCP_EBBMEM_API_KEY`). Reference it via `$COPILOT_MCP_EBBMEM_API_KEY` inside `headers`. Never embed raw keys or query-string credentials (`?token=`, `?api_key=`).
3. **Tools allowlist (`core` tools only):** The snippet restricts `"tools"` to the six `/mcp/core` tools (`memory_remember`, `memory_recall`, `memory_reinforce`, `memory_forget`, `memory_context_pack`, `memory_status`), preventing access to `/mcp/admin` tools (`memory_dream`, `memory_reflect`, `memory_purge`).
4. **Tools only, no OAuth:** Copilot cloud agent consumes MCP **tools only** (not MCP resources or prompts) and does **not** support interactive OAuth flows — use an API-key header backed by a `COPILOT_MCP_` secret.
5. **Organization / enterprise policy:** An administrator must enable **`MCP servers in Copilot`** (`Organization Settings -> Copilot -> Policies` or `Enterprise AI controls -> MCP`) before Copilot clients or cloud agents can connect. Once enabled on a repository, Copilot cloud agent and code review execute allowlisted MCP tools autonomously without per-call human confirmation.
6. **GitHub MCP Registry:** Listing EbbMem in the GitHub MCP Registry requires explicit approval and is not included here.

## References

- [VS Code & GitHub Copilot Quickstart](../../docs/integrations/hosts/vscode-copilot.md)
- [Agent Instruction Pack](../../instructions/README.md)
20 changes: 20 additions & 0 deletions configs/copilot/copilot-cloud-agent.mcp.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
{
"mcpServers": {
"ebbmem": {
"type": "http",
"url": "https://ebbmem.example.com/mcp/core",
"headers": {
"Authorization": "Bearer $COPILOT_MCP_EBBMEM_API_KEY",
"X-Ebb-Namespace": "acme:u:alice"
},
"tools": [
"memory_remember",
"memory_recall",
"memory_reinforce",
"memory_forget",
"memory_context_pack",
"memory_status"
]
}
}
}
8 changes: 8 additions & 0 deletions configs/copilot/vscode-oauth.mcp.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"servers": {
"ebbmem": {
"type": "http",
"url": "https://ebbmem.example.com/mcp/core"
}
}
}
20 changes: 20 additions & 0 deletions configs/copilot/vscode.mcp.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
{
"servers": {
"ebbmem": {
"type": "http",
"url": "https://ebbmem.example.com/mcp/core",
"headers": {
"X-API-Key": "${input:ebbmem_api_key}",
"X-Ebb-Namespace": "acme:u:alice"
}
}
},
"inputs": [
{
"type": "promptString",
"id": "ebbmem_api_key",
"description": "EbbMem API key (sent via X-API-Key header)",
"password": true
}
]
}
29 changes: 29 additions & 0 deletions docs/integrations/hosts/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
# Host MCP Quickstarts

Remote [Streamable HTTP](https://modelcontextprotocol.io) quickstarts for connecting coding assistants and desktop clients to [EbbMem](https://ebbmem.ai).

> **Note:** Snippets in this directory use placeholder URLs (`https://ebbmem.example.com`) and have **not** been tested live against a public hosted endpoint yet. Live end-to-end verification is tracked as a follow-up once a reachable HTTPS deployment is available.

## Available Host Guides

| Host | Auth Variants | Guide |
| --- | --- | --- |
| **VS Code + GitHub Copilot** | OAuth 2.1, API key (`inputs`), Copilot cloud agent (`COPILOT_MCP_`) | [vscode-copilot.md](./vscode-copilot.md) |
| **Claude Code + Claude Desktop** | OAuth 2.1, API key (`--header` / stdio bridge) | [claude.md](./claude.md) |
| **Cursor** | OAuth 2.1, API key (`headers`), install deeplink | [cursor.md](./cursor.md) |

## MCP Endpoint Profiles & Security Rules

- **Endpoint profiles:**
- `/mcp/core` (**recommended default**): 6 core tools (`memory_remember`, `memory_recall`, `memory_reinforce`, `memory_forget`, `memory_context_pack`, `memory_status`).
- `/mcp/full`: 15 tools, adding `memory_search` / `memory_get` aliases, episodic timeline tools, and association/introspection tools.
- `/mcp/admin`: 18 tools, adding admin-gated maintenance tools (`memory_dream`, `memory_reflect`, `memory_purge`).
- **Header-only credentials:** Send keys and bearer tokens strictly in `Authorization: Bearer <token>` or `X-API-Key` headers, never in URL query strings.
- **Cognitive discipline:** `memory_recall` is strictly read-only. Memories decay over time unless reinforced; call `memory_reinforce` only for memories actually used in an answer or action, keeping `injected` (reinforce-all-shown) OFF by default.

## References

- [Repository Overview](../../../README.md)
- [Agent Instruction Pack](../../../instructions/README.md)
- [GitHub Copilot Config Snippets](../../../configs/copilot/README.md)
- [Conformance Kit](../../../conformance/README.md)
118 changes: 118 additions & 0 deletions docs/integrations/hosts/claude.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,118 @@
# Claude Code and Claude Desktop Integration Quickstart

Connect **Claude Code** (CLI / IDE) and **Claude Desktop** to [EbbMem](https://ebbmem.ai) over remote Streamable HTTP (`/mcp/core`), enabling read-only `recall`, secret-redacted `remember`, and explicit post-use `reinforce`.

> **Untested live notice:** All snippets below use placeholder URLs (`https://ebbmem.example.com`) and are derived from current Anthropic Claude Code and Claude Desktop documentation. Live end-to-end verification against a deployed public HTTPS endpoint is pending as a follow-up.

## What You Need

- **EbbMem endpoint:** A reachable EbbMem Streamable HTTP URL such as `https://ebbmem.example.com/mcp/core` (6 core tools — recommended default), `/mcp/full` (15 tools, adding `memory_search` / `memory_get` aliases and episodic/association tools), or `/mcp/admin` (18 tools, admin-gated).
- **Authentication:**
- **OAuth 2.1:** Supported natively by Claude Code (`/mcp` auth flow) and Claude Desktop Custom Connectors over public HTTPS (port 443).
- **API key (header-only):** `X-API-Key` or `Authorization: Bearer <token>`. Never place credentials in URL query parameters.
- **Namespace:** Target namespace such as `acme:u:alice` via `X-Ebb-Namespace` (avoid per-thread or per-turn namespaces).
- **Agent skill (recommended):** Copy [`instructions/claude-code/SKILL.md`](../../../instructions/claude-code/SKILL.md) to `.claude/skills/ebbmem/SKILL.md`, or install the local plugin bundle in `plugins/claude-code/` once available.

## Config Snippet

### Option A: Claude Code CLI — OAuth 2.1

Register the remote HTTP server without static headers and authenticate via `/mcp` inside Claude Code:

```bash
claude mcp add --transport http ebbmem https://ebbmem.example.com/mcp/core
```

Add `--scope project` to write a shareable `.mcp.json` file at your repository root:

```bash
claude mcp add --scope project --transport http ebbmem https://ebbmem.example.com/mcp/core
```

Verify connection status with `claude mcp list` and run `/mcp` inside a session to complete OAuth sign-in.

### Option B: Claude Code CLI — API Key (`--header`)

Pass the API key and namespace strictly via HTTP headers:

```bash
claude mcp add --transport http ebbmem https://ebbmem.example.com/mcp/core \
--header "X-API-Key: ${EBBMEM_API_KEY}" \
--header "X-Ebb-Namespace: acme:u:alice"
```

Equivalent project-scoped `.mcp.json`:

```json
{
"mcpServers": {
"ebbmem": {
"type": "http",
"url": "https://ebbmem.example.com/mcp/core",
"headers": {
"Authorization": "Bearer ${EBBMEM_API_KEY}",
"X-Ebb-Namespace": "acme:u:alice"
}
}
}
}
```

### Option C: Claude Desktop — Native Custom Connector (OAuth 2.1)

For publicly reachable HTTPS EbbMem servers (port `443`, reachable from Anthropic's connector infrastructure):

1. Open **Claude Desktop -> Settings -> Connectors** (or **Customize -> Connectors**).
2. Click **Add custom connector**.
3. Enter your server URL (`https://ebbmem.example.com/mcp/core`).
4. Optionally expand **Advanced settings** to supply an OAuth Client ID / Secret if your authorization server requires pre-registered credentials.
5. Click **Add**, then **Connect** to complete OAuth authorization.

### Option D: Claude Desktop — Local Bridge (`claude_desktop_config.json`, API Key)

If your server uses API-key headers rather than OAuth or is only reachable locally, bridge stdio to Streamable HTTP via `mcp-remote` in `claude_desktop_config.json` (`~/Library/Application Support/Claude/claude_desktop_config.json` on macOS, `%APPDATA%\Claude\claude_desktop_config.json` on Windows; requires Node.js 18+):

```json
{
"mcpServers": {
"ebbmem": {
"command": "npx",
"args": [
"-y",
"mcp-remote",
"https://ebbmem.example.com/mcp/core",
"--header",
"X-API-Key: ${EBBMEM_API_KEY}",
"--header",
"X-Ebb-Namespace: acme:u:alice"
]
}
}
}
```

Fully quit and restart Claude Desktop after editing `claude_desktop_config.json`.

> **Tip:** If you want automatic session-start recall, stop-time capture/reinforcement hooks, and the EbbMem skill bundled together for Claude Code, use the plugin package under `plugins/claude-code/`.

## First Memory in Under Five Steps

1. **Connect EbbMem:** Run `claude mcp add --transport http ...` (Claude Code) or add the Custom Connector / config block (Claude Desktop), and verify the server shows connected in `claude mcp list` or Connectors settings.
2. **Install the skill:** Place [`instructions/claude-code/SKILL.md`](../../../instructions/claude-code/SKILL.md) in `.claude/skills/ebbmem/SKILL.md` so Claude follows EbbMem decay and redaction rules.
3. **Remember a durable fact:** Ask Claude to remember a workspace decision or user preference with `memory_remember` (`tier: "semantic"`, never storing secrets or API keys).
4. **Recall before answering:** Start a new session and ask about that decision; confirm `memory_recall` retrieves it without mutating storage strength.
5. **Reinforce used memories:** Confirm Claude calls `memory_reinforce` (`memory_id`, `used_ids`, and `recall_id` when returned) only for memories actually used in the answer, keeping `injected` OFF.

## Troubleshooting

- **`400 Bad Request` on URL credentials:** Move any `token` or `api_key` out of the URL query string into `--header` / `headers` or OAuth bearer tokens.
- **Claude Desktop Custom Connector cannot reach the server:** Custom Connectors require a publicly reachable HTTPS endpoint on port `443` (not `127.0.0.1` or an internal VPN). Use Option D (`claude_desktop_config.json`) for local or header-key setups.
- **`claude mcp list` fails to authenticate:** Run `/mcp` inside an active Claude Code session to refresh OAuth login, or confirm `${EBBMEM_API_KEY}` is exported in the shell environment before starting Claude Code.
- **`404 Not Found` on namespace operations:** EbbMem returns `404` for unauthorized or non-existent namespaces; confirm `X-Ebb-Namespace` matches your credential scope.

## References

- [Host MCP Quickstarts](./README.md)
- [Claude Code Instruction Wrapper](../../../instructions/claude-code/SKILL.md)
- [Agent Instruction Pack](../../../instructions/README.md)
- [Conformance Kit](../../../conformance/README.md)
96 changes: 96 additions & 0 deletions docs/integrations/hosts/cursor.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,96 @@
# Cursor Integration Quickstart

Connect **Cursor** to [EbbMem](https://ebbmem.ai) over remote Streamable HTTP (`/mcp/core`), pairing MCP tools with the Cursor rule in [`instructions/cursor/ebbmem.mdc`](../../../instructions/cursor/ebbmem.mdc) for read-only `recall`, secret-redacted `remember`, and explicit post-use `reinforce`.

> **Untested live notice:** All snippets and deeplinks below use placeholder URLs (`https://ebbmem.example.com`) and are derived from current Cursor documentation. Live end-to-end verification against a deployed public HTTPS endpoint is pending as a follow-up.

## What You Need

- **EbbMem endpoint:** A reachable EbbMem Streamable HTTP endpoint such as `https://ebbmem.example.com/mcp/core` (6 core tools — recommended default), `/mcp/full` (15 tools, adding `memory_search` / `memory_get` aliases and episodic/association tools), or `/mcp/admin` (18 tools, admin-gated).
- **Authentication:**
- **OAuth 2.1:** Cursor discovers OAuth metadata via RFC 9728 (`WWW-Authenticate`) and opens a browser sign-in flow.
- **API key (header-only):** `X-API-Key` or `Authorization: Bearer <token>` in `.cursor/mcp.json` `headers` (never in URL query parameters).
- **Namespace:** Target namespace such as `acme:u:alice` via `X-Ebb-Namespace` (avoid per-thread or per-turn namespaces).
- **Cursor rules:** Copy [`instructions/cursor/ebbmem.mdc`](../../../instructions/cursor/ebbmem.mdc) to `.cursor/rules/ebbmem.mdc` (or use the Cursor plugin package in `plugins/cursor/`).

## Config Snippet

Cursor reads MCP servers from `.cursor/mcp.json` (project scope) or `~/.cursor/mcp.json` (user scope) using a top-level `"mcpServers"` object.

### Option A: Cursor `mcp.json` — OAuth 2.1

```json
{
"mcpServers": {
"ebbmem": {
"type": "http",
"url": "https://ebbmem.example.com/mcp/core"
}
}
}
```

#### One-Click Install Deeplink (OAuth 2.1)

Cursor deeplinks follow `cursor://anysphere.cursor-deeplink/mcp/install?name=<name>&config=<base64-encoded-json>`:

```text
cursor://anysphere.cursor-deeplink/mcp/install?name=ebbmem&config=eyJ0eXBlIjoiaHR0cCIsInVybCI6Imh0dHBzOi8vZWJibWVtLmV4YW1wbGUuY29tL21jcC9jb3JlIn0%3D
```

Decoded `config` payload: `{"type":"http","url":"https://ebbmem.example.com/mcp/core"}`.

### Option B: Cursor `mcp.json` — API Key (`headers`)

```json
{
"mcpServers": {
"ebbmem": {
"type": "http",
"url": "https://ebbmem.example.com/mcp/core",
"headers": {
"X-API-Key": "${env:EBBMEM_API_KEY}",
"X-Ebb-Namespace": "acme:u:alice"
}
}
}
}
```

#### One-Click Install Deeplink (API Key)

```text
cursor://anysphere.cursor-deeplink/mcp/install?name=ebbmem&config=eyJ0eXBlIjoiaHR0cCIsInVybCI6Imh0dHBzOi8vZWJibWVtLmV4YW1wbGUuY29tL21jcC9jb3JlIiwiaGVhZGVycyI6eyJYLUFQSS1LZXkiOiIke2VudjpFQkJNRU1fQVBJX0tFWX0iLCJYLUViYi1OYW1lc3BhY2UiOiJhY21lOnU6YWxpY2UifX0%3D
```

To generate a deeplink for your own host URL in Node.js or Python:

```bash
python -c 'import base64, json, urllib.parse; cfg = {"type": "http", "url": "https://ebbmem.example.com/mcp/core"}; b64 = base64.b64encode(json.dumps(cfg, separators=(",", ":")).encode()).decode(); print(f"cursor://anysphere.cursor-deeplink/mcp/install?name=ebbmem&config={urllib.parse.quote(b64, safe=\"\")}")'
```

### Add the Cursor Rule (`.cursor/rules/ebbmem.mdc`)

Copy [`instructions/cursor/ebbmem.mdc`](../../../instructions/cursor/ebbmem.mdc) into `.cursor/rules/ebbmem.mdc` in your project so Cursor Agent automatically recalls before answering, treats recalled text as untrusted data, redacts secrets, and reinforces only actually-used memories.

## First Memory in Under Five Steps

1. **Install the MCP server:** Click the Cursor deeplink above or save `.cursor/mcp.json`, then enable **ebbmem** in **Cursor Settings -> Tools & MCP**.
2. **Complete authentication:** Sign in via the OAuth prompt (Option A) or ensure `EBBMEM_API_KEY` is exported in your environment (Option B).
3. **Load the rule:** Confirm `.cursor/rules/ebbmem.mdc` appears active in **Cursor Settings -> Rules**.
4. **Store and recall:** Ask Cursor Agent to save a project preference with `memory_remember` (`tier: "semantic"`), then ask about it in a new Composer/Agent chat to trigger `memory_recall`.
5. **Verify reinforcement:** Confirm Cursor Agent calls `memory_reinforce` (`memory_id`, `used_ids`, and `recall_id` when returned) only on memories used in the answer, keeping `injected` OFF.

## Troubleshooting

- **`400 Bad Request` on URL credentials:** Never embed `?token=` or `?api_key=` in the `url` field; use `headers` or OAuth.
- **Deeplink fails to prompt:** Verify the `config` query parameter is valid Base64-encoded JSON (`type`, `url`, optional `headers`) and properly URL-encoded (`%3D` for `=`).
- **Rule not applied:** Ensure `.cursor/rules/ebbmem.mdc` retains its YAML frontmatter (`alwaysApply: true`).
- **`404 Not Found` on namespace calls:** Confirm `X-Ebb-Namespace` matches a namespace accessible to your credential.

## References

- [Host MCP Quickstarts](./README.md)
- [Cursor Instruction Rule](../../../instructions/cursor/ebbmem.mdc)
- [Agent Instruction Pack](../../../instructions/README.md)
- [Conformance Kit](../../../conformance/README.md)
Loading
Loading