-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit 100015e
Showing
6 changed files
with
185 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,75 @@ | ||
module.exports = { | ||
run: [ | ||
{ | ||
method: "shell.run", | ||
params: { | ||
venv: "env", // Edit this to customize the venv folder path | ||
message: [ | ||
"conda install -y conda-forge::uv" | ||
], | ||
} | ||
}, | ||
{ | ||
method: "shell.run", | ||
params: { | ||
message: "mkdir {{kernel.path('MCP')}}" | ||
} | ||
}, | ||
{ | ||
method: "shell.run", | ||
params: { | ||
message: [ | ||
"npm install", | ||
"node index {{kernel.path('MCP/test.db')}}" | ||
], | ||
path: "sqlite" | ||
} | ||
}, | ||
{ | ||
when: "{{platform === 'darwin'}}", | ||
method: "fs.write", | ||
params: { | ||
path: "{{env.HOME}}/Library/Application Support/Claude/claude_desktop_config.json", | ||
json2: { | ||
"mcpServers": { | ||
"sqlite": { | ||
"command": "uvx", | ||
"env": { | ||
"HOME": "{{kernel.envs.HOME}}", | ||
"PATH": "{{kernel.envs.PATH}}", | ||
}, | ||
"args": [ | ||
"mcp-server-sqlite", | ||
"--db-path", | ||
"{{kernel.path('MCP/test.db')}}" | ||
] | ||
} | ||
} | ||
} | ||
} | ||
}, | ||
{ | ||
when: "{{platform === 'win32'}}", | ||
method: "fs.write", | ||
params: { | ||
path: "{{path.resolve(env.APPDATA, 'Claude/claude_desktop_config.json')}}", | ||
json2: { | ||
"mcpServers": { | ||
"sqlite": { | ||
"command": "uvx", | ||
"env": { | ||
"HOME": "{{kernel.envs.HOME}}", | ||
"PATH": "{{kernel.envs.PATH}}", | ||
}, | ||
"args": [ | ||
"mcp-server-sqlite", | ||
"--db-path", | ||
"{{kernel.path('MCP/test.db')}}" | ||
] | ||
} | ||
} | ||
} | ||
} | ||
} | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
const path = require('path') | ||
module.exports = { | ||
version: "2.2", | ||
title: "MCP", | ||
description: "", | ||
icon: "icon.png", | ||
menu: [{ | ||
icon: "fa-solid fa-plug", | ||
text: "Install", | ||
href: "install.js", | ||
}] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,76 @@ | ||
const sqlite3 = require('sqlite3').verbose(); | ||
const path = require('path'); | ||
|
||
// Define the database path | ||
const dbPath = process.argv[2]; | ||
|
||
// Open the database (it will be created if it doesn't exist) | ||
const db = new sqlite3.Database(dbPath, (err) => { | ||
if (err) { | ||
console.error('Error opening database:', err.message); | ||
} else { | ||
console.log(`Connected to the database at ${dbPath}`); | ||
} | ||
}); | ||
|
||
// SQL statements | ||
const createTableSQL = ` | ||
CREATE TABLE IF NOT EXISTS products ( | ||
id INTEGER PRIMARY KEY, | ||
name TEXT, | ||
price REAL | ||
);`; | ||
|
||
const insertProductsSQL = ` | ||
INSERT INTO products (name, price) VALUES | ||
('Widget', 19.99), | ||
('Gadget', 29.99), | ||
('Gizmo', 39.99), | ||
('Smart Watch', 199.99), | ||
('Wireless Earbuds', 89.99), | ||
('Portable Charger', 24.99), | ||
('Bluetooth Speaker', 79.99), | ||
('Phone Stand', 15.99), | ||
('Laptop Sleeve', 34.99), | ||
('Mini Drone', 299.99), | ||
('LED Desk Lamp', 45.99), | ||
('Keyboard', 129.99), | ||
('Mouse Pad', 12.99), | ||
('USB Hub', 49.99), | ||
('Webcam', 69.99), | ||
('Screen Protector', 9.99), | ||
('Travel Adapter', 27.99), | ||
('Gaming Headset', 159.99), | ||
('Fitness Tracker', 119.99), | ||
('Portable SSD', 179.99); | ||
`; | ||
|
||
// Execute SQL statements | ||
db.serialize(() => { | ||
// Create the table | ||
db.run(createTableSQL, (err) => { | ||
if (err) { | ||
console.error('Error creating table:', err.message); | ||
} else { | ||
console.log('Table created successfully.'); | ||
} | ||
}); | ||
|
||
// Insert data | ||
db.run(insertProductsSQL, (err) => { | ||
if (err) { | ||
console.error('Error inserting data:', err.message); | ||
} else { | ||
console.log('Data inserted successfully.'); | ||
} | ||
}); | ||
}); | ||
|
||
// Close the database | ||
db.close((err) => { | ||
if (err) { | ||
console.error('Error closing database:', err.message); | ||
} else { | ||
console.log('Database connection closed.'); | ||
} | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
{ | ||
"name": "sqlite", | ||
"version": "1.0.0", | ||
"description": "", | ||
"main": "index.js", | ||
"scripts": { | ||
"test": "echo \"Error: no test specified\" && exit 1" | ||
}, | ||
"author": "", | ||
"license": "ISC", | ||
"dependencies": { | ||
"sqlite3": "^5.1.7" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
module.exports = { | ||
run: [{ | ||
method: "shell.run", | ||
params: { | ||
message: "git pull" | ||
} | ||
}] | ||
} |