@ekkos/mcp-server 1.0.0 → 1.2.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/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,123 +1,231 @@
1
- # @ekkos/mcp-server
1
+ # Echo 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
+ Provides Claude (in Cursor) with direct access to Echo's memory systems.
4
4
 
5
- ## Quick Start
5
+ ## What This Does
6
6
 
7
- ### Claude Code
7
+ Bridges the gap between Echo's built memory infrastructure and AI agent access during conversations.
8
8
 
9
- Add to `~/.claude/settings.json`:
9
+ ### Memory Systems Exposed
10
10
 
11
- ```json
12
- {
13
- "mcpServers": {
14
- "ekkos-memory": {
15
- "command": "npx",
16
- "args": ["-y", "@ekkos/mcp-server"],
17
- "env": {
18
- "EKKOS_API_KEY": "your_api_key_here"
19
- }
20
- }
21
- }
22
- }
11
+ 1. **Semantic Search** (REFLEX_LOG.md patterns)
12
+ - Fast BM25 + embedding search
13
+ - Proven patterns and solutions
14
+ - Implementation examples
15
+
16
+ 2. **Knowledge Graph** (Graphiti/Neo4j)
17
+ - Permanent preferences
18
+ - Established patterns
19
+ - Semantic relationships
20
+ - Forever memory
21
+
22
+ 3. **Recent Signals** (asi_signals table)
23
+ - User corrections
24
+ - Pattern applications
25
+ - Recent failures
26
+ - Last 72h activity
27
+
28
+ 4. **Auto-Scan Directives**
29
+ - MUST/NEVER/PREFER/AVOID rules
30
+ - Derived from both short-term + long-term memory
31
+ - Updated in real-time
32
+
33
+ ## Tools Available
34
+
35
+ ### `search_memory`
36
+ Search all memory systems at once.
37
+
38
+ ```typescript
39
+ search_memory({
40
+ query: "auth loop fix",
41
+ limit: 10,
42
+ sources: ["all"] // or ["patterns", "graph", "signals"]
43
+ })
44
+ ```
45
+
46
+ **Returns**: Combined results from patterns, knowledge graph, and signals.
47
+
48
+ ### `get_directives`
49
+ Get current behavioral directives from auto-scan.
50
+
51
+ ```typescript
52
+ get_directives({
53
+ userId: "system",
54
+ windowHours: 72
55
+ })
56
+ ```
57
+
58
+ **Returns**: MUST/NEVER/PREFER/AVOID + permanent knowledge + hot patterns.
59
+
60
+ ### `recall_pattern`
61
+ Get full details on a specific pattern.
62
+
63
+ ```typescript
64
+ recall_pattern({
65
+ pattern: "auth-timeout-mitigation"
66
+ })
23
67
  ```
24
68
 
25
- ### Cursor
69
+ **Returns**: Pattern description, implementation, examples, success rate.
70
+
71
+ ### `query_signals`
72
+ Query recent learning signals by type.
73
+
74
+ ```typescript
75
+ query_signals({
76
+ signalType: "user_correction_observed",
77
+ hours: 24,
78
+ limit: 20
79
+ })
80
+ ```
26
81
 
27
- Add to `.cursor/mcp.json` in your project:
82
+ **Returns**: Recent signals of the specified type.
83
+
84
+ ### `search_knowledge_graph`
85
+ Search Graphiti knowledge graph directly.
86
+
87
+ ```typescript
88
+ search_knowledge_graph({
89
+ query: "gateway routing preference",
90
+ searchType: "nodes", // or "facts" or "both"
91
+ limit: 10
92
+ })
93
+ ```
94
+
95
+ **Returns**: Semantic nodes/facts from permanent memory.
96
+
97
+ ## Installation
98
+
99
+ ### 1. Install Dependencies
100
+
101
+ ```bash
102
+ cd mcp-servers/echo-memory
103
+ npm install
104
+ npm run build
105
+ ```
106
+
107
+ ### 2. Configure Cursor
108
+
109
+ Add to your Cursor settings (`.cursor/mcp_settings.json` or global settings):
28
110
 
29
111
  ```json
