mirror of
https://github.com/sveltejs/ai-tools.git
synced 2026-07-04 03:19:38 +08:00
Compare commits
13 Commits
add-sync-s
...
add-docker
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
dab61bdb3c | ||
|
|
0719e06f6a | ||
|
|
7346b0387a | ||
|
|
3af6c887e9 | ||
|
|
d91a4f2b51 | ||
|
|
ec2e12f7f2 | ||
|
|
7805fb8a24 | ||
|
|
5280f37a05 | ||
|
|
621c6cf3c7 | ||
|
|
5772110214 | ||
|
|
b171f6a19f | ||
|
|
3882733a66 | ||
|
|
e178374683 |
@@ -11,3 +11,12 @@ pnpm dev
|
||||
```
|
||||
|
||||
1. Set the VOYAGE_API_KEY for embeddings support
|
||||
|
||||
#### Optional tools
|
||||
|
||||
```
|
||||
docker-compose up
|
||||
```
|
||||
|
||||
- MCP Inspector: http://localhost:6274/ (Connect with `http://host.docker.internal:5173/mcp` + Streamable HTTP)
|
||||
- http://localhost:8081/ - Adminer SQLite frontend
|
||||
|
||||
31
bypass.php
Normal file
31
bypass.php
Normal file
@@ -0,0 +1,31 @@
|
||||
<?php
|
||||
function adminer_object() {
|
||||
include_once "plugins/login-sqlite.php";
|
||||
|
||||
class NoAuthSqlite extends Adminer {
|
||||
function login($login, $password) {
|
||||
return true;
|
||||
}
|
||||
|
||||
function credentials() {
|
||||
return array('/tmp/test.db', '', '');
|
||||
}
|
||||
|
||||
function database() {
|
||||
return '/tmp/test.db';
|
||||
}
|
||||
|
||||
function loginForm() {
|
||||
echo '<input type="hidden" name="auth[driver]" value="sqlite">';
|
||||
echo '<input type="hidden" name="auth[server]" value="/tmp/test.db">';
|
||||
echo '<input type="hidden" name="auth[username]" value="">';
|
||||
echo '<input type="hidden" name="auth[password]" value="">';
|
||||
echo '<input type="hidden" name="auth[db]" value="/tmp/test.db">';
|
||||
echo '<p><input type="submit" value="Connect to SQLite Database"></p>';
|
||||
}
|
||||
}
|
||||
|
||||
return new NoAuthSqlite;
|
||||
}
|
||||
|
||||
include "adminer.php";
|
||||
25
docker-compose.yml
Normal file
25
docker-compose.yml
Normal file
@@ -0,0 +1,25 @@
|
||||
services:
|
||||
mcp-inspector:
|
||||
image: ghcr.io/modelcontextprotocol/inspector:latest
|
||||
ports:
|
||||
- '6274:6274'
|
||||
- '6277:6277'
|
||||
environment:
|
||||
- DANGEROUSLY_OMIT_AUTH=true
|
||||
- HOST=0.0.0.0
|
||||
restart: unless-stopped
|
||||
container_name: mcp-inspector-sveltejs-mcp
|
||||
|
||||
adminer:
|
||||
image: adminer:4.6.2
|
||||
ports:
|
||||
- '8081:8080'
|
||||
volumes:
|
||||
- ./test.db:/tmp/test.db
|
||||
- ./bypass.php:/var/www/html/bypass.php
|
||||
environment:
|
||||
- ADMINER_DEFAULT_SERVER=sqlite:/tmp/test.db
|
||||
- ADMINER_DESIGN=hydra
|
||||
restart: unless-stopped
|
||||
container_name: adminer-sveltejs-mcp
|
||||
command: ["php", "-S", "[::]:8080", "-t", "/var/www/html", "/var/www/html/bypass.php"]
|
||||
@@ -6,7 +6,7 @@
|
||||
"main": "src/index.js",
|
||||
"scripts": {
|
||||
"start": "node src/index.js",
|
||||
"dev": "vite dev",
|
||||
"dev": "vite dev --host",
|
||||
"build": "vite build",
|
||||
"preview": "vite preview",
|
||||
"prepare": "svelte-kit sync || echo ''",
|
||||
|
||||
@@ -18,4 +18,7 @@ export default defineConfig({
|
||||
},
|
||||
],
|
||||
},
|
||||
server: {
|
||||
allowedHosts: ['host.docker.internal'],
|
||||
},
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user