@mnemonic-ai/mcp 0.1.0
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/bin/mcp.js +34 -0
- package/package.json +47 -0
package/bin/mcp.js
ADDED
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
/**
|
|
3
|
+
* Standalone Mnemonic MCP server.
|
|
4
|
+
*
|
|
5
|
+
* Usage: npx @mnemonic-ai/mcp
|
|
6
|
+
*
|
|
7
|
+
* Env vars:
|
|
8
|
+
* MNEMONIC_STORE_URI sqlite:///path | postgresql://... | neo4j://...
|
|
9
|
+
* MNEMONIC_EMBEDDER none | openai | local
|
|
10
|
+
* MNEMONIC_OPENAI_API_KEY Required when MNEMONIC_EMBEDDER=openai
|
|
11
|
+
*/
|
|
12
|
+
|
|
13
|
+
import { createServer } from "@mnemonic-ai/core/mcp/server.js";
|
|
14
|
+
import { StdioServerTransport } from "@modelcontextprotocol/sdk/server/stdio.js";
|
|
15
|
+
|
|
16
|
+
async function main() {
|
|
17
|
+
const { server, baseClient } = await createServer();
|
|
18
|
+
const transport = new StdioServerTransport();
|
|
19
|
+
|
|
20
|
+
for (const sig of ["SIGINT", "SIGTERM"]) {
|
|
21
|
+
process.on(sig, async () => {
|
|
22
|
+
await baseClient.store.close().catch(() => {});
|
|
23
|
+
process.exit(0);
|
|
24
|
+
});
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
await server.connect(transport);
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
main().catch((err) => {
|
|
31
|
+
const msg = err instanceof Error ? err.message : String(err);
|
|
32
|
+
process.stderr.write(`Fatal: ${msg}\n`);
|
|
33
|
+
process.exit(1);
|
|
34
|
+
});
|
package/package.json
ADDED
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@mnemonic-ai/mcp",
|
|
3
|
+
"version": "0.1.0",
|
|
4
|
+
"description": "MCP server for Mnemonic — run with npx @mnemonic-ai/mcp",
|
|
5
|
+
"repository": {
|
|
6
|
+
"type": "git",
|
|
7
|
+
"url": "https://github.com/obscura-oss/mnemonic-oss",
|
|
8
|
+
"directory": "ts-mcp"
|
|
9
|
+
},
|
|
10
|
+
"type": "module",
|
|
11
|
+
"bin": {
|
|
12
|
+
"mnemonic-mcp": "./bin/mcp.js"
|
|
13
|
+
},
|
|
14
|
+
"files": [
|
|
15
|
+
"bin"
|
|
16
|
+
],
|
|
17
|
+
"engines": {
|
|
18
|
+
"node": ">=18"
|
|
19
|
+
},
|
|
20
|
+
"dependencies": {
|
|
21
|
+
"@mnemonic-ai/core": "^0.1.0",
|
|
22
|
+
"@modelcontextprotocol/sdk": "^1.0.0",
|
|
23
|
+
"zod": "^3.0.0"
|
|
24
|
+
},
|
|
25
|
+
"peerDependencies": {
|
|
26
|
+
"pg": ">=8.0.0",
|
|
27
|
+
"pgvector": ">=0.2.0",
|
|
28
|
+
"neo4j-driver": ">=5.0.0",
|
|
29
|
+
"openai": ">=4.0.0",
|
|
30
|
+
"@huggingface/transformers": ">=3.0.0"
|
|
31
|
+
},
|
|
32
|
+
"peerDependenciesMeta": {
|
|
33
|
+
"pg": { "optional": true },
|
|
34
|
+
"pgvector": { "optional": true },
|
|
35
|
+
"neo4j-driver": { "optional": true },
|
|
36
|
+
"openai": { "optional": true },
|
|
37
|
+
"@huggingface/transformers": { "optional": true }
|
|
38
|
+
},
|
|
39
|
+
"keywords": [
|
|
40
|
+
"mcp",
|
|
41
|
+
"mnemonic",
|
|
42
|
+
"memory",
|
|
43
|
+
"ai",
|
|
44
|
+
"agent"
|
|
45
|
+
],
|
|
46
|
+
"license": "MIT"
|
|
47
|
+
}
|