30
112
  {
31
113
  "mcpServers": {
32
- "ekkos-memory": {
33
- "command": "npx",
34
- "args": ["-y", "@ekkos/mcp-server"],
114
+ "echo-memory": {
115
+ "command": "node",
116
+ "args": [
117
+ "/Volumes/MacMiniPort/DEV/echo/mcp-servers/echo-memory/build/index.js"
118
+ ],
35
119
  "env": {
36
- "EKKOS_API_KEY": "your_api_key_here"
120
+ "ECHO_API_URL": "http://localhost:3000",
121
+ "ECHO_API_KEY": "your-api-key-here"
37
122
  }
38
123
  }
39
124
  }
40
125
  }
41
126
  ```
42
127
 
43
- ### Get Your API Key
128
+ ### 3. Restart Cursor
129
+
130
+ The MCP server will be available in all Cursor chat sessions.
131
+
132
+ ## Usage in Cursor
133
+
134
+ Once configured, Claude can use these tools during conversations:
135
+
136
+ ```
137
+ You: "How did we fix the auth timeout issue?"
138
+
139
+ Claude: [Calls search_memory("auth timeout fix")]
140
+ "Found it! We used the auth-timeout-mitigation pattern
141
+ from Oct 15. Here's the solution..."
142
+ ```
44
143
 
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"**
144
+ **Instant pattern recall** during active development! ⚡
49
145
 
50
- ## Environment Variables
146
+ ## Configuration
51
147
 
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 |
148
+ ### Environment Variables
58
149
 
59
- ## How It Works
150
+ - `ECHO_API_URL`: Echo API base URL (default: `http://localhost:3000`)
151
+ - `ECHO_API_KEY`: API key for authentication (optional, for production)
60
152
 
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)
153
+ ### Development
64
154
 
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
155
+ ```bash
156
+ # Watch mode (rebuilds on changes)
157
+ npm run watch
70
158
 
71
- ## Available Memory Tools
159
+ # Test the server
160
+ node build/index.js
161
+ ```
72
162
 
73
- Once connected, your AI will have access to these ekkOS memory tools:
163
+ ## Architecture
74
164
 
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
165
+ ```
166
+ ┌─────────────────────────────────────────────────────────┐
167
+ │ Claude in Cursor │
168
+ └───────────────────┬─────────────────────────────────────┘
169
+
170
+ ┌─────────────────────────────────────────────────────────┐
171
+ │ Echo Memory MCP Server │
172
+ │ • search_memory │
173
+ │ • get_directives │
174
+ │ • recall_pattern │
175
+ │ • query_signals │
176
+ │ • search_knowledge_graph │
177
+ └───────────────────┬─────────────────────────────────────┘
178
+
179
+ ┌─────────────────────────────────────────────────────────┐
180
+ │ Echo API (localhost:3000) │
181
+ │ ├─ /api/asi/semantic-search (REFLEX_LOG) │
182
+ │ ├─ /api/asi/scan (Auto-Scan) │
183
+ │ ├─ /api/graphiti (Knowledge Graph) │
184
+ │ └─ /api/asi/log-signal (Signals) │
185
+ └───────────────────┬─────────────────────────────────────┘
186
+
187
+ ┌─────────────────────────────────────────────────────────┐
188
+ │ Memory Stores │
189
+ │ ├─ REFLEX_LOG.md (Patterns) │
190
+ │ ├─ Supabase asi_signals (Short-term, 72h) │
191
+ │ └─ Graphiti/Neo4j (Long-term, forever) │
192
+ └─────────────────────────────────────────────────────────┘
193
+ ```
81
194
 
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
195
+ ## Why This Matters
89
196
 
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
197
+ ### Before (Memory Exists But Not Accessible)
95
198
 
96
- [See full MCP tools reference](https://docs.ekkos.dev/api-reference/mcp-tools)
199
+ ```
200
+ User: "Fix this auth bug"
201
+ Claude: "Let me implement a solution..."
202
+ [Might repeat past mistakes]
203
+ [Might not use proven patterns]
204
+ ```
97
205
 
98
- ## Troubleshooting
206
+ ### After (Memory Accessible via MCP)
99
207
 
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).
208
+ ```
209
+ User: "Fix this auth bug"
210
+ Claude: [search_memory("auth fix")]
211
+ "Found 3 proven solutions from past work!
212
+ Applying the highest-success pattern..."
213
+ [Uses established solution instantly] ✅
214
+ ```
102
215
 
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
216
+ **Result**: Claude has persistent memory across sessions! 🧠♾️
108
217
 
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
218
+ ## Next Steps
113
219
 
114
- ## Support
220
+ 1. ✅ Build MCP server (done)
221
+ 2. Configure in Cursor
222
+ 3. Test memory queries
223
+ 4. Add signal GET endpoint for full signal querying
224
+ 5. Add caching for frequently accessed patterns
115
225
 
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)
226
+ ## Related
120
227
 
121
- ## License
228
+ - Two-Tier Memory Architecture: `/TWO_TIER_MEMORY.md`
229
+ - Auto-Scan Implementation: `/apps/web/app/lib/asi/autoScan.ts`
230
+ - Memory Problem Documentation: `/THE_MEMORY_PROBLEM.md`
122
231
 
123
- MIT License - see [LICENSE](LICENSE) for details
@@ -0,0 +1,13 @@
1
+ #!/usr/bin/env node
2
+ /**
3
+ * Echo Memory MCP Server
4
+ *
5
+ * Provides Claude (in Cursor) with direct access to Echo's memory systems:
6
+ * - Semantic search of patterns (REFLEX_LOG.md)
7
+ * - Knowledge graph queries (Graphiti)
8
+ * - Recent signals (asi_signals)
9
+ * - Auto-scan directives
10
+ *
11
+ * This bridges the gap between built infrastructure and AI access.
12
+ */
13
+ export {};