@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 +136 -0
- package/PUBLISH.md +125 -0
- package/README.md +267 -78
- package/build/index.d.ts +15 -0
- package/build/index.js +2303 -0
- package/ekkos-mcp-server-1.2.0.tgz +0 -0
- package/index.ts +2478 -0
- package/package.json +9 -28
- package/tsconfig.json +19 -0
- package/dist/index.d.ts +0 -9
- package/dist/index.d.ts.map +0 -1
- package/dist/index.js +0 -125
- package/dist/index.js.map +0 -1
package/package.json
CHANGED
|
@@ -1,41 +1,22 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ekkos/mcp-server",
|
|
3
|
-
"version": "1.
|
|
4
|
-
"description": "ekkOS Memory MCP Server -
|
|
3
|
+
"version": "1.2.2",
|
|
4
|
+
"description": "ekkOS Memory MCP Server - Universal AI memory across Cursor, Windsurf, VS Code, Claude Code via stdio transport",
|
|
5
5
|
"type": "module",
|
|
6
|
-
"main": "dist/index.js",
|
|
7
6
|
"bin": {
|
|
8
|
-
"ekkos-mcp
|
|
7
|
+
"ekkos-mcp": "./build/index.js"
|
|
9
8
|
},
|
|
10
9
|
"scripts": {
|
|
11
|
-
"build": "tsc",
|
|
12
|
-
"
|
|
13
|
-
"
|
|
14
|
-
},
|
|
15
|
-
"keywords": [
|
|
16
|
-
"ekkos",
|
|
17
|
-
"mcp",
|
|
18
|
-
"memory",
|
|
19
|
-
"ai",
|
|
20
|
-
"claude",
|
|
21
|
-
"anthropic",
|
|
22
|
-
"model-context-protocol"
|
|
23
|
-
],
|
|
24
|
-
"author": "ekkOS",
|
|
25
|
-
"license": "MIT",
|
|
26
|
-
"repository": {
|
|
27
|
-
"type": "git",
|
|
28
|
-
"url": "https://github.com/ekkos-ai/ekkos.git",
|
|
29
|
-
"directory": "packages/ekkos-mcp-server"
|
|
10
|
+
"build": "tsc && chmod +x build/index.js",
|
|
11
|
+
"watch": "tsc --watch",
|
|
12
|
+
"prepare": "npm run build"
|
|
30
13
|
},
|
|
31
14
|
"dependencies": {
|
|
32
|
-
"@modelcontextprotocol/sdk": "^
|
|
15
|
+
"@modelcontextprotocol/sdk": "^0.5.0",
|
|
16
|
+
"node-fetch": "^3.3.2"
|
|
33
17
|
},
|
|
34
18
|
"devDependencies": {
|
|
35
|
-
"@types/node": "^20.11.
|
|
19
|
+
"@types/node": "^20.11.0",
|
|
36
20
|
"typescript": "^5.3.3"
|
|
37
|
-
},
|
|
38
|
-
"engines": {
|
|
39
|
-
"node": ">=18.0.0"
|
|
40
21
|
}
|
|
41
22
|
}
|
package/tsconfig.json
ADDED
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
{
|
|
2
|
+
"compilerOptions": {
|
|
3
|
+
"target": "ES2022",
|
|
4
|
+
"module": "Node16",
|
|
5
|
+
"moduleResolution": "Node16",
|
|
6
|
+
"outDir": "./build",
|
|
7
|
+
"rootDir": "./",
|
|
8
|
+
"strict": false,
|
|
9
|
+
"noImplicitAny": false,
|
|
10
|
+
"esModuleInterop": true,
|
|
11
|
+
"skipLibCheck": true,
|
|
12
|
+
"forceConsistentCasingInFileNames": true,
|
|
13
|
+
"resolveJsonModule": true,
|
|
14
|
+
"declaration": true
|
|
15
|
+
},
|
|
16
|
+
"include": ["**/*.ts"],
|
|
17
|
+
"exclude": ["node_modules", "build"]
|
|
18
|
+
}
|
|
19
|
+
|
package/dist/index.d.ts
DELETED
package/dist/index.d.ts.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";AAEA;;;;;GAKG"}
|
package/dist/index.js
DELETED
|
@@ -1,125 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env node
|
|
2
|
-
/**
|
|
3
|
-
* @ekkos/mcp-server
|
|
4
|
-
*
|
|
5
|
-
* Simple stdio proxy to ekkOS cloud MCP gateway.
|
|
6
|
-
* This creates a local MCP server that forwards all requests to https://mcp.ekkos.dev
|
|
7
|
-
*/
|
|
8
|
-
import { Server } from '@modelcontextprotocol/sdk/server/index.js';
|
|
9
|
-
import { StdioServerTransport } from '@modelcontextprotocol/sdk/server/stdio.js';
|
|
10
|
-
import { ListToolsRequestSchema, CallToolRequestSchema, ListResourcesRequestSchema, ReadResourceRequestSchema, ListPromptsRequestSchema, GetPromptRequestSchema } from '@modelcontextprotocol/sdk/types.js';
|
|
11
|
-
// Configuration
|
|
12
|
-
const EKKOS_API_KEY = process.env.EKKOS_API_KEY || '';
|
|
13
|
-
const EKKOS_USER_ID = process.env.EKKOS_USER_ID || '';
|
|
14
|
-
const EKKOS_MCP_URL = process.env.EKKOS_MCP_URL || 'https://mcp.ekkos.dev/api/v1/mcp';
|
|
15
|
-
const DEBUG = process.env.EKKOS_DEBUG === 'true';
|
|
16
|
-
if (!EKKOS_API_KEY) {
|
|
17
|
-
console.error('[ekkOS] ERROR: EKKOS_API_KEY environment variable is required');
|
|
18
|
-
console.error('[ekkOS] Get your API key at https://platform.ekkos.dev/dashboard/settings/api-keys');
|
|
19
|
-
process.exit(1);
|
|
20
|
-
}
|
|
21
|
-
// Simple HTTP client for MCP gateway
|
|
22
|
-
async function callGateway(endpoint, method, params) {
|
|
23
|
-
const url = `${EKKOS_MCP_URL}/${endpoint}`;
|
|
24
|
-
const headers = {
|
|
25
|
-
'Content-Type': 'application/json',
|
|
26
|
-
'Authorization': `Bearer ${EKKOS_API_KEY}`,
|
|
27
|
-
};
|
|
28
|
-
if (EKKOS_USER_ID) {
|
|
29
|
-
headers['X-User-ID'] = EKKOS_USER_ID;
|
|
30
|
-
}
|
|
31
|
-
if (DEBUG) {
|
|
32
|
-
console.error(`[ekkOS] → ${method} ${endpoint}`);
|
|
33
|
-
}
|
|
34
|
-
const response = await fetch(url, {
|
|
35
|
-
method: 'POST',
|
|
36
|
-
headers,
|
|
37
|
-
body: JSON.stringify({ method, params: params || {} }),
|
|
38
|
-
});
|
|
39
|
-
if (!response.ok) {
|
|
40
|
-
throw new Error(`HTTP ${response.status}: ${response.statusText}`);
|
|
41
|
-
}
|
|
42
|
-
const data = await response.json();
|
|
43
|
-
if (DEBUG) {
|
|
44
|
-
console.error(`[ekkOS] ← ${method} OK`);
|
|
45
|
-
}
|
|
46
|
-
return data;
|
|
47
|
-
}
|
|
48
|
-
// Create MCP server
|
|
49
|
-
const server = new Server({
|
|
50
|
-
name: 'ekkos-memory',
|
|
51
|
-
version: '1.0.0',
|
|
52
|
-
}, {
|
|
53
|
-
capabilities: {
|
|
54
|
-
tools: {},
|
|
55
|
-
resources: {},
|
|
56
|
-
prompts: {},
|
|
57
|
-
},
|
|
58
|
-
});
|
|
59
|
-
// List tools - proxy to gateway
|
|
60
|
-
server.setRequestHandler(ListToolsRequestSchema, async () => {
|
|
61
|
-
const result = await callGateway('tools/list', 'tools/list');
|
|
62
|
-
return result;
|
|
63
|
-
});
|
|
64
|
-
// Call tool - proxy to gateway
|
|
65
|
-
server.setRequestHandler(CallToolRequestSchema, async (request) => {
|
|
66
|
-
const result = await callGateway('tools/call', 'tools/call', {
|
|
67
|
-
name: request.params.name,
|
|
68
|
-
arguments: request.params.arguments,
|
|
69
|
-
});
|
|
70
|
-
return result;
|
|
71
|
-
});
|
|
72
|
-
// List resources - proxy to gateway
|
|
73
|
-
server.setRequestHandler(ListResourcesRequestSchema, async () => {
|
|
74
|
-
const result = await callGateway('resources/list', 'resources/list');
|
|
75
|
-
return result;
|
|
76
|
-
});
|
|
77
|
-
// Read resource - proxy to gateway
|
|
78
|
-
server.setRequestHandler(ReadResourceRequestSchema, async (request) => {
|
|
79
|
-
const result = await callGateway('resources/read', 'resources/read', {
|
|
80
|
-
uri: request.params.uri,
|
|
81
|
-
});
|
|
82
|
-
return result;
|
|
83
|
-
});
|
|
84
|
-
// List prompts - proxy to gateway
|
|
85
|
-
server.setRequestHandler(ListPromptsRequestSchema, async () => {
|
|
86
|
-
const result = await callGateway('prompts/list', 'prompts/list');
|
|
87
|
-
return result;
|
|
88
|
-
});
|
|
89
|
-
// Get prompt - proxy to gateway
|
|
90
|
-
server.setRequestHandler(GetPromptRequestSchema, async (request) => {
|
|
91
|
-
const result = await callGateway('prompts/get', 'prompts/get', {
|
|
92
|
-
name: request.params.name,
|
|
93
|
-
arguments: request.params.arguments,
|
|
94
|
-
});
|
|
95
|
-
return result;
|
|
96
|
-
});
|
|
97
|
-
// Error handling
|
|
98
|
-
server.onerror = (error) => {
|
|
99
|
-
console.error('[ekkOS] Server error:', error);
|
|
100
|
-
};
|
|
101
|
-
process.on('SIGINT', async () => {
|
|
102
|
-
if (DEBUG) {
|
|
103
|
-
console.error('[ekkOS] Shutting down...');
|
|
104
|
-
}
|
|
105
|
-
await server.close();
|
|
106
|
-
process.exit(0);
|
|
107
|
-
});
|
|
108
|
-
// Start server
|
|
109
|
-
async function main() {
|
|
110
|
-
if (DEBUG) {
|
|
111
|
-
console.error('[ekkOS] Starting MCP proxy to ekkOS Memory...');
|
|
112
|
-
console.error(`[ekkOS] Gateway: ${EKKOS_MCP_URL}`);
|
|
113
|
-
console.error(`[ekkOS] User ID: ${EKKOS_USER_ID || '(not set)'}`);
|
|
114
|
-
}
|
|
115
|
-
const transport = new StdioServerTransport();
|
|
116
|
-
await server.connect(transport);
|
|
117
|
-
if (DEBUG) {
|
|
118
|
-
console.error('[ekkOS] ✓ Ready! Your AI can now access ekkOS memory.');
|
|
119
|
-
}
|
|
120
|
-
}
|
|
121
|
-
main().catch((error) => {
|
|
122
|
-
console.error('[ekkOS] Fatal error:', error);
|
|
123
|
-
process.exit(1);
|
|
124
|
-
});
|
|
125
|
-
//# sourceMappingURL=index.js.map
|
package/dist/index.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";AAEA;;;;;GAKG;AAEH,OAAO,EAAE,MAAM,EAAE,MAAM,2CAA2C,CAAC;AACnE,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