From cc6ca2193b061fe7cce2e3be5f79bb542c80bab1 Mon Sep 17 00:00:00 2001 From: prpeh Date: Sat, 12 Apr 2025 20:33:00 +0700 Subject: [PATCH] refactor: update TypeScript configuration and align build paths --- README.md | 40 +++++++++++++++++++++------------------- claude-config.json | 22 ---------------------- package.json | 3 --- smithery.config.json | 2 +- tsconfig.json | 8 +++++--- 5 files changed, 27 insertions(+), 48 deletions(-) delete mode 100644 claude-config.json diff --git a/README.md b/README.md index ec8d221..1e341d2 100644 --- a/README.md +++ b/README.md @@ -68,35 +68,37 @@ npm run build ## AI IDE Integration ### Cursor AI IDE -Create the script `run-mcp.sh` in the project root: - -```bash -#!/bin/zsh -cd /path/to/your/project -source ~/.zshrc -nvm use --lts - -# Let the app load environment variables from .env file -node dist/index.js -``` - -Make the script executable: -```bash -chmod +x run-mcp.sh -``` - Add this configuration to your `~/.cursor/mcp.json` or `.cursor/mcp.json` file: ```json { "mcpServers": { "wisdomforge": { - "command": "/path/to/your/project/run-mcp.sh", - "args": [] + "command": "npx", + "args": [ + "-y", + "@smithery/cli@latest", + "run", + "@hadv/wisdomforge", + "--key", + "YOUR_API_KEY", + "--config", + "{\"database\":{\"type\":\"qdrant\",\"collectionName\":\"YOUR_COLLECTION_NAME\",\"url\":\"YOUR_QDRANT_URL\",\"apiKey\":\"YOUR_QDRANT_API_KEY\"}}", + "--transport", + "ws" + ] } } } ``` +Replace the following placeholders in the configuration: +- `YOUR_API_KEY`: Your Smithery API key +- `YOUR_COLLECTION_NAME`: Your Qdrant collection name +- `YOUR_QDRANT_URL`: Your Qdrant instance URL +- `YOUR_QDRANT_API_KEY`: Your Qdrant API key + +Note: Make sure you have Node.js installed and `npx` available in your PATH. If you're using nvm, ensure you're using the correct Node.js version by running `nvm use --lts` before starting Cursor. + ### Claude Desktop Add this configuration in Claude's settings: ```json diff --git a/claude-config.json b/claude-config.json deleted file mode 100644 index be3a693..0000000 --- a/claude-config.json +++ /dev/null @@ -1,22 +0,0 @@ -{ - "processes": { - "knowledge_server": { - "command": "powershell.exe", - "args": ["-ExecutionPolicy", "Bypass", "-File", "C:\\Users\\ASUS\\vito-mcp\\run-cursor-mcp.ps1"] - } - }, - "tools": [ - { - "name": "store_knowledge", - "description": "Store domain-specific knowledge in a vector database", - "provider": "process", - "process": "knowledge_server" - }, - { - "name": "retrieve_knowledge_context", - "description": "Retrieve relevant domain knowledge from a vector database", - "provider": "process", - "process": "knowledge_server" - } - ] -} \ No newline at end of file diff --git a/package.json b/package.json index 182c542..07c8312 100644 --- a/package.json +++ b/package.json @@ -3,9 +3,6 @@ "version": "1.0.0", "description": "A powerful knowledge management system that forges wisdom from experiences, insights, and best practices", "main": "dist/index.js", - "bin": { - "wisdomforge": "./dist/index.js" - }, "scripts": { "build": "tsc", "start": "node dist/index.js", diff --git a/smithery.config.json b/smithery.config.json index ef45942..840ced0 100644 --- a/smithery.config.json +++ b/smithery.config.json @@ -4,7 +4,7 @@ "type": "mcp-server", "description": "A powerful knowledge management system that forges wisdom from experiences, insights, and best practices", "main": "dist/index.js", - "entrypoint": "dist/src/index.js", + "entrypoint": "dist/index.js", "runtime": { "node": ">=18.0.0" }, diff --git a/tsconfig.json b/tsconfig.json index 799b198..4420664 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -3,13 +3,15 @@ "target": "ES2020", "module": "CommonJS", "outDir": "./dist", + "rootDir": "./src", "strict": true, "esModuleInterop": true, "skipLibCheck": true, "forceConsistentCasingInFileNames": true, "typeRoots": ["./node_modules/@types", "./src/types/declarations"], - "sourceMap": true + "sourceMap": true, + "declaration": true }, - "include": ["./*.ts", "./src/**/*.ts", "./tests/**/*.ts", "./src/types/declarations/*.d.ts"], - "exclude": ["node_modules", "dist"] + "include": ["./src/**/*.ts"], + "exclude": ["node_modules", "dist", "tests"] } \ No newline at end of file