@softtechai/quickmcp 1.0.16 → 1.1.1
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/README.md +3 -3
- package/dist/auth/auth-utils.d.ts +130 -0
- package/dist/auth/auth-utils.d.ts.map +1 -0
- package/dist/auth/auth-utils.js +600 -0
- package/dist/auth/auth-utils.js.map +1 -0
- package/dist/auth/jwks-provider.d.ts +9 -0
- package/dist/auth/jwks-provider.d.ts.map +1 -0
- package/dist/auth/jwks-provider.js +56 -0
- package/dist/auth/jwks-provider.js.map +1 -0
- package/dist/auth/token-utils.d.ts +40 -0
- package/dist/auth/token-utils.d.ts.map +1 -0
- package/dist/auth/token-utils.js +162 -0
- package/dist/auth/token-utils.js.map +1 -0
- package/dist/client/MCPClient.js +5 -4
- package/dist/client/MCPClient.js.map +1 -1
- package/dist/config/auth-config.d.ts +16 -0
- package/dist/config/auth-config.d.ts.map +1 -0
- package/dist/config/auth-config.js +107 -0
- package/dist/config/auth-config.js.map +1 -0
- package/dist/constant/constant.d.ts +20 -0
- package/dist/constant/constant.d.ts.map +1 -0
- package/dist/constant/constant.js +24 -0
- package/dist/constant/constant.js.map +1 -0
- package/dist/database/async-datastore.d.ts +6 -0
- package/dist/database/async-datastore.d.ts.map +1 -0
- package/dist/database/async-datastore.js +15 -0
- package/dist/database/async-datastore.js.map +1 -0
- package/dist/database/database-utils.d.ts +6 -0
- package/dist/database/database-utils.d.ts.map +1 -0
- package/dist/database/database-utils.js +29 -0
- package/dist/database/database-utils.js.map +1 -0
- package/dist/database/datastore.d.ts +164 -0
- package/dist/database/datastore.d.ts.map +1 -0
- package/dist/{parsers/types/index.js → database/datastore.js} +1 -0
- package/dist/database/datastore.js.map +1 -0
- package/dist/database/factory.d.ts +4 -0
- package/dist/database/factory.d.ts.map +1 -0
- package/dist/database/factory.js +32 -0
- package/dist/database/factory.js.map +1 -0
- package/dist/database/jdbc-manager.d.ts +49 -0
- package/dist/database/jdbc-manager.d.ts.map +1 -0
- package/dist/database/jdbc-manager.js +50 -0
- package/dist/database/jdbc-manager.js.map +1 -0
- package/dist/database/sqlite-manager.d.ts +46 -44
- package/dist/database/sqlite-manager.d.ts.map +1 -1
- package/dist/database/sqlite-manager.js +492 -42
- package/dist/database/sqlite-manager.js.map +1 -1
- package/dist/database/supabase-manager.d.ts +58 -0
- package/dist/database/supabase-manager.d.ts.map +1 -0
- package/dist/database/supabase-manager.js +432 -0
- package/dist/database/supabase-manager.js.map +1 -0
- package/dist/generators/MCPServerGenerator.d.ts +103 -20
- package/dist/generators/MCPServerGenerator.d.ts.map +1 -1
- package/dist/generators/MCPServerGenerator.js +6930 -128
- package/dist/generators/MCPServerGenerator.js.map +1 -1
- package/dist/index.d.ts +0 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +8 -1
- package/dist/index.js.map +1 -1
- package/dist/integrated-mcp-server-new.d.ts +14 -2
- package/dist/integrated-mcp-server-new.d.ts.map +1 -1
- package/dist/integrated-mcp-server-new.js +270 -180
- package/dist/integrated-mcp-server-new.js.map +1 -1
- package/dist/mcp-core/McpCoreService.d.ts +63 -0
- package/dist/mcp-core/McpCoreService.d.ts.map +1 -0
- package/dist/mcp-core/McpCoreService.js +492 -0
- package/dist/mcp-core/McpCoreService.js.map +1 -0
- package/dist/parsers/CsvParser.d.ts +1 -1
- package/dist/parsers/CsvParser.d.ts.map +1 -1
- package/dist/parsers/CsvParser.js +3 -2
- package/dist/parsers/CsvParser.js.map +1 -1
- package/dist/parsers/DatabaseParser.d.ts.map +1 -1
- package/dist/parsers/DatabaseParser.js +9 -8
- package/dist/parsers/DatabaseParser.js.map +1 -1
- package/dist/parsers/ExcelParser.d.ts +15 -0
- package/dist/parsers/ExcelParser.d.ts.map +1 -1
- package/dist/parsers/ExcelParser.js +287 -21
- package/dist/parsers/ExcelParser.js.map +1 -1
- package/dist/parsers/WebPageParser.d.ts +5 -0
- package/dist/parsers/WebPageParser.d.ts.map +1 -0
- package/dist/parsers/WebPageParser.js +35 -0
- package/dist/parsers/WebPageParser.js.map +1 -0
- package/dist/parsers/index.d.ts +3 -2
- package/dist/parsers/index.d.ts.map +1 -1
- package/dist/parsers/index.js +19 -16
- package/dist/parsers/index.js.map +1 -1
- package/dist/server/api/askApi.d.ts +41 -0
- package/dist/server/api/askApi.d.ts.map +1 -0
- package/dist/server/api/askApi.js +479 -0
- package/dist/server/api/askApi.js.map +1 -0
- package/dist/server/api/authApi.d.ts +101 -0
- package/dist/server/api/authApi.d.ts.map +1 -0
- package/dist/server/api/authApi.js +1472 -0
- package/dist/server/api/authApi.js.map +1 -0
- package/dist/server/api/authProperty.d.ts +18 -0
- package/dist/server/api/authProperty.d.ts.map +1 -0
- package/dist/server/api/authProperty.js +41 -0
- package/dist/server/api/authProperty.js.map +1 -0
- package/dist/server/api/configApi.d.ts +15 -0
- package/dist/server/api/configApi.d.ts.map +1 -0
- package/dist/server/api/configApi.js +42 -0
- package/dist/server/api/configApi.js.map +1 -0
- package/dist/server/api/databaseApi.d.ts +14 -0
- package/dist/server/api/databaseApi.d.ts.map +1 -0
- package/dist/server/api/databaseApi.js +111 -0
- package/dist/server/api/databaseApi.js.map +1 -0
- package/dist/server/api/directoryApi.d.ts +9 -0
- package/dist/server/api/directoryApi.d.ts.map +1 -0
- package/dist/server/api/directoryApi.js +103 -0
- package/dist/server/api/directoryApi.js.map +1 -0
- package/dist/server/api/generateApi.d.ts +24 -0
- package/dist/server/api/generateApi.d.ts.map +1 -0
- package/dist/server/api/generateApi.js +457 -0
- package/dist/server/api/generateApi.js.map +1 -0
- package/dist/server/api/healthApi.d.ts +9 -0
- package/dist/server/api/healthApi.d.ts.map +1 -0
- package/dist/server/api/healthApi.js +15 -0
- package/dist/server/api/healthApi.js.map +1 -0
- package/dist/server/api/indexApi.d.ts +21 -0
- package/dist/server/api/indexApi.d.ts.map +1 -0
- package/dist/server/api/indexApi.js +61 -0
- package/dist/server/api/indexApi.js.map +1 -0
- package/dist/server/api/logsApi.d.ts +12 -0
- package/dist/server/api/logsApi.d.ts.map +1 -0
- package/dist/server/api/logsApi.js +37 -0
- package/dist/server/api/logsApi.js.map +1 -0
- package/dist/server/api/mcpApi.d.ts +20 -0
- package/dist/server/api/mcpApi.d.ts.map +1 -0
- package/dist/server/api/mcpApi.js +120 -0
- package/dist/server/api/mcpApi.js.map +1 -0
- package/dist/server/api/nameApi.d.ts +21 -0
- package/dist/server/api/nameApi.d.ts.map +1 -0
- package/dist/server/api/nameApi.js +42 -0
- package/dist/server/api/nameApi.js.map +1 -0
- package/dist/server/api/parseApi.d.ts +9 -0
- package/dist/server/api/parseApi.d.ts.map +1 -0
- package/dist/server/api/parseApi.js +3245 -0
- package/dist/server/api/parseApi.js.map +1 -0
- package/dist/server/api/serverApi.d.ts +44 -0
- package/dist/server/api/serverApi.d.ts.map +1 -0
- package/dist/server/api/serverApi.js +417 -0
- package/dist/server/api/serverApi.js.map +1 -0
- package/dist/{dynamic-mcp-executor.d.ts → server/dynamic-mcp-executor.d.ts} +4 -5
- package/dist/server/dynamic-mcp-executor.d.ts.map +1 -0
- package/dist/server/dynamic-mcp-executor.js +62 -0
- package/dist/server/dynamic-mcp-executor.js.map +1 -0
- package/dist/server/port-utils.d.ts +14 -0
- package/dist/server/port-utils.d.ts.map +1 -0
- package/dist/server/port-utils.js +31 -0
- package/dist/server/port-utils.js.map +1 -0
- package/dist/server/server-utils.d.ts +13 -0
- package/dist/server/server-utils.d.ts.map +1 -0
- package/dist/server/server-utils.js +72 -0
- package/dist/server/server-utils.js.map +1 -0
- package/dist/{web → server}/server.d.ts +1 -0
- package/dist/server/server.d.ts.map +1 -0
- package/dist/server/server.js +535 -0
- package/dist/server/server.js.map +1 -0
- package/dist/server/tool-executer.d.ts +101 -0
- package/dist/server/tool-executer.d.ts.map +1 -0
- package/dist/server/tool-executer.js +6198 -0
- package/dist/server/tool-executer.js.map +1 -0
- package/dist/types/index.d.ts +1197 -4
- package/dist/types/index.d.ts.map +1 -1
- package/dist/types/index.js +1028 -0
- package/dist/types/index.js.map +1 -1
- package/dist/upload/upload-utils.d.ts +4 -0
- package/dist/upload/upload-utils.d.ts.map +1 -0
- package/dist/upload/upload-utils.js +29 -0
- package/dist/upload/upload-utils.js.map +1 -0
- package/dist/utils/deployment-util.d.ts +14 -0
- package/dist/utils/deployment-util.d.ts.map +1 -0
- package/dist/utils/deployment-util.js +46 -0
- package/dist/utils/deployment-util.js.map +1 -0
- package/dist/utils/logger.d.ts +15 -0
- package/dist/utils/logger.d.ts.map +1 -0
- package/dist/utils/logger.js +56 -0
- package/dist/utils/logger.js.map +1 -0
- package/package.json +18 -6
- package/quickmcp-direct-stdio.js +183 -187
- package/src/web/public/app.js +15370 -1471
- package/src/web/public/authorization.html +868 -0
- package/src/web/public/database-tables.html +283 -547
- package/src/web/public/how-to-use.html +446 -462
- package/src/web/public/how-to-use.js +4 -4
- package/src/web/public/images/app/activepieces.png +0 -0
- package/src/web/public/images/app/airtable.png +0 -0
- package/src/web/public/images/app/androidstudio.png +0 -0
- package/src/web/public/images/app/antigravity.png +0 -0
- package/src/web/public/images/app/applenotes.png +0 -0
- package/src/web/public/images/app/applereminders.png +0 -0
- package/src/web/public/images/app/asana.png +0 -0
- package/src/web/public/images/app/azureai.png +0 -0
- package/src/web/public/images/app/bash.png +0 -0
- package/src/web/public/images/app/bearnotes.png +0 -0
- package/src/web/public/images/app/bitbucket.png +0 -0
- package/src/web/public/images/app/claude.png +0 -0
- package/src/web/public/images/app/cli.png +0 -0
- package/src/web/public/images/app/clickup.png +0 -0
- package/src/web/public/images/app/cohere.png +0 -0
- package/src/web/public/images/app/confluence.png +0 -0
- package/src/web/public/images/app/confluence2.png +0 -0
- package/src/web/public/images/app/curl.png +0 -0
- package/src/web/public/images/app/curl_mini.png +0 -0
- package/src/web/public/images/app/cursor.png +0 -0
- package/src/web/public/images/app/db2.png +0 -0
- package/src/web/public/images/app/deepseek.png +0 -0
- package/src/web/public/images/app/discord.png +0 -0
- package/src/web/public/images/app/docker.png +0 -0
- package/src/web/public/images/app/dockerhub.png +0 -0
- package/src/web/public/images/app/dropbox.png +0 -0
- package/src/web/public/images/app/elasticsearch.png +0 -0
- package/src/web/public/images/app/facebook.png +0 -0
- package/src/web/public/images/app/falai.png +0 -0
- package/src/web/public/images/app/fireworks.png +0 -0
- package/src/web/public/images/app/gdrive.png +0 -0
- package/src/web/public/images/app/gemini.png +0 -0
- package/src/web/public/images/app/github.png +0 -0
- package/src/web/public/images/app/githubcopilot.png +0 -0
- package/src/web/public/images/app/gitlab.png +0 -0
- package/src/web/public/images/app/gmail.png +0 -0
- package/src/web/public/images/app/googlecalender.png +0 -0
- package/src/web/public/images/app/googledocs.png +0 -0
- package/src/web/public/images/app/googlesheets.png +0 -0
- package/src/web/public/images/app/gradle.png +0 -0
- package/src/web/public/images/app/grafana.png +0 -0
- package/src/web/public/images/app/graphql.png +0 -0
- package/src/web/public/images/app/grok.png +0 -0
- package/src/web/public/images/app/groq.png +0 -0
- package/src/web/public/images/app/hazelcast.png +0 -0
- package/src/web/public/images/app/huggingface.png +0 -0
- package/src/web/public/images/app/imessage.png +0 -0
- package/src/web/public/images/app/instagram.png +0 -0
- package/src/web/public/images/app/intellij.png +0 -0
- package/src/web/public/images/app/jenkins.png +0 -0
- package/src/web/public/images/app/jira.png +0 -0
- package/src/web/public/images/app/kafka.png +0 -0
- package/src/web/public/images/app/kubernetes.png +0 -0
- package/src/web/public/images/app/linear.png +0 -0
- package/src/web/public/images/app/linkedin.png +0 -0
- package/src/web/public/images/app/llama.png +0 -0
- package/src/web/public/images/app/make.png +0 -0
- package/src/web/public/images/app/maven.png +0 -0
- package/src/web/public/images/app/mcp.png +0 -0
- package/src/web/public/images/app/microsoftteams.png +0 -0
- package/src/web/public/images/app/mistral.png +0 -0
- package/src/web/public/images/app/monday.png +0 -0
- package/src/web/public/images/app/mongodb.png +0 -0
- package/src/web/public/images/app/mssql.png +0 -0
- package/src/web/public/images/app/mysql.png +0 -0
- package/src/web/public/images/app/n8n.png +0 -0
- package/src/web/public/images/app/notion.png +0 -0
- package/src/web/public/images/app/npm.png +0 -0
- package/src/web/public/images/app/nuget.png +0 -0
- package/src/web/public/images/app/obsidian.png +0 -0
- package/src/web/public/images/app/openai.png +0 -0
- package/src/web/public/images/app/openrouter.png +0 -0
- package/src/web/public/images/app/opensearch.png +0 -0
- package/src/web/public/images/app/openshift.png +0 -0
- package/src/web/public/images/app/oracle.png +0 -0
- package/src/web/public/images/app/perplexity.png +0 -0
- package/src/web/public/images/app/pipedream.png +0 -0
- package/src/web/public/images/app/postgresql.png +0 -0
- package/src/web/public/images/app/powershell.png +0 -0
- package/src/web/public/images/app/prometheus.png +0 -0
- package/src/web/public/images/app/reddit.png +0 -0
- package/src/web/public/images/app/redis.png +0 -0
- package/src/web/public/images/app/rss.png +0 -0
- package/src/web/public/images/app/signal.png +0 -0
- package/src/web/public/images/app/slack.png +0 -0
- package/src/web/public/images/app/soap.png +0 -0
- package/src/web/public/images/app/sqlite.png +0 -0
- package/src/web/public/images/app/supabase.png +0 -0
- package/src/web/public/images/app/telegram.png +0 -0
- package/src/web/public/images/app/things3.png +0 -0
- package/src/web/public/images/app/threads.png +0 -0
- package/src/web/public/images/app/tiktok.png +0 -0
- package/src/web/public/images/app/together.png +0 -0
- package/src/web/public/images/app/trello.png +0 -0
- package/src/web/public/images/app/vscode.png +0 -0
- package/src/web/public/images/app/webhook.png +0 -0
- package/src/web/public/images/app/webpage.png +0 -0
- package/src/web/public/images/app/whatsappbusiness.png +0 -0
- package/src/web/public/images/app/windsorf.png +0 -0
- package/src/web/public/images/app/x.png +0 -0
- package/src/web/public/images/app/youtube.png +0 -0
- package/src/web/public/images/app/zapier.png +0 -0
- package/src/web/public/images/app/zededitor.png +0 -0
- package/src/web/public/images/app/zoom.png +0 -0
- package/src/web/public/images/avatar-anon.svg +4 -0
- package/src/web/public/images/favicon.png +0 -0
- package/src/web/public/images/install/chatgpt-web/step0.png +0 -0
- package/src/web/public/images/install/chatgpt-web/step1.png +0 -0
- package/src/web/public/images/install/chatgpt-web/step2.png +0 -0
- package/src/web/public/images/install/chatgpt-web/step3.png +0 -0
- package/src/web/public/images/install/chatgpt-web/step4.png +0 -0
- package/src/web/public/images/install/chatgpt-web/step5.png +0 -0
- package/src/web/public/images/readme/1-generate-servers.png +0 -0
- package/src/web/public/images/readme/2-database-connection.png +0 -0
- package/src/web/public/images/readme/2-file-upload.png +0 -0
- package/src/web/public/images/readme/3-data-preview.png +0 -0
- package/src/web/public/images/readme/4-data-preview2.png +0 -0
- package/src/web/public/images/readme/5-server-configuration.png +0 -0
- package/src/web/public/images/readme/6-server-generated-modal.png +0 -0
- package/src/web/public/images/readme/7-generated-servers.png +0 -0
- package/src/web/public/images/readme/8-generated-servers-view-details.png +0 -0
- package/src/web/public/images/readme/Screenshot 2025-10-09 at 20.23.51.png +0 -0
- package/src/web/public/images/readme/Screenshot 2025-10-09 at 20.24.59.png +0 -0
- package/src/web/public/images/readme/Screenshot 2025-10-09 at 20.25.05.png +0 -0
- package/src/web/public/images/readme/Screenshot 2025-10-09 at 20.25.14.png +0 -0
- package/src/web/public/images/readme/Screenshot 2025-10-09 at 20.25.21.png +0 -0
- package/src/web/public/images/readme/Screenshot 2025-10-09 at 20.25.36.png +0 -0
- package/src/web/public/index.html +4685 -488
- package/src/web/public/landing.html +1638 -0
- package/src/web/public/logger.js +31 -0
- package/src/web/public/login.html +372 -0
- package/src/web/public/manage-servers.html +121 -188
- package/src/web/public/pricing.html +537 -0
- package/src/web/public/quick-ask.html +133 -0
- package/src/web/public/quickmcp-styles.css +708 -0
- package/src/web/public/roles.html +177 -0
- package/src/web/public/shared.js +736 -3
- package/src/web/public/sidebar.js +414 -0
- package/src/web/public/test-servers.html +605 -221
- package/src/web/public/users.html +191 -0
- package/dist/client/MCPClientUnified.d.ts +0 -31
- package/dist/client/MCPClientUnified.d.ts.map +0 -1
- package/dist/client/MCPClientUnified.js +0 -275
- package/dist/client/MCPClientUnified.js.map +0 -1
- package/dist/client/MCPTestRunnerUnified.d.ts +0 -48
- package/dist/client/MCPTestRunnerUnified.d.ts.map +0 -1
- package/dist/client/MCPTestRunnerUnified.js +0 -183
- package/dist/client/MCPTestRunnerUnified.js.map +0 -1
- package/dist/database/json-manager.d.ts +0 -55
- package/dist/database/json-manager.d.ts.map +0 -1
- package/dist/database/json-manager.js +0 -128
- package/dist/database/json-manager.js.map +0 -1
- package/dist/dynamic-mcp-executor.d.ts.map +0 -1
- package/dist/dynamic-mcp-executor.js +0 -274
- package/dist/dynamic-mcp-executor.js.map +0 -1
- package/dist/generators/MCPServerGenerator-new.d.ts +0 -37
- package/dist/generators/MCPServerGenerator-new.d.ts.map +0 -1
- package/dist/generators/MCPServerGenerator-new.js +0 -287
- package/dist/generators/MCPServerGenerator-new.js.map +0 -1
- package/dist/generators/database/sqlite-manager.d.ts +0 -52
- package/dist/generators/database/sqlite-manager.js +0 -143
- package/dist/generators/generators/MCPServerGenerator.d.ts +0 -37
- package/dist/generators/generators/MCPServerGenerator.js +0 -396
- package/dist/integrated-mcp-server.d.ts +0 -25
- package/dist/integrated-mcp-server.d.ts.map +0 -1
- package/dist/integrated-mcp-server.js +0 -541
- package/dist/integrated-mcp-server.js.map +0 -1
- package/dist/mcp-inspector-server.d.ts +0 -3
- package/dist/mcp-inspector-server.d.ts.map +0 -1
- package/dist/mcp-inspector-server.js +0 -119
- package/dist/mcp-inspector-server.js.map +0 -1
- package/dist/mcp-sdk-server.d.ts +0 -3
- package/dist/mcp-sdk-server.d.ts.map +0 -1
- package/dist/mcp-sdk-server.js +0 -90
- package/dist/mcp-sdk-server.js.map +0 -1
- package/dist/mcp-server.d.ts +0 -3
- package/dist/mcp-server.d.ts.map +0 -1
- package/dist/mcp-server.js +0 -300
- package/dist/mcp-server.js.map +0 -1
- package/dist/parsers/parsers/ExcelParser.js +0 -118
- package/dist/quickmcp-unified-bridge.d.ts +0 -13
- package/dist/quickmcp-unified-bridge.d.ts.map +0 -1
- package/dist/quickmcp-unified-bridge.js +0 -176
- package/dist/quickmcp-unified-bridge.js.map +0 -1
- package/dist/sqlite-manager.js +0 -145
- package/dist/test-app.d.ts +0 -2
- package/dist/test-app.d.ts.map +0 -1
- package/dist/test-app.js +0 -119
- package/dist/test-app.js.map +0 -1
- package/dist/transport/base-transport.d.ts +0 -21
- package/dist/transport/base-transport.d.ts.map +0 -1
- package/dist/transport/base-transport.js +0 -16
- package/dist/transport/base-transport.js.map +0 -1
- package/dist/transport/index.d.ts +0 -10
- package/dist/transport/index.d.ts.map +0 -1
- package/dist/transport/index.js +0 -12
- package/dist/transport/index.js.map +0 -1
- package/dist/transport/sse-transport.d.ts +0 -13
- package/dist/transport/sse-transport.d.ts.map +0 -1
- package/dist/transport/sse-transport.js +0 -106
- package/dist/transport/sse-transport.js.map +0 -1
- package/dist/transport/stdio-transport.d.ts +0 -8
- package/dist/transport/stdio-transport.d.ts.map +0 -1
- package/dist/transport/stdio-transport.js +0 -53
- package/dist/transport/stdio-transport.js.map +0 -1
- package/dist/transport/streamable-http-transport.d.ts +0 -15
- package/dist/transport/streamable-http-transport.d.ts.map +0 -1
- package/dist/transport/streamable-http-transport.js +0 -151
- package/dist/transport/streamable-http-transport.js.map +0 -1
- package/dist/web/client/MCPClient.js +0 -348
- package/dist/web/client/MCPTestRunner.js +0 -317
- package/dist/web/database/json-manager.js +0 -124
- package/dist/web/database/sqlite-manager.js +0 -146
- package/dist/web/dynamic-mcp-executor.js +0 -443
- package/dist/web/generators/MCPServerGenerator-new.js +0 -284
- package/dist/web/generators/MCPServerGenerator.js +0 -566
- package/dist/web/integrated-mcp-server-new.js +0 -394
- package/dist/web/parsers/CsvParser.js +0 -144
- package/dist/web/parsers/DatabaseParser.js +0 -637
- package/dist/web/parsers/ExcelParser.js +0 -180
- package/dist/web/parsers/index.js +0 -152
- package/dist/web/server.d.ts.map +0 -1
- package/dist/web/server.js +0 -790
- package/dist/web/server.js.map +0 -1
- package/dist/web/types/index.js +0 -2
- package/dist/web/web/server.js +0 -860
- package/src/web/public/modern-styles.css +0 -946
- package/src/web/public/shared-styles.css +0 -2091
- /package/src/web/public/images/{1-claude-quickmcp-stdio.png → readme/1-claude-quickmcp-stdio.png} +0 -0
- /package/src/web/public/images/{2-claude-tools.png → readme/2-claude-tools.png} +0 -0
- /package/src/web/public/images/{3-claude-developer-settings.png → readme/3-claude-developer-settings.png} +0 -0
- /package/src/web/public/images/{4-claude-config.png → readme/4-claude-config.png} +0 -0
- /package/src/web/public/images/{5-claude-config-edit.png → readme/5-claude-config-edit.png} +0 -0
package/dist/web/server.js
DELETED
|
@@ -1,790 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
-
};
|
|
5
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
const express_1 = __importDefault(require("express"));
|
|
7
|
-
const cors_1 = __importDefault(require("cors"));
|
|
8
|
-
const multer_1 = __importDefault(require("multer"));
|
|
9
|
-
const path_1 = __importDefault(require("path"));
|
|
10
|
-
const promises_1 = __importDefault(require("fs/promises"));
|
|
11
|
-
const fs_1 = __importDefault(require("fs"));
|
|
12
|
-
const parsers_1 = require("../parsers");
|
|
13
|
-
const MCPServerGenerator_1 = require("../generators/MCPServerGenerator");
|
|
14
|
-
const MCPTestRunner_1 = require("../client/MCPTestRunner");
|
|
15
|
-
const child_process_1 = require("child_process");
|
|
16
|
-
const integrated_mcp_server_new_1 = require("../integrated-mcp-server-new");
|
|
17
|
-
const sqlite_manager_1 = require("../database/sqlite-manager");
|
|
18
|
-
const better_sqlite3_1 = __importDefault(require("better-sqlite3"));
|
|
19
|
-
const app = (0, express_1.default)();
|
|
20
|
-
const upload = (0, multer_1.default)({ dest: 'uploads/' });
|
|
21
|
-
app.use((0, cors_1.default)());
|
|
22
|
-
app.use(express_1.default.json());
|
|
23
|
-
// Prefer the new UI under src/web/public if bundled, otherwise fall back to dist/web/public
|
|
24
|
-
const distPublicDir = path_1.default.join(__dirname, 'public');
|
|
25
|
-
const srcPublicDir = path_1.default.join(__dirname, '..', '..', 'src', 'web', 'public');
|
|
26
|
-
const publicDir = fs_1.default.existsSync(srcPublicDir) ? srcPublicDir : distPublicDir;
|
|
27
|
-
app.use(express_1.default.static(publicDir));
|
|
28
|
-
const parser = new parsers_1.DataSourceParser();
|
|
29
|
-
const generator = new MCPServerGenerator_1.MCPServerGenerator();
|
|
30
|
-
const testRunner = new MCPTestRunner_1.MCPTestRunner();
|
|
31
|
-
const sqliteManager = new sqlite_manager_1.SQLiteManager();
|
|
32
|
-
let nextAvailablePort = 3001;
|
|
33
|
-
function getNextPort() {
|
|
34
|
-
return nextAvailablePort++;
|
|
35
|
-
}
|
|
36
|
-
function startRuntimeMCPServer(serverId, serverPath) {
|
|
37
|
-
return new Promise((resolve, reject) => {
|
|
38
|
-
const serverInfo = generatedServers.get(serverId);
|
|
39
|
-
if (!serverInfo) {
|
|
40
|
-
reject(new Error('Server not found'));
|
|
41
|
-
return;
|
|
42
|
-
}
|
|
43
|
-
// Kill existing process if running
|
|
44
|
-
if (serverInfo.runtimeProcess) {
|
|
45
|
-
serverInfo.runtimeProcess.kill();
|
|
46
|
-
}
|
|
47
|
-
const port = getNextPort();
|
|
48
|
-
const serverDir = path_1.default.dirname(serverPath);
|
|
49
|
-
//console.log(`Starting runtime MCP server for ${serverId} on port ${port}`);
|
|
50
|
-
// Fork the MCP server process
|
|
51
|
-
const mcpProcess = (0, child_process_1.fork)(serverPath, [], {
|
|
52
|
-
cwd: serverDir,
|
|
53
|
-
env: {
|
|
54
|
-
...process.env,
|
|
55
|
-
MCP_PORT: port.toString()
|
|
56
|
-
},
|
|
57
|
-
stdio: ['pipe', 'pipe', 'pipe', 'ipc']
|
|
58
|
-
});
|
|
59
|
-
mcpProcess.on('message', (message) => {
|
|
60
|
-
if (message === 'ready') {
|
|
61
|
-
//console.log(`MCP Server ${serverId} ready on port ${port}`);
|
|
62
|
-
resolve(port);
|
|
63
|
-
}
|
|
64
|
-
});
|
|
65
|
-
mcpProcess.on('error', (error) => {
|
|
66
|
-
console.error(`MCP Server ${serverId} error:`, error);
|
|
67
|
-
reject(error);
|
|
68
|
-
});
|
|
69
|
-
mcpProcess.on('exit', (code) => {
|
|
70
|
-
//console.log(`MCP Server ${serverId} exited with code ${code}`);
|
|
71
|
-
if (serverInfo.runtimeProcess === mcpProcess) {
|
|
72
|
-
serverInfo.runtimeProcess = undefined;
|
|
73
|
-
serverInfo.runtimePort = undefined;
|
|
74
|
-
}
|
|
75
|
-
});
|
|
76
|
-
// Update server info
|
|
77
|
-
serverInfo.runtimeProcess = mcpProcess;
|
|
78
|
-
serverInfo.runtimePort = port;
|
|
79
|
-
// Fallback timeout
|
|
80
|
-
setTimeout(() => {
|
|
81
|
-
if (serverInfo.runtimePort === port) {
|
|
82
|
-
resolve(port);
|
|
83
|
-
}
|
|
84
|
-
}, 3000);
|
|
85
|
-
});
|
|
86
|
-
}
|
|
87
|
-
// Store generated servers in memory (in production, use a database)
|
|
88
|
-
const generatedServers = new Map();
|
|
89
|
-
// Health check endpoint
|
|
90
|
-
app.get('/api/health', (req, res) => {
|
|
91
|
-
res.json({ status: 'OK', timestamp: new Date().toISOString() });
|
|
92
|
-
});
|
|
93
|
-
// Parse data source endpoint
|
|
94
|
-
app.post('/api/parse', upload.single('file'), async (req, res) => {
|
|
95
|
-
try {
|
|
96
|
-
const { type, connection } = req.body;
|
|
97
|
-
const file = req.file;
|
|
98
|
-
let dataSource;
|
|
99
|
-
if (type === 'database') {
|
|
100
|
-
dataSource = {
|
|
101
|
-
type: 'database',
|
|
102
|
-
name: `Database (${connection.type})`,
|
|
103
|
-
connection: JSON.parse(connection)
|
|
104
|
-
};
|
|
105
|
-
}
|
|
106
|
-
else if (file) {
|
|
107
|
-
dataSource = {
|
|
108
|
-
type: type,
|
|
109
|
-
name: file.originalname,
|
|
110
|
-
filePath: file.path
|
|
111
|
-
};
|
|
112
|
-
}
|
|
113
|
-
else {
|
|
114
|
-
throw new Error('No file or connection provided');
|
|
115
|
-
}
|
|
116
|
-
const parsedData = await parser.parse(dataSource);
|
|
117
|
-
res.json({
|
|
118
|
-
success: true,
|
|
119
|
-
data: {
|
|
120
|
-
dataSource,
|
|
121
|
-
parsedData: parsedData.map(data => ({
|
|
122
|
-
...data,
|
|
123
|
-
rows: data.rows.slice(0, 10) // Limit preview rows
|
|
124
|
-
}))
|
|
125
|
-
}
|
|
126
|
-
});
|
|
127
|
-
}
|
|
128
|
-
catch (error) {
|
|
129
|
-
console.error('Parse error:', error);
|
|
130
|
-
res.status(400).json({
|
|
131
|
-
success: false,
|
|
132
|
-
error: error instanceof Error ? error.message : 'Unknown error'
|
|
133
|
-
});
|
|
134
|
-
}
|
|
135
|
-
});
|
|
136
|
-
// Generate MCP server endpoint
|
|
137
|
-
app.post('/api/generate', async (req, res) => {
|
|
138
|
-
try {
|
|
139
|
-
const { name, description, version, dataSource, selectedTables, parsedData } = req.body;
|
|
140
|
-
console.log('🔍 Generate request received:');
|
|
141
|
-
console.log('- Name:', name);
|
|
142
|
-
console.log('- Selected tables:', selectedTables?.length || 0);
|
|
143
|
-
console.log('- Parsed data tables:', parsedData?.length || 0);
|
|
144
|
-
// Check if server with this name already exists
|
|
145
|
-
const existingServer = generator.getServer(name);
|
|
146
|
-
if (existingServer) {
|
|
147
|
-
return res.status(400).json({
|
|
148
|
-
success: false,
|
|
149
|
-
error: `MCP Server with name "${name}" already exists. Please choose a different name.`
|
|
150
|
-
});
|
|
151
|
-
}
|
|
152
|
-
// Use provided parsed data or re-parse if not available
|
|
153
|
-
const fullParsedData = parsedData || await parser.parse(dataSource);
|
|
154
|
-
// Convert to the format expected by new generator
|
|
155
|
-
const parsedDataObject = {};
|
|
156
|
-
fullParsedData.forEach((data, index) => {
|
|
157
|
-
const tableName = data.tableName || `table_${index}`;
|
|
158
|
-
parsedDataObject[tableName] = data.rows.map(row => {
|
|
159
|
-
const obj = {};
|
|
160
|
-
data.headers.forEach((header, i) => {
|
|
161
|
-
obj[header] = row[i];
|
|
162
|
-
});
|
|
163
|
-
return obj;
|
|
164
|
-
});
|
|
165
|
-
});
|
|
166
|
-
// Generate virtual server (saves to SQLite database)
|
|
167
|
-
console.log(`🎯 API calling generateServer with name: "${name}"`);
|
|
168
|
-
const result = await generator.generateServer(name, // serverId
|
|
169
|
-
name, // serverName (use the name from form as server name)
|
|
170
|
-
parsedDataObject, dataSource.connection || { type: 'csv', server: 'local', database: name }, selectedTables // selectedTables configuration
|
|
171
|
-
);
|
|
172
|
-
if (result.success) {
|
|
173
|
-
// Get counts for display
|
|
174
|
-
const tools = generator.getToolsForServer(name);
|
|
175
|
-
const resources = generator.getResourcesForServer(name);
|
|
176
|
-
res.json({
|
|
177
|
-
success: true,
|
|
178
|
-
data: {
|
|
179
|
-
serverId: name,
|
|
180
|
-
message: result.message,
|
|
181
|
-
toolsCount: tools.length,
|
|
182
|
-
resourcesCount: resources.length,
|
|
183
|
-
promptsCount: 0 // We don't generate prompts yet
|
|
184
|
-
}
|
|
185
|
-
});
|
|
186
|
-
}
|
|
187
|
-
else {
|
|
188
|
-
res.status(400).json({
|
|
189
|
-
success: false,
|
|
190
|
-
error: result.message
|
|
191
|
-
});
|
|
192
|
-
}
|
|
193
|
-
}
|
|
194
|
-
catch (error) {
|
|
195
|
-
console.error('Generation error:', error);
|
|
196
|
-
res.status(400).json({
|
|
197
|
-
success: false,
|
|
198
|
-
error: error instanceof Error ? error.message : 'Unknown error'
|
|
199
|
-
});
|
|
200
|
-
}
|
|
201
|
-
});
|
|
202
|
-
// List generated servers endpoint
|
|
203
|
-
app.get('/api/servers', (req, res) => {
|
|
204
|
-
const allServers = generator.getAllServers();
|
|
205
|
-
const servers = allServers.map(server => {
|
|
206
|
-
const tools = generator.getToolsForServer(server.id);
|
|
207
|
-
const resources = generator.getResourcesForServer(server.id);
|
|
208
|
-
return {
|
|
209
|
-
id: server.id,
|
|
210
|
-
name: server.name,
|
|
211
|
-
description: `${server.name} - Virtual MCP Server (${server.dbConfig.type})`,
|
|
212
|
-
version: "1.0.0",
|
|
213
|
-
toolsCount: tools.length,
|
|
214
|
-
resourcesCount: resources.length,
|
|
215
|
-
promptsCount: 0,
|
|
216
|
-
};
|
|
217
|
-
});
|
|
218
|
-
res.json({ success: true, data: servers });
|
|
219
|
-
});
|
|
220
|
-
// Check if server name is available endpoint
|
|
221
|
-
app.get('/api/servers/check-name/:name', (req, res) => {
|
|
222
|
-
const serverName = req.params.name;
|
|
223
|
-
const existingServer = generator.getServer(serverName);
|
|
224
|
-
const isAvailable = !existingServer;
|
|
225
|
-
res.json({
|
|
226
|
-
success: true,
|
|
227
|
-
available: isAvailable,
|
|
228
|
-
message: isAvailable ?
|
|
229
|
-
`Server name "${serverName}" is available` :
|
|
230
|
-
`Server name "${serverName}" already exists`
|
|
231
|
-
});
|
|
232
|
-
});
|
|
233
|
-
// Get server details endpoint
|
|
234
|
-
app.get('/api/servers/:id', (req, res) => {
|
|
235
|
-
const server = generator.getServer(req.params.id);
|
|
236
|
-
if (!server) {
|
|
237
|
-
return res.status(404).json({
|
|
238
|
-
success: false,
|
|
239
|
-
error: 'Server not found'
|
|
240
|
-
});
|
|
241
|
-
}
|
|
242
|
-
const tools = generator.getToolsForServer(server.id);
|
|
243
|
-
const resources = generator.getResourcesForServer(server.id);
|
|
244
|
-
res.json({
|
|
245
|
-
success: true,
|
|
246
|
-
data: {
|
|
247
|
-
config: {
|
|
248
|
-
name: server.name,
|
|
249
|
-
description: `${server.name} - Virtual MCP Server (${server.dbConfig.type})`,
|
|
250
|
-
version: "1.0.0",
|
|
251
|
-
tools: tools.map(tool => ({
|
|
252
|
-
name: tool.name,
|
|
253
|
-
description: tool.description,
|
|
254
|
-
inputSchema: tool.inputSchema,
|
|
255
|
-
operation: tool.operation
|
|
256
|
-
})),
|
|
257
|
-
resources: resources.map(resource => ({
|
|
258
|
-
name: resource.name,
|
|
259
|
-
description: resource.description,
|
|
260
|
-
uri_template: resource.uri_template
|
|
261
|
-
})),
|
|
262
|
-
prompts: []
|
|
263
|
-
},
|
|
264
|
-
parsedData: []
|
|
265
|
-
}
|
|
266
|
-
});
|
|
267
|
-
});
|
|
268
|
-
// Get server data endpoint - provides sample data from database
|
|
269
|
-
app.get('/api/servers/:id/data', async (req, res) => {
|
|
270
|
-
try {
|
|
271
|
-
const serverId = req.params.id;
|
|
272
|
-
const limit = parseInt(req.query.limit) || 10;
|
|
273
|
-
const server = generator.getServer(serverId);
|
|
274
|
-
if (!server) {
|
|
275
|
-
return res.status(404).json({
|
|
276
|
-
success: false,
|
|
277
|
-
error: 'Server not found'
|
|
278
|
-
});
|
|
279
|
-
}
|
|
280
|
-
// Use the DynamicMCPExecutor to get data from first available SELECT tool
|
|
281
|
-
const { DynamicMCPExecutor } = require('../dynamic-mcp-executor.js');
|
|
282
|
-
const executor = new DynamicMCPExecutor();
|
|
283
|
-
const tools = generator.getToolsForServer(serverId);
|
|
284
|
-
const selectTool = tools.find(tool => tool.operation === 'SELECT');
|
|
285
|
-
if (!selectTool) {
|
|
286
|
-
return res.json({
|
|
287
|
-
success: true,
|
|
288
|
-
data: []
|
|
289
|
-
});
|
|
290
|
-
}
|
|
291
|
-
// Execute the first SELECT tool to get sample data
|
|
292
|
-
const result = await executor.executeTool(`${serverId}__${selectTool.name}`, { limit: limit });
|
|
293
|
-
if (result.success && result.data) {
|
|
294
|
-
// Transform the data to match expected format
|
|
295
|
-
const sampleData = Array.isArray(result.data) ? result.data : [];
|
|
296
|
-
res.json({
|
|
297
|
-
success: true,
|
|
298
|
-
data: sampleData.slice(0, limit)
|
|
299
|
-
});
|
|
300
|
-
}
|
|
301
|
-
else {
|
|
302
|
-
res.json({
|
|
303
|
-
success: true,
|
|
304
|
-
data: []
|
|
305
|
-
});
|
|
306
|
-
}
|
|
307
|
-
}
|
|
308
|
-
catch (error) {
|
|
309
|
-
console.error('Error getting server data:', error);
|
|
310
|
-
res.status(400).json({
|
|
311
|
-
success: false,
|
|
312
|
-
error: error instanceof Error ? error.message : 'Unknown error'
|
|
313
|
-
});
|
|
314
|
-
}
|
|
315
|
-
});
|
|
316
|
-
// Test server endpoint
|
|
317
|
-
app.post('/api/servers/:id/test', async (req, res) => {
|
|
318
|
-
try {
|
|
319
|
-
// Get server from SQLite database
|
|
320
|
-
const server = sqliteManager.getServer(req.params.id);
|
|
321
|
-
if (!server) {
|
|
322
|
-
return res.status(404).json({
|
|
323
|
-
success: false,
|
|
324
|
-
error: 'Server not found'
|
|
325
|
-
});
|
|
326
|
-
}
|
|
327
|
-
// Get tools for this server
|
|
328
|
-
const tools = sqliteManager.getToolsForServer(req.params.id);
|
|
329
|
-
// Check if this is a custom test or auto test
|
|
330
|
-
const { runAll, testType, toolName, parameters } = req.body;
|
|
331
|
-
// For custom tool test
|
|
332
|
-
if (testType === 'tools/call' && toolName) {
|
|
333
|
-
try {
|
|
334
|
-
const { DynamicMCPExecutor } = require('../dynamic-mcp-executor.js');
|
|
335
|
-
const executor = new DynamicMCPExecutor();
|
|
336
|
-
// Find the specific tool
|
|
337
|
-
const tool = tools.find(t => t.name === toolName);
|
|
338
|
-
if (!tool) {
|
|
339
|
-
return res.status(404).json({
|
|
340
|
-
success: false,
|
|
341
|
-
error: `Tool "${toolName}" not found`
|
|
342
|
-
});
|
|
343
|
-
}
|
|
344
|
-
const result = await executor.executeTool(`${req.params.id}__${toolName}`, parameters || {});
|
|
345
|
-
res.json({
|
|
346
|
-
success: true,
|
|
347
|
-
data: {
|
|
348
|
-
tool: toolName,
|
|
349
|
-
status: 'success',
|
|
350
|
-
description: tool.description,
|
|
351
|
-
parameters: parameters || {},
|
|
352
|
-
result: result.success ? 'Tool executed successfully' : result,
|
|
353
|
-
rowCount: result.rowCount || 0
|
|
354
|
-
}
|
|
355
|
-
});
|
|
356
|
-
return;
|
|
357
|
-
}
|
|
358
|
-
catch (error) {
|
|
359
|
-
res.json({
|
|
360
|
-
success: true,
|
|
361
|
-
data: {
|
|
362
|
-
tool: toolName,
|
|
363
|
-
status: 'error',
|
|
364
|
-
description: tools.find(t => t.name === toolName)?.description || '',
|
|
365
|
-
parameters: parameters || {},
|
|
366
|
-
error: error instanceof Error ? error.message : 'Unknown error'
|
|
367
|
-
}
|
|
368
|
-
});
|
|
369
|
-
return;
|
|
370
|
-
}
|
|
371
|
-
}
|
|
372
|
-
// For auto test, run a sample of available tools
|
|
373
|
-
const testResults = [];
|
|
374
|
-
// Test either all tools or just a quick sample
|
|
375
|
-
const toolsToTest = runAll ? tools : tools.slice(0, 3);
|
|
376
|
-
for (const tool of toolsToTest) {
|
|
377
|
-
try {
|
|
378
|
-
// Use DynamicMCPExecutor to test the tool
|
|
379
|
-
const { DynamicMCPExecutor } = require('../dynamic-mcp-executor.js');
|
|
380
|
-
const executor = new DynamicMCPExecutor();
|
|
381
|
-
// Prepare test parameters based on tool schema
|
|
382
|
-
const testParams = {};
|
|
383
|
-
if (tool.inputSchema && typeof tool.inputSchema === 'object' && tool.inputSchema.properties) {
|
|
384
|
-
for (const [paramName, paramDef] of Object.entries(tool.inputSchema.properties)) {
|
|
385
|
-
if (paramName === 'limit')
|
|
386
|
-
testParams[paramName] = 5;
|
|
387
|
-
else if (paramName === 'offset')
|
|
388
|
-
testParams[paramName] = 0;
|
|
389
|
-
// Add other default test values as needed
|
|
390
|
-
}
|
|
391
|
-
}
|
|
392
|
-
const result = await executor.executeTool(`${req.params.id}__${tool.name}`, testParams);
|
|
393
|
-
testResults.push({
|
|
394
|
-
tool: tool.name,
|
|
395
|
-
status: 'success',
|
|
396
|
-
description: tool.description,
|
|
397
|
-
parameters: testParams,
|
|
398
|
-
result: result.success ? 'Tool executed successfully' : result,
|
|
399
|
-
rowCount: result.rowCount || 0
|
|
400
|
-
});
|
|
401
|
-
}
|
|
402
|
-
catch (error) {
|
|
403
|
-
testResults.push({
|
|
404
|
-
tool: tool.name,
|
|
405
|
-
status: 'error',
|
|
406
|
-
description: tool.description,
|
|
407
|
-
error: error instanceof Error ? error.message : 'Unknown error'
|
|
408
|
-
});
|
|
409
|
-
}
|
|
410
|
-
}
|
|
411
|
-
res.json({
|
|
412
|
-
success: true,
|
|
413
|
-
data: {
|
|
414
|
-
serverName: server.name,
|
|
415
|
-
toolsCount: tools.length,
|
|
416
|
-
testsRun: testResults.length,
|
|
417
|
-
results: testResults
|
|
418
|
-
}
|
|
419
|
-
});
|
|
420
|
-
}
|
|
421
|
-
catch (error) {
|
|
422
|
-
console.error('Test error:', error);
|
|
423
|
-
res.status(400).json({
|
|
424
|
-
success: false,
|
|
425
|
-
error: error instanceof Error ? error.message : 'Unknown error'
|
|
426
|
-
});
|
|
427
|
-
}
|
|
428
|
-
});
|
|
429
|
-
// Delete server endpoint
|
|
430
|
-
app.delete('/api/servers/:id', async (req, res) => {
|
|
431
|
-
try {
|
|
432
|
-
const serverId = req.params.id;
|
|
433
|
-
console.log(`Attempting to delete server with ID: ${serverId}`);
|
|
434
|
-
// Check if server exists in JSON database
|
|
435
|
-
const existingServer = generator.getServer(serverId);
|
|
436
|
-
if (!existingServer) {
|
|
437
|
-
console.log(`Server with ID "${serverId}" not found in database`);
|
|
438
|
-
return res.status(404).json({
|
|
439
|
-
success: false,
|
|
440
|
-
error: `Server with ID "${serverId}" not found`
|
|
441
|
-
});
|
|
442
|
-
}
|
|
443
|
-
// Delete from JSON database (primary storage)
|
|
444
|
-
generator.deleteServer(serverId);
|
|
445
|
-
console.log(`Deleted server "${serverId}" from JSON database`);
|
|
446
|
-
// Also check and remove from in-memory store if exists
|
|
447
|
-
const serverInfo = generatedServers.get(serverId);
|
|
448
|
-
if (serverInfo) {
|
|
449
|
-
// Remove server files
|
|
450
|
-
const serverDir = path_1.default.dirname(serverInfo.serverPath);
|
|
451
|
-
await promises_1.default.rm(serverDir, { recursive: true, force: true });
|
|
452
|
-
console.log(`Removed server files from ${serverDir}`);
|
|
453
|
-
}
|
|
454
|
-
// Remove from memory
|
|
455
|
-
generatedServers.delete(req.params.id);
|
|
456
|
-
res.json({ success: true });
|
|
457
|
-
}
|
|
458
|
-
catch (error) {
|
|
459
|
-
console.error('Delete error:', error);
|
|
460
|
-
res.status(400).json({
|
|
461
|
-
success: false,
|
|
462
|
-
error: error instanceof Error ? error.message : 'Unknown error'
|
|
463
|
-
});
|
|
464
|
-
}
|
|
465
|
-
});
|
|
466
|
-
// Start runtime server endpoint
|
|
467
|
-
app.post('/api/servers/:id/start-runtime', async (req, res) => {
|
|
468
|
-
try {
|
|
469
|
-
const serverInfo = generatedServers.get(req.params.id);
|
|
470
|
-
if (!serverInfo) {
|
|
471
|
-
return res.status(404).json({
|
|
472
|
-
success: false,
|
|
473
|
-
error: 'Server not found'
|
|
474
|
-
});
|
|
475
|
-
}
|
|
476
|
-
const port = await startRuntimeMCPServer(req.params.id, serverInfo.serverPath);
|
|
477
|
-
res.json({
|
|
478
|
-
success: true,
|
|
479
|
-
data: {
|
|
480
|
-
serverId: req.params.id,
|
|
481
|
-
port,
|
|
482
|
-
endpoint: `http://localhost:${port}`,
|
|
483
|
-
claudeConfig: {
|
|
484
|
-
[serverInfo.config.name]: {
|
|
485
|
-
command: "curl",
|
|
486
|
-
args: ["-X", "POST", `http://localhost:${port}/sse/message`],
|
|
487
|
-
env: {
|
|
488
|
-
MCP_TRANSPORT: "sse"
|
|
489
|
-
}
|
|
490
|
-
}
|
|
491
|
-
}
|
|
492
|
-
}
|
|
493
|
-
});
|
|
494
|
-
}
|
|
495
|
-
catch (error) {
|
|
496
|
-
console.error('Runtime start error:', error);
|
|
497
|
-
res.status(500).json({
|
|
498
|
-
success: false,
|
|
499
|
-
error: error instanceof Error ? error.message : 'Unknown error'
|
|
500
|
-
});
|
|
501
|
-
}
|
|
502
|
-
});
|
|
503
|
-
// Stop runtime server endpoint
|
|
504
|
-
app.post('/api/servers/:id/stop-runtime', (req, res) => {
|
|
505
|
-
const serverInfo = generatedServers.get(req.params.id);
|
|
506
|
-
if (!serverInfo) {
|
|
507
|
-
return res.status(404).json({
|
|
508
|
-
success: false,
|
|
509
|
-
error: 'Server not found'
|
|
510
|
-
});
|
|
511
|
-
}
|
|
512
|
-
if (serverInfo.runtimeProcess) {
|
|
513
|
-
serverInfo.runtimeProcess.kill();
|
|
514
|
-
serverInfo.runtimeProcess = undefined;
|
|
515
|
-
serverInfo.runtimePort = undefined;
|
|
516
|
-
}
|
|
517
|
-
res.json({ success: true });
|
|
518
|
-
});
|
|
519
|
-
// Export server endpoint
|
|
520
|
-
app.get('/api/servers/:id/export', (req, res) => {
|
|
521
|
-
const serverInfo = generatedServers.get(req.params.id);
|
|
522
|
-
if (!serverInfo) {
|
|
523
|
-
return res.status(404).json({
|
|
524
|
-
success: false,
|
|
525
|
-
error: 'Server not found'
|
|
526
|
-
});
|
|
527
|
-
}
|
|
528
|
-
const serverDir = path_1.default.dirname(serverInfo.serverPath);
|
|
529
|
-
const archiveName = `${serverInfo.config.name}-mcp-server.zip`;
|
|
530
|
-
// In a real implementation, you'd create a zip file here
|
|
531
|
-
res.json({
|
|
532
|
-
success: true,
|
|
533
|
-
data: {
|
|
534
|
-
downloadUrl: `/api/servers/${req.params.id}/download`,
|
|
535
|
-
filename: archiveName
|
|
536
|
-
}
|
|
537
|
-
});
|
|
538
|
-
});
|
|
539
|
-
// Serve the main HTML page
|
|
540
|
-
// Serve specific HTML files for different routes
|
|
541
|
-
app.get('/manage-servers', (req, res) => {
|
|
542
|
-
res.sendFile(path_1.default.join(publicDir, 'manage-servers.html'));
|
|
543
|
-
});
|
|
544
|
-
app.get('/test-servers', (req, res) => {
|
|
545
|
-
res.sendFile(path_1.default.join(publicDir, 'test-servers.html'));
|
|
546
|
-
});
|
|
547
|
-
app.get('/database-tables', (req, res) => {
|
|
548
|
-
res.sendFile(path_1.default.join(publicDir, 'database-tables.html'));
|
|
549
|
-
});
|
|
550
|
-
app.get('/how-to-use', (req, res) => {
|
|
551
|
-
res.sendFile(path_1.default.join(publicDir, 'how-to-use.html'));
|
|
552
|
-
});
|
|
553
|
-
// Database tables API endpoints
|
|
554
|
-
app.get('/api/database/tables', (req, res) => {
|
|
555
|
-
try {
|
|
556
|
-
// Get database path
|
|
557
|
-
const dbPath = path_1.default.join(process.cwd(), 'data', 'quickmcp.sqlite');
|
|
558
|
-
// Open database connection
|
|
559
|
-
const db = new better_sqlite3_1.default(dbPath);
|
|
560
|
-
// Get all table names
|
|
561
|
-
const tables = db.prepare("SELECT name FROM sqlite_master WHERE type='table' AND name NOT LIKE 'sqlite_%'").all();
|
|
562
|
-
const tablesInfo = tables.map(table => {
|
|
563
|
-
const tableName = table.name;
|
|
564
|
-
// Get column information
|
|
565
|
-
const columns = db.prepare(`PRAGMA table_info(${tableName})`).all();
|
|
566
|
-
// Get row count
|
|
567
|
-
const rowCountResult = db.prepare(`SELECT COUNT(*) as count FROM ${tableName}`).get();
|
|
568
|
-
const rowCount = rowCountResult?.count || 0;
|
|
569
|
-
// Get sample data (first 5 rows)
|
|
570
|
-
const sampleData = db.prepare(`SELECT * FROM ${tableName} LIMIT 5`).all();
|
|
571
|
-
return {
|
|
572
|
-
name: tableName,
|
|
573
|
-
columns: columns.map(col => ({
|
|
574
|
-
name: col.name,
|
|
575
|
-
type: col.type,
|
|
576
|
-
notnull: col.notnull === 1,
|
|
577
|
-
pk: col.pk === 1
|
|
578
|
-
})),
|
|
579
|
-
rowCount,
|
|
580
|
-
sampleData
|
|
581
|
-
};
|
|
582
|
-
});
|
|
583
|
-
db.close();
|
|
584
|
-
res.json({
|
|
585
|
-
success: true,
|
|
586
|
-
data: {
|
|
587
|
-
dbPath,
|
|
588
|
-
tables: tablesInfo
|
|
589
|
-
}
|
|
590
|
-
});
|
|
591
|
-
}
|
|
592
|
-
catch (error) {
|
|
593
|
-
console.error('Database tables error:', error);
|
|
594
|
-
res.status(400).json({
|
|
595
|
-
success: false,
|
|
596
|
-
error: error instanceof Error ? error.message : 'Unknown error'
|
|
597
|
-
});
|
|
598
|
-
}
|
|
599
|
-
});
|
|
600
|
-
// Get specific table details
|
|
601
|
-
app.get('/api/database/tables/:tableName', (req, res) => {
|
|
602
|
-
try {
|
|
603
|
-
const tableName = req.params.tableName;
|
|
604
|
-
const dbPath = path_1.default.join(process.cwd(), 'data', 'quickmcp.sqlite');
|
|
605
|
-
// Validate table name to prevent SQL injection
|
|
606
|
-
if (!/^[a-zA-Z0-9_]+$/.test(tableName)) {
|
|
607
|
-
return res.status(400).json({
|
|
608
|
-
success: false,
|
|
609
|
-
error: 'Invalid table name'
|
|
610
|
-
});
|
|
611
|
-
}
|
|
612
|
-
const db = new better_sqlite3_1.default(dbPath);
|
|
613
|
-
// Check if table exists
|
|
614
|
-
const tableExists = db.prepare("SELECT name FROM sqlite_master WHERE type='table' AND name = ?").get(tableName);
|
|
615
|
-
if (!tableExists) {
|
|
616
|
-
db.close();
|
|
617
|
-
return res.status(404).json({
|
|
618
|
-
success: false,
|
|
619
|
-
error: 'Table not found'
|
|
620
|
-
});
|
|
621
|
-
}
|
|
622
|
-
// Get column information
|
|
623
|
-
const columns = db.prepare(`PRAGMA table_info(${tableName})`).all();
|
|
624
|
-
// Get row count
|
|
625
|
-
const rowCountResult = db.prepare(`SELECT COUNT(*) as count FROM ${tableName}`).get();
|
|
626
|
-
const rowCount = rowCountResult?.count || 0;
|
|
627
|
-
// Get sample data (first 10 rows)
|
|
628
|
-
const sampleData = db.prepare(`SELECT * FROM ${tableName} LIMIT 10`).all();
|
|
629
|
-
db.close();
|
|
630
|
-
res.json({
|
|
631
|
-
success: true,
|
|
632
|
-
data: {
|
|
633
|
-
name: tableName,
|
|
634
|
-
columns: columns.map(col => ({
|
|
635
|
-
name: col.name,
|
|
636
|
-
type: col.type,
|
|
637
|
-
notnull: col.notnull === 1,
|
|
638
|
-
pk: col.pk === 1
|
|
639
|
-
})),
|
|
640
|
-
rowCount,
|
|
641
|
-
sampleData
|
|
642
|
-
}
|
|
643
|
-
});
|
|
644
|
-
}
|
|
645
|
-
catch (error) {
|
|
646
|
-
console.error('Table details error:', error);
|
|
647
|
-
res.status(400).json({
|
|
648
|
-
success: false,
|
|
649
|
-
error: error instanceof Error ? error.message : 'Unknown error'
|
|
650
|
-
});
|
|
651
|
-
}
|
|
652
|
-
});
|
|
653
|
-
// STDIO bridge endpoint for MCP
|
|
654
|
-
app.post('/api/mcp-stdio', (req, res) => {
|
|
655
|
-
console.log('MCP STDIO bridge connection established');
|
|
656
|
-
// Set headers for keeping connection alive
|
|
657
|
-
res.setHeader('Content-Type', 'application/json');
|
|
658
|
-
res.setHeader('Cache-Control', 'no-cache');
|
|
659
|
-
let buffer = '';
|
|
660
|
-
req.on('data', (chunk) => {
|
|
661
|
-
buffer += chunk.toString();
|
|
662
|
-
console.log('Received chunk:', chunk.toString());
|
|
663
|
-
// Process complete JSON-RPC messages
|
|
664
|
-
const lines = buffer.split('\n');
|
|
665
|
-
buffer = lines.pop() || ''; // Keep incomplete line in buffer
|
|
666
|
-
for (const line of lines) {
|
|
667
|
-
if (line.trim()) {
|
|
668
|
-
let message = null;
|
|
669
|
-
try {
|
|
670
|
-
message = JSON.parse(line);
|
|
671
|
-
console.log('Processing MCP message:', JSON.stringify(message, null, 2));
|
|
672
|
-
let response = null;
|
|
673
|
-
// Handle MCP initialize request
|
|
674
|
-
if (message.method === 'initialize') {
|
|
675
|
-
response = {
|
|
676
|
-
jsonrpc: '2.0',
|
|
677
|
-
id: message.id,
|
|
678
|
-
result: {
|
|
679
|
-
protocolVersion: '2024-11-05',
|
|
680
|
-
serverInfo: {
|
|
681
|
-
name: 'quickmcp-integrated',
|
|
682
|
-
version: '1.0.0'
|
|
683
|
-
},
|
|
684
|
-
capabilities: {
|
|
685
|
-
tools: {},
|
|
686
|
-
resources: {},
|
|
687
|
-
prompts: {}
|
|
688
|
-
}
|
|
689
|
-
}
|
|
690
|
-
};
|
|
691
|
-
}
|
|
692
|
-
// Handle tools/list request
|
|
693
|
-
else if (message.method === 'tools/list') {
|
|
694
|
-
const tools = [];
|
|
695
|
-
// Add tools from all generated servers
|
|
696
|
-
for (const [serverId, serverInfo] of generatedServers) {
|
|
697
|
-
for (const tool of serverInfo.config.tools) {
|
|
698
|
-
tools.push({
|
|
699
|
-
name: `${serverId}__${tool.name}`,
|
|
700
|
-
description: `[${serverInfo.config.name}] ${tool.description}`,
|
|
701
|
-
inputSchema: tool.inputSchema
|
|
702
|
-
});
|
|
703
|
-
}
|
|
704
|
-
}
|
|
705
|
-
// Add management tools
|
|
706
|
-
tools.push({
|
|
707
|
-
name: 'quickmcp__list_servers',
|
|
708
|
-
description: 'List all generated MCP servers',
|
|
709
|
-
inputSchema: {
|
|
710
|
-
type: 'object',
|
|
711
|
-
properties: {},
|
|
712
|
-
required: []
|
|
713
|
-
}
|
|
714
|
-
});
|
|
715
|
-
response = {
|
|
716
|
-
jsonrpc: '2.0',
|
|
717
|
-
id: message.id,
|
|
718
|
-
result: { tools }
|
|
719
|
-
};
|
|
720
|
-
}
|
|
721
|
-
// Handle initialized notification (no response needed)
|
|
722
|
-
else if (message.method === 'notifications/initialized') {
|
|
723
|
-
//console.log('MCP client initialized');
|
|
724
|
-
// No response for notifications
|
|
725
|
-
}
|
|
726
|
-
// Handle other requests with placeholder responses
|
|
727
|
-
else if (message.id) {
|
|
728
|
-
response = {
|
|
729
|
-
jsonrpc: '2.0',
|
|
730
|
-
id: message.id,
|
|
731
|
-
result: {}
|
|
732
|
-
};
|
|
733
|
-
}
|
|
734
|
-
// Send response if we have one
|
|
735
|
-
if (response) {
|
|
736
|
-
const responseStr = JSON.stringify(response) + '\n';
|
|
737
|
-
console.log('Sending response:', responseStr.trim());
|
|
738
|
-
res.write(responseStr);
|
|
739
|
-
}
|
|
740
|
-
}
|
|
741
|
-
catch (error) {
|
|
742
|
-
console.error('Error processing MCP message:', error);
|
|
743
|
-
if (message && message.id) {
|
|
744
|
-
const errorResponse = {
|
|
745
|
-
jsonrpc: '2.0',
|
|
746
|
-
id: message.id,
|
|
747
|
-
error: {
|
|
748
|
-
code: -32603,
|
|
749
|
-
message: 'Internal error'
|
|
750
|
-
}
|
|
751
|
-
};
|
|
752
|
-
res.write(JSON.stringify(errorResponse) + '\n');
|
|
753
|
-
}
|
|
754
|
-
}
|
|
755
|
-
}
|
|
756
|
-
}
|
|
757
|
-
});
|
|
758
|
-
req.on('end', () => {
|
|
759
|
-
console.error('MCP stdio connection ended');
|
|
760
|
-
res.end();
|
|
761
|
-
});
|
|
762
|
-
req.on('error', (error) => {
|
|
763
|
-
console.error('MCP stdio connection error:', error);
|
|
764
|
-
res.end();
|
|
765
|
-
});
|
|
766
|
-
req.on('close', () => {
|
|
767
|
-
console.error('MCP stdio connection closed');
|
|
768
|
-
});
|
|
769
|
-
});
|
|
770
|
-
// Serve index.html for root and any other routes
|
|
771
|
-
app.get('*', (req, res) => {
|
|
772
|
-
res.sendFile(path_1.default.join(publicDir, 'index.html'));
|
|
773
|
-
});
|
|
774
|
-
const PORT = process.env.PORT || 3000;
|
|
775
|
-
const MCP_PORT = 3001;
|
|
776
|
-
// Initialize integrated MCP server
|
|
777
|
-
const integratedMCPServer = new integrated_mcp_server_new_1.IntegratedMCPServer();
|
|
778
|
-
app.listen(PORT, async () => {
|
|
779
|
-
//console.error(`🌐 MCP Server Generator running on http://localhost:${PORT}`);
|
|
780
|
-
// Start integrated MCP server
|
|
781
|
-
try {
|
|
782
|
-
await integratedMCPServer.start(MCP_PORT);
|
|
783
|
-
// Configuration info is now available in the How to Use page
|
|
784
|
-
}
|
|
785
|
-
catch (error) {
|
|
786
|
-
console.error('❌ Failed to start integrated MCP server:', error);
|
|
787
|
-
}
|
|
788
|
-
});
|
|
789
|
-
exports.default = app;
|
|
790
|
-
//# sourceMappingURL=server.js.map
|