@ekkos/mcp-server 1.0.0 → 1.2.2

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/CHANGELOG.md ADDED
@@ -0,0 +1,136 @@
1
+ # Changelog
2
+
3
+ All notable changes to the ekkOS Memory MCP Server will be documented in this file.
4
+
5
+ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
6
+ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
7
+
8
+ ## [1.1.0] - 2025-12-07
9
+
10
+ ### Added
11
+
12
+ - **Fallback Mechanism**: Direct Supabase queries when unified-context API fails
13
+ - **Improved Error Handling**: Better resilience for API connection issues
14
+ - **Enhanced Logging**: More detailed error messages and debugging output
15
+
16
+ ### Changed
17
+
18
+ - **API Integration**: Now uses unified-context API as primary path
19
+ - **Response Format**: Improved transformation of unified-context responses to MCP format
20
+ - **Tool Reliability**: Better handling of partial failures
21
+
22
+ ### Fixed
23
+
24
+ - **Connection Issues**: Fallback ensures tools remain functional even if API is down
25
+ - **Error Propagation**: Better error messages for debugging
26
+
27
+ ## [1.0.0] - 2025-12-05
28
+
29
+ ### Added
30
+
31
+ - Initial release of ekkOS Memory MCP Server
32
+ - MCP Protocol 2025-06-18 support
33
+ - Tools:
34
+ - `search_memory` - Query all memory layers
35
+ - `get_context` - Get unified context
36
+ - `capture_event` - Store learning episodes
37
+ - `forge_pattern` - Create new patterns
38
+ - `track_application` - Track pattern usage
39
+ - `record_outcome` - Record pattern outcomes
40
+ - `get_memory_stats` - Get system statistics
41
+ - HTTP/SSE transport support
42
+ - Cloud deployment support
43
+
44
+ ---
45
+
46
+ ## Version History
47
+
48
+ - `1.1.0` - Improved reliability with fallback mechanisms
49
+ - `1.0.0` - Initial release
50
+
51
+
52
+
53
+
54
+
55
+
56
+
57
+
58
+
59
+
60
+
61
+
62
+
63
+
64
+
65
+
66
+
67
+
68
+
69
+
70
+
71
+
72
+
73
+
74
+
75
+
76
+
77
+
78
+
79
+
80
+
81
+
82
+
83
+
84
+
85
+
86
+
87
+
88
+
89
+
90
+
91
+
92
+
93
+
94
+
95
+
96
+
97
+
98
+
99
+
100
+
101
+
102
+
103
+
104
+
105
+
106
+
107
+
108
+
109
+
110
+
111
+
112
+
113
+
114
+
115
+
116
+
117
+
118
+
119
+
120
+
121
+
122
+
123
+
124
+
125
+
126
+
127
+
128
+
129
+
130
+
131
+
132
+
133
+
134
+
135
+
136
+
package/PUBLISH.md ADDED
@@ -0,0 +1,125 @@
1
+ # Publishing @ekkos/mcp-server to npm
2
+
3
+ ## Pre-Publish Checklist
4
+
5
+ - [x] Package renamed to @ekkos/mcp-server
6
+ - [x] Version updated to 1.2.0
7
+ - [x] Built successfully
8
+ - [x] README updated
9
+ - [ ] npm login completed
10
+ - [ ] Published to npm
11
+ - [ ] Tested with npx
12
+
13
+ ## Publishing Steps
14
+
15
+ ### 1. Login to npm
16
+
17
+ ```bash
18
+ cd /Volumes/MacMiniPort/DEV/EKKOS/mcp-servers/ekkos-memory
19
+ npm login
20
+ ```
21
+
22
+ **Note:** You'll need to authenticate via browser. npm will open a login page.
23
+
24
+ ### 2. Publish Package
25
+
26
+ ```bash
27
+ npm publish --access public
28
+ ```
29
+
30
+ **Important:** Scoped packages (@ekkos/*) default to private. Use `--access public` to make it publicly available.
31
+
32
+ ### 3. Verify Publication
33
+
34
+ ```bash
35
+ npm view @ekkos/mcp-server
36
+ ```
37
+
38
+ Should show version 1.2.0 and package details.
39
+
40
+ ### 4. Test with npx
41
+
42
+ ```bash
43
+ npx -y @ekkos/mcp-server
44
+ ```
45
+
46
+ Should download and start the server (will fail without env vars, but that's expected).
47
+
48
+ ## Post-Publish
49
+
50
+ ### Update Documentation
51
+
52
+ - [ ] Update Windsurf integration guide
53
+ - [ ] Update Cursor integration guide
54
+ - [ ] Update platform dashboard wizard
55
+ - [ ] Add to ekkOS Connect extension templates
56
+
57
+ ### Test Configurations
58
+
59
+ **Windsurf:**
60
+ ```json
61
+ {
62
+ "mcpServers": {
63
+ "ekkos-memory": {
64
+ "command": "npx",
65
+ "args": ["-y", "@ekkos/mcp-server"],
66
+ "env": {
67
+ "EKKOS_API_KEY": "test_key",
68
+ "EKKOS_USER_ID": "test_user"
69
+ }
70
+ }
71
+ }
72
+ }
73
+ ```
74
+
75
+ **Cursor:**
76
+ ```json
77
+ {
78
+ "mcpServers": {
79
+ "ekkos-memory": {
80
+ "command": "npx",
81
+ "args": ["-y", "@ekkos/mcp-server"],
82
+ "env": {
83
+ "EKKOS_API_KEY": "test_key",
84
+ "EKKOS_USER_ID": "test_user"
85
+ }
86
+ }
87
+ }
88
+ }
89
+ ```
90
+
91
+ ## Troubleshooting
92
+
93
+ **"npm ERR! 402 Payment Required"**
94
+ - Scoped packages require paid account OR use `--access public`
95
+
96
+ **"npm ERR! 403 Forbidden"**
97
+ - Package name already taken
98
+ - Try alternate name or check npm account permissions
99
+
100
+ **"npm ERR! E401 Unauthorized"**
101
+ - Run `npm login` again
102
+ - Verify npm account is active
103
+
104
+ ## Package Contents
105
+
106
+ Verify what's included:
107
+ ```bash
108
+ npm pack --dry-run
109
+ ```
110
+
111
+ Should include:
112
+ - build/index.js (compiled server)
113
+ - package.json
114
+ - README.md
115
+ - tsconfig.json
116
+
117
+ Should NOT include:
118
+ - node_modules/
119
+ - src/ (only build artifacts)
120
+ - .git/
121
+
122
+ ---
123
+
124
+ **Status:** Ready to publish
125
+ **Waiting for:** npm login completion
package/README.md CHANGED
@@ -1,12 +1,29 @@
1
- # @ekkos/mcp-server
1
+ # ekkOS™ Memory MCP Server
2
2
 
3
- Stdio-to-SSE bridge for [ekkOS](https://ekkos.dev) Memory substrate. Enables AI tools like Claude Code and Cursor to access your persistent memory via the Model Context Protocol (MCP).
3
+ Give your AI agent (Claude, GPT-4, etc.) in Cursor, Windsurf, or VS Code a persistent memory. It remembers solutions, learns from mistakes, and gets smarter over time.
4
4
 
5
5
  ## Quick Start
6
6
 
7
- ### Claude Code
7
+ ### 1. Install
8
8
 
9
- Add to `~/.claude/settings.json`:
9
+ ```bash
10
+ npm install -g @ekkos/mcp-server
11
+ ```
12
+
13
+ ### 2. Get Your API Key
14
+
15
+ 1. Visit https://platform.ekkos.dev
16
+ 2. Sign in or create an account
17
+ 3. Copy your API key from the dashboard
18
+ 4. Copy your User ID from your profile
19
+
20
+ ### 3. Configure Your IDE
21
+
22
+ **For Cursor:** Add to `~/.cursor/mcp.json`
23
+
24
+ **For Windsurf:** Add to `~/.codeium/windsurf/mcp_config.json`
25
+
26
+ **For Claude Code:** Add to `~/.claude_code/mcp.json`
10
27
 
11
28
  ```json
12
29
  {
@@ -15,109 +32,281 @@ Add to `~/.claude/settings.json`:
15
32
  "command": "npx",
16
33
  "args": ["-y", "@ekkos/mcp-server"],
17
34
  "env": {
18
- "EKKOS_API_KEY": "your_api_key_here"
35
+ "EKKOS_API_KEY": "your-api-key-here",
36
+ "EKKOS_USER_ID": "your-user-id-here"
19
37
  }
20
38
  }
21
39
  }
22
40
  }
23
41
  ```
24
42
 
25
- ### Cursor
43
+ ### 4. Restart Your IDE
26
44
 
27
- Add to `.cursor/mcp.json` in your project:
45
+ The MCP server will be available in all chat sessions. Your AI can now remember!
46
+
47
+ ## How It Works
48
+
49
+ Your AI agent can now access a 10-layer memory system that stores:
50
+
51
+ - **Patterns** - Proven solutions that worked
52
+ - **Conversations** - Past discussions and problem-solving sessions
53
+ - **Directives** - Rules your AI must follow (MUST/NEVER/PREFER/AVOID)
54
+ - **Codebase** - Semantic search across your project
55
+ - **And more** - Episodic memory, procedural workflows, collective knowledge
56
+
57
+ When you ask a question, your AI searches this memory first, finds relevant solutions, and applies them automatically.
58
+
59
+ ## Core Tools
60
+
61
+ ### `search_memory` 🔍
62
+
63
+ **What it does:** Searches all your memory layers to find relevant patterns, solutions, and past conversations.
64
+
65
+ **When to use:** Your AI calls this automatically before answering technical questions. It's the primary way your AI remembers.
66
+
67
+ **Example:**
28
68
 
29
- ```json
30
- {
31
- "mcpServers": {
32
- "ekkos-memory": {
33
- "command": "npx",
34
- "args": ["-y", "@ekkos/mcp-server"],
35
- "env": {
36
- "EKKOS_API_KEY": "your_api_key_here"
37
- }
38
- }
39
- }
40
- }
41
69
  ```
70
+ You: "How did we fix the auth timeout issue?"
42
71
 
43
- ### Get Your API Key
72
+ AI: [Searches memory automatically]
73
+ "Found it! We used the auth-timeout-mitigation pattern
74
+ from last week. Here's the solution..."
75
+ ```
44
76
 
45
- 1. Go to [platform.ekkos.dev](https://platform.ekkos.dev)
46
- 2. Sign up or log in
47
- 3. Navigate to **Settings → API Keys**
48
- 4. Click **"Generate New Key"**
77
+ **What you get back:**
49
78
 
50
- ## Environment Variables
79
+ - Relevant patterns with success rates
80
+ - Past conversations about similar problems
81
+ - Code examples that worked
82
+ - Solutions sorted by how well they worked
51
83
 
52
- | Variable | Required | Description |
53
- |----------|----------|-------------|
54
- | `EKKOS_API_KEY` | ✅ Yes | Your ekkOS API key from platform.ekkos.dev |
55
- | `EKKOS_USER_ID` | ❌ No | Your user ID (optional, for better tracking) |
56
- | `EKKOS_MCP_URL` | ❌ No | Custom MCP gateway URL (default: https://mcp.ekkos.dev/api/v1/mcp/sse) |
57
- | `EKKOS_DEBUG` | ❌ No | Set to `true` for debug logs |
84
+ ---
58
85
 
59
- ## How It Works
86
+ ### `forge_pattern` 🔥
87
+
88
+ **What it does:** Saves a solution that worked as a reusable pattern. Future AI agents (including yourself) will find it automatically.
89
+
90
+ **When to use:** After you solve a problem, fix a bug, or discover a better approach. Your AI should call this automatically, but you can also trigger it.
91
+
92
+ **Example:**
93
+
94
+ ```
95
+ AI: [After fixing a bug]
96
+ "I've saved this solution as a pattern. Next time we
97
+ encounter this issue, I'll remember the fix instantly."
98
+ ```
99
+
100
+ **What happens:**
101
+
102
+ - Pattern is stored in memory
103
+ - Becomes searchable immediately
104
+ - Success rate tracked over time
105
+ - Automatically suggested for similar problems
106
+
107
+ ---
108
+
109
+ ### `forge_directive` 📜
110
+
111
+ **What it does:** Creates a rule your AI must follow. These are MUST/NEVER/PREFER/AVOID rules that guide behavior.
112
+
113
+ **When to use:** When you want to establish permanent rules for how your AI should behave.
114
+
115
+ **Example:**
116
+
117
+ ```
118
+ You: "Always use TypeScript strict mode"
119
+
120
+ AI: [Creates directive]
121
+ "Rule saved. I'll always use strict mode going forward."
122
+ ```
123
+
124
+ **Types of rules:**
125
+
126
+ - **MUST** - Always do this (highest priority)
127
+ - **NEVER** - Never do this (high priority)
128
+ - **PREFER** - Prefer this approach (medium priority)
129
+ - **AVOID** - Try to avoid this (lower priority)
130
+
131
+ **What happens:**
132
+
133
+ - Rule is enforced in all future interactions
134
+ - AI checks against rules before taking actions
135
+ - Rules can be project-specific or global
136
+
137
+ ---
138
+
139
+ ### `recall_conversation` 💬
140
+
141
+ **What it does:** Finds past conversations about a topic, even from days or weeks ago.
142
+
143
+ **When to use:** When you want to remember what you discussed before, or check if you've already solved a problem.
144
+
145
+ **Example:**
60
146
 
61
- This package creates a bridge between:
62
- - **Stdio transport** (used by AI tools like Claude Code)
63
- - **SSE transport** (used by ekkOS cloud memory substrate)
147
+ ```
148
+ You: "What did we decide about the database schema?"
149
+
150
+ AI: [Searches past conversations]
151
+ "We discussed this 2 weeks ago. You decided to use
152
+ PostgreSQL with JSONB for flexible fields..."
153
+ ```
154
+
155
+ **What you get back:**
156
+
157
+ - Relevant excerpts from past conversations
158
+ - Context about decisions made
159
+ - Solutions you've tried before
160
+ - Semantic matches (finds related topics, not just keywords)
161
+
162
+ ---
163
+
164
+ ### `check_conflict` ⚖️
165
+
166
+ **What it does:** Validates an action against your rules and patterns before executing it. Prevents your AI from doing something that violates your preferences.
167
+
168
+ **When to use:** Before executing destructive operations, deploying changes, or modifying critical configs.
169
+
170
+ **Example:**
171
+
172
+ ```
173
+ AI: [Before deleting files]
174
+ "I want to delete /tmp files. Let me check if this
175
+ violates any rules..."
176
+
177
+ [Checks conflicts]
178
+ "⚠️ CONFLICT: This violates NEVER rule: 'Never delete
179
+ files without user confirmation'. I'll ask first."
180
+ ```
181
+
182
+ **What you get back:**
183
+
184
+ - List of violated rules (if any)
185
+ - Conflicting patterns
186
+ - Recommendations to proceed safely
187
+ - Clear explanation of why it conflicts
188
+
189
+ ---
190
+
191
+ ## How to Use It Day-to-Day
192
+
193
+ ### When Starting Work
194
+
195
+ Your AI automatically searches memory when you ask questions. You don't need to do anything special - just ask:
196
+
197
+ ```
198
+ You: "Fix the authentication bug"
199
+ AI: [Searches memory] "Found 3 solutions from past work..."
200
+ ```
201
+
202
+ ### When Solving Problems
203
+
204
+ After your AI solves something, it should automatically save it as a pattern:
205
+
206
+ ```
207
+ AI: [After fixing bug]
208
+ "Solution saved. Future agents will find this automatically."
209
+ ```
64
210
 
65
- When your AI tool starts the MCP server, this bridge:
66
- 1. Connects to ekkOS cloud via SSE using your API key
67
- 2. Exposes a stdio interface for your AI tool
68
- 3. Forwards all MCP messages between stdio and SSE
69
- 4. Handles authentication, reconnection, and error handling
211
+ If it doesn't, you can remind it:
70
212
 
71
- ## Available Memory Tools
213
+ ```
214
+ You: "Save this solution as a pattern"
215
+ ```
216
+
217
+ ### When Setting Rules
218
+
219
+ Tell your AI what you want it to always/never do:
220
+
221
+ ```
222
+ You: "Never use `any` type in TypeScript"
223
+ AI: [Creates directive] "Rule saved. I'll avoid `any` going forward."
224
+ ```
72
225
 
73
- Once connected, your AI will have access to these ekkOS memory tools:
226
+ ### When Checking Past Work
74
227
 
75
- ### The 5 Verbs
76
- - `ekko` - Search memory for patterns and solutions
77
- - `crystallize` - Save important decisions permanently
78
- - `reflex` - Validate suggestions against your history
79
- - `trace` - Explain why a suggestion was made
80
- - `consolidate` - Get summary of recent memory activity
228
+ Ask about past conversations:
81
229
 
82
- ### Core Operations
83
- - `search_memory` - Search across all 10 memory layers
84
- - `forge_pattern` - Create new patterns from learnings
85
- - `forge_directive` - Set MUST/NEVER/PREFER/AVOID rules
86
- - `get_context` - Get relevant context for a task
87
- - `recall_conversation` - Recall what was discussed at a specific time
88
- - `search_codebase` - Search project code embeddings
230
+ ```
231
+ You: "What did we decide about the API structure?"
232
+ AI: [Searches conversations] "We discussed this last week..."
233
+ ```
234
+
235
+ ## The Golden Loop
236
+
237
+ ekkOS uses a continuous learning cycle that makes your AI smarter:
89
238
 
90
- ### Golden Loop Tracking
91
- - `track_application` - Track when memories are applied
92
- - `record_outcome` - Record if applied memories helped
93
- - `detect_usage` - Auto-detect pattern usage via semantic similarity
94
- - `check_conflict` - Check for conflicts with directives
239
+ 1. **Retrieve** - `search_memory` finds relevant patterns
240
+ 2. **Apply** - AI uses patterns to solve problems
241
+ 3. **Measure** - System tracks if solutions worked
242
+ 4. **Learn** - `forge_pattern` saves new solutions
95
243
 
96
- [See full MCP tools reference](https://docs.ekkos.dev/api-reference/mcp-tools)
244
+ This creates a self-improving system. Every problem solved makes future problems easier.
97
245
 
98
246
  ## Troubleshooting
99
247
 
100
- ### "EKKOS_API_KEY environment variable is required"
101
- You need to set your API key in the MCP config. Get one at [platform.ekkos.dev](https://platform.ekkos.dev/dashboard/settings/api-keys).
248
+ ### MCP Server Not Appearing
249
+
250
+ - Make sure Node.js 18+ is installed
251
+ - Check your API key is correct in the config file
252
+ - Restart your IDE after adding the config
253
+ - Check IDE logs for connection errors
254
+
255
+ ### No Patterns Found
256
+
257
+ - You need to forge some patterns first (solve problems and save them)
258
+ - Check your API key has access to your memory
259
+ - Make sure `EKKOS_USER_ID` is set for user-scoped patterns
102
260
 
103
- ### MCP server not loading
104
- 1. Check Node.js version: `node --version` (must be 18+)
105
- 2. Verify config JSON is valid
106
- 3. Try running manually: `EKKOS_API_KEY=xxx npx @ekkos/mcp-server`
107
- 4. Enable debug mode: `EKKOS_DEBUG=true` in env
261
+ ### Authentication Errors
108
262
 
109
- ### Connection errors
110
- 1. Check your internet connection
111
- 2. Verify API key is correct and active
112
- 3. Check https://status.ekkos.dev for service status
263
+ - Verify your API key at https://platform.ekkos.dev
264
+ - Check the key hasn't expired
265
+ - Make sure the key has correct permissions
113
266
 
114
- ## Support
267
+ ## What Gets Stored
115
268
 
116
- - 📚 [Documentation](https://docs.ekkos.dev)
117
- - 💬 [Discord Community](https://discord.gg/ekkos)
118
- - 🐛 [Report Issues](https://github.com/ekkos-ai/ekkos/issues)
119
- - 📧 [Email Support](mailto:support@ekkos.dev)
269
+ Your memory includes:
270
+
271
+ - **Patterns** - Solutions that worked, with success rates
272
+ - **Conversations** - Past discussions, searchable semantically
273
+ - **Directives** - Rules your AI follows (MUST/NEVER/PREFER/AVOID)
274
+ - **Codebase** - Semantic search across your project files
275
+ - **Episodic** - Problem-solving sessions and workflows
276
+ - **Procedural** - Step-by-step processes that worked
277
+ - **Collective** - Knowledge shared across AI agents
278
+ - **Code** - Code embeddings for finding similar code
279
+
280
+ All of this is searchable instantly when your AI needs it.
281
+
282
+ ## Example Workflow
283
+
284
+ ```
285
+ 1. You: "Fix the login bug"
286
+
287
+ 2. AI: [Calls search_memory("login bug fix")]
288
+ "Found 2 patterns from past work. Applying the
289
+ highest-success solution..."
290
+
291
+ 3. AI: [Fixes bug using pattern]
292
+ "Fixed! This solution has worked 8 times before."
293
+
294
+ 4. AI: [Calls forge_pattern automatically]
295
+ "Saved this fix as a pattern for next time."
296
+
297
+ 5. Next time: AI remembers instantly and applies the fix
298
+ ```
299
+
300
+ ## Related
301
+
302
+ - **Platform Dashboard**: https://platform.ekkos.dev
303
+ - **Documentation**: https://docs.ekkos.dev
304
+ - **GitHub**: https://github.com/ekkos-ai/ekkos
120
305
 
121
306
  ## License
122
307
 
123
- MIT License - see [LICENSE](LICENSE) for details
308
+ MIT
309
+
310
+ ---
311
+
312
+ **ekkOS™** - The memory substrate for AI agents. Making AI smarter, one pattern at a time. 🧠♾️
@@ -0,0 +1,15 @@
1
+ #!/usr/bin/env node
2
+ /**
3
+ * ekkOS™ Memory MCP Server
4
+ *
5
+ * Provides AI agents (Claude, GPT-4, etc.) in Cursor, Windsurf, VS Code, and Claude Code
6
+ * with direct access to ekkOS's 10-layer memory architecture:
7
+ * - Layer 1-10 memory systems (working, episodic, semantic, patterns, procedural, collective, meta, codebase, directives, conflicts)
8
+ * - Unified context retrieval via Memory Orchestrator
9
+ * - Pattern search and forging (Golden Loop)
10
+ * - Knowledge graph queries (Graphiti/Neo4j)
11
+ * - Behavioral directives (MUST/NEVER/PREFER/AVOID)
12
+ *
13
+ * This bridges the gap between ekkOS's built memory infrastructure and AI agent access.
14
+ */
15
+ export {};