@softtechai/quickmcp 1.0.14 → 1.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/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 +245 -163
- 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/web/server.js
DELETED
|
@@ -1,860 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __assign = (this && this.__assign) || function () {
|
|
3
|
-
__assign = Object.assign || function(t) {
|
|
4
|
-
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
5
|
-
s = arguments[i];
|
|
6
|
-
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
7
|
-
t[p] = s[p];
|
|
8
|
-
}
|
|
9
|
-
return t;
|
|
10
|
-
};
|
|
11
|
-
return __assign.apply(this, arguments);
|
|
12
|
-
};
|
|
13
|
-
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
14
|
-
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
15
|
-
return new (P || (P = Promise))(function (resolve, reject) {
|
|
16
|
-
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
17
|
-
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
18
|
-
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
19
|
-
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
20
|
-
});
|
|
21
|
-
};
|
|
22
|
-
var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
23
|
-
var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g = Object.create((typeof Iterator === "function" ? Iterator : Object).prototype);
|
|
24
|
-
return g.next = verb(0), g["throw"] = verb(1), g["return"] = verb(2), typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
|
|
25
|
-
function verb(n) { return function (v) { return step([n, v]); }; }
|
|
26
|
-
function step(op) {
|
|
27
|
-
if (f) throw new TypeError("Generator is already executing.");
|
|
28
|
-
while (g && (g = 0, op[0] && (_ = 0)), _) try {
|
|
29
|
-
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
|
|
30
|
-
if (y = 0, t) op = [op[0] & 2, t.value];
|
|
31
|
-
switch (op[0]) {
|
|
32
|
-
case 0: case 1: t = op; break;
|
|
33
|
-
case 4: _.label++; return { value: op[1], done: false };
|
|
34
|
-
case 5: _.label++; y = op[1]; op = [0]; continue;
|
|
35
|
-
case 7: op = _.ops.pop(); _.trys.pop(); continue;
|
|
36
|
-
default:
|
|
37
|
-
if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
|
|
38
|
-
if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
|
|
39
|
-
if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
|
|
40
|
-
if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
|
|
41
|
-
if (t[2]) _.ops.pop();
|
|
42
|
-
_.trys.pop(); continue;
|
|
43
|
-
}
|
|
44
|
-
op = body.call(thisArg, _);
|
|
45
|
-
} catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
|
|
46
|
-
if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
|
|
47
|
-
}
|
|
48
|
-
};
|
|
49
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
50
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
51
|
-
};
|
|
52
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
53
|
-
var express_1 = __importDefault(require("express"));
|
|
54
|
-
var cors_1 = __importDefault(require("cors"));
|
|
55
|
-
var multer_1 = __importDefault(require("multer"));
|
|
56
|
-
var path_1 = __importDefault(require("path"));
|
|
57
|
-
var promises_1 = __importDefault(require("fs/promises"));
|
|
58
|
-
var parsers_1 = require("../parsers");
|
|
59
|
-
var MCPServerGenerator_1 = require("../generators/MCPServerGenerator");
|
|
60
|
-
var MCPTestRunner_1 = require("../client/MCPTestRunner");
|
|
61
|
-
var child_process_1 = require("child_process");
|
|
62
|
-
var integrated_mcp_server_new_1 = require("../integrated-mcp-server-new");
|
|
63
|
-
var sqlite_manager_1 = require("../database/sqlite-manager");
|
|
64
|
-
var better_sqlite3_1 = __importDefault(require("better-sqlite3"));
|
|
65
|
-
var app = (0, express_1.default)();
|
|
66
|
-
var upload = (0, multer_1.default)({ dest: 'uploads/' });
|
|
67
|
-
app.use((0, cors_1.default)());
|
|
68
|
-
app.use(express_1.default.json());
|
|
69
|
-
app.use(express_1.default.static(path_1.default.join(__dirname, 'public')));
|
|
70
|
-
var parser = new parsers_1.DataSourceParser();
|
|
71
|
-
var generator = new MCPServerGenerator_1.MCPServerGenerator();
|
|
72
|
-
var testRunner = new MCPTestRunner_1.MCPTestRunner();
|
|
73
|
-
var sqliteManager = new sqlite_manager_1.SQLiteManager();
|
|
74
|
-
var nextAvailablePort = 3001;
|
|
75
|
-
function getNextPort() {
|
|
76
|
-
return nextAvailablePort++;
|
|
77
|
-
}
|
|
78
|
-
function startRuntimeMCPServer(serverId, serverPath) {
|
|
79
|
-
return new Promise(function (resolve, reject) {
|
|
80
|
-
var serverInfo = generatedServers.get(serverId);
|
|
81
|
-
if (!serverInfo) {
|
|
82
|
-
reject(new Error('Server not found'));
|
|
83
|
-
return;
|
|
84
|
-
}
|
|
85
|
-
// Kill existing process if running
|
|
86
|
-
if (serverInfo.runtimeProcess) {
|
|
87
|
-
serverInfo.runtimeProcess.kill();
|
|
88
|
-
}
|
|
89
|
-
var port = getNextPort();
|
|
90
|
-
var serverDir = path_1.default.dirname(serverPath);
|
|
91
|
-
console.log("Starting runtime MCP server for ".concat(serverId, " on port ").concat(port));
|
|
92
|
-
// Fork the MCP server process
|
|
93
|
-
var mcpProcess = (0, child_process_1.fork)(serverPath, [], {
|
|
94
|
-
cwd: serverDir,
|
|
95
|
-
env: __assign(__assign({}, process.env), { MCP_PORT: port.toString() }),
|
|
96
|
-
stdio: ['pipe', 'pipe', 'pipe', 'ipc']
|
|
97
|
-
});
|
|
98
|
-
mcpProcess.on('message', function (message) {
|
|
99
|
-
if (message === 'ready') {
|
|
100
|
-
console.log("MCP Server ".concat(serverId, " ready on port ").concat(port));
|
|
101
|
-
resolve(port);
|
|
102
|
-
}
|
|
103
|
-
});
|
|
104
|
-
mcpProcess.on('error', function (error) {
|
|
105
|
-
console.error("MCP Server ".concat(serverId, " error:"), error);
|
|
106
|
-
reject(error);
|
|
107
|
-
});
|
|
108
|
-
mcpProcess.on('exit', function (code) {
|
|
109
|
-
console.log("MCP Server ".concat(serverId, " exited with code ").concat(code));
|
|
110
|
-
if (serverInfo.runtimeProcess === mcpProcess) {
|
|
111
|
-
serverInfo.runtimeProcess = undefined;
|
|
112
|
-
serverInfo.runtimePort = undefined;
|
|
113
|
-
}
|
|
114
|
-
});
|
|
115
|
-
// Update server info
|
|
116
|
-
serverInfo.runtimeProcess = mcpProcess;
|
|
117
|
-
serverInfo.runtimePort = port;
|
|
118
|
-
// Fallback timeout
|
|
119
|
-
setTimeout(function () {
|
|
120
|
-
if (serverInfo.runtimePort === port) {
|
|
121
|
-
resolve(port);
|
|
122
|
-
}
|
|
123
|
-
}, 3000);
|
|
124
|
-
});
|
|
125
|
-
}
|
|
126
|
-
// Store generated servers in memory (in production, use a database)
|
|
127
|
-
var generatedServers = new Map();
|
|
128
|
-
// Health check endpoint
|
|
129
|
-
app.get('/api/health', function (req, res) {
|
|
130
|
-
res.json({ status: 'OK', timestamp: new Date().toISOString() });
|
|
131
|
-
});
|
|
132
|
-
// Parse data source endpoint
|
|
133
|
-
app.post('/api/parse', upload.single('file'), function (req, res) { return __awaiter(void 0, void 0, void 0, function () {
|
|
134
|
-
var _a, type, connection, file, dataSource, parsedData, error_1;
|
|
135
|
-
return __generator(this, function (_b) {
|
|
136
|
-
switch (_b.label) {
|
|
137
|
-
case 0:
|
|
138
|
-
_b.trys.push([0, 2, , 3]);
|
|
139
|
-
_a = req.body, type = _a.type, connection = _a.connection;
|
|
140
|
-
file = req.file;
|
|
141
|
-
dataSource = void 0;
|
|
142
|
-
if (type === 'database') {
|
|
143
|
-
dataSource = {
|
|
144
|
-
type: 'database',
|
|
145
|
-
name: "Database (".concat(connection.type, ")"),
|
|
146
|
-
connection: JSON.parse(connection)
|
|
147
|
-
};
|
|
148
|
-
}
|
|
149
|
-
else if (file) {
|
|
150
|
-
dataSource = {
|
|
151
|
-
type: type,
|
|
152
|
-
name: file.originalname,
|
|
153
|
-
filePath: file.path
|
|
154
|
-
};
|
|
155
|
-
}
|
|
156
|
-
else {
|
|
157
|
-
throw new Error('No file or connection provided');
|
|
158
|
-
}
|
|
159
|
-
return [4 /*yield*/, parser.parse(dataSource)];
|
|
160
|
-
case 1:
|
|
161
|
-
parsedData = _b.sent();
|
|
162
|
-
res.json({
|
|
163
|
-
success: true,
|
|
164
|
-
data: {
|
|
165
|
-
dataSource: dataSource,
|
|
166
|
-
parsedData: parsedData.map(function (data) { return (__assign(__assign({}, data), { rows: data.rows.slice(0, 10) // Limit preview rows
|
|
167
|
-
})); })
|
|
168
|
-
}
|
|
169
|
-
});
|
|
170
|
-
return [3 /*break*/, 3];
|
|
171
|
-
case 2:
|
|
172
|
-
error_1 = _b.sent();
|
|
173
|
-
console.error('Parse error:', error_1);
|
|
174
|
-
res.status(400).json({
|
|
175
|
-
success: false,
|
|
176
|
-
error: error_1 instanceof Error ? error_1.message : 'Unknown error'
|
|
177
|
-
});
|
|
178
|
-
return [3 /*break*/, 3];
|
|
179
|
-
case 3: return [2 /*return*/];
|
|
180
|
-
}
|
|
181
|
-
});
|
|
182
|
-
}); });
|
|
183
|
-
// Generate MCP server endpoint
|
|
184
|
-
app.post('/api/generate', function (req, res) { return __awaiter(void 0, void 0, void 0, function () {
|
|
185
|
-
var _a, name_1, description, version, dataSource, selectedTables, parsedData, existingServer, fullParsedData, _b, parsedDataObject_1, result, tools, resources, error_2;
|
|
186
|
-
return __generator(this, function (_c) {
|
|
187
|
-
switch (_c.label) {
|
|
188
|
-
case 0:
|
|
189
|
-
_c.trys.push([0, 4, , 5]);
|
|
190
|
-
_a = req.body, name_1 = _a.name, description = _a.description, version = _a.version, dataSource = _a.dataSource, selectedTables = _a.selectedTables, parsedData = _a.parsedData;
|
|
191
|
-
console.log('🔍 Generate request received:');
|
|
192
|
-
console.log('- Name:', name_1);
|
|
193
|
-
console.log('- Selected tables:', (selectedTables === null || selectedTables === void 0 ? void 0 : selectedTables.length) || 0);
|
|
194
|
-
console.log('- Parsed data tables:', (parsedData === null || parsedData === void 0 ? void 0 : parsedData.length) || 0);
|
|
195
|
-
existingServer = generator.getServer(name_1);
|
|
196
|
-
if (existingServer) {
|
|
197
|
-
return [2 /*return*/, res.status(400).json({
|
|
198
|
-
success: false,
|
|
199
|
-
error: "MCP Server with name \"".concat(name_1, "\" already exists. Please choose a different name.")
|
|
200
|
-
})];
|
|
201
|
-
}
|
|
202
|
-
_b = parsedData;
|
|
203
|
-
if (_b) return [3 /*break*/, 2];
|
|
204
|
-
return [4 /*yield*/, parser.parse(dataSource)];
|
|
205
|
-
case 1:
|
|
206
|
-
_b = (_c.sent());
|
|
207
|
-
_c.label = 2;
|
|
208
|
-
case 2:
|
|
209
|
-
fullParsedData = _b;
|
|
210
|
-
parsedDataObject_1 = {};
|
|
211
|
-
fullParsedData.forEach(function (data, index) {
|
|
212
|
-
var tableName = data.tableName || "table_".concat(index);
|
|
213
|
-
parsedDataObject_1[tableName] = data.rows.map(function (row) {
|
|
214
|
-
var obj = {};
|
|
215
|
-
data.headers.forEach(function (header, i) {
|
|
216
|
-
obj[header] = row[i];
|
|
217
|
-
});
|
|
218
|
-
return obj;
|
|
219
|
-
});
|
|
220
|
-
});
|
|
221
|
-
// Generate virtual server (saves to SQLite database)
|
|
222
|
-
console.log("\uD83C\uDFAF API calling generateServer with name: \"".concat(name_1, "\""));
|
|
223
|
-
return [4 /*yield*/, generator.generateServer(name_1, // serverId
|
|
224
|
-
name_1, // serverName (use the name from form as server name)
|
|
225
|
-
parsedDataObject_1, dataSource.connection || { type: 'csv', server: 'local', database: name_1 }, selectedTables // selectedTables configuration
|
|
226
|
-
)];
|
|
227
|
-
case 3:
|
|
228
|
-
result = _c.sent();
|
|
229
|
-
if (result.success) {
|
|
230
|
-
tools = generator.getToolsForServer(name_1);
|
|
231
|
-
resources = generator.getResourcesForServer(name_1);
|
|
232
|
-
res.json({
|
|
233
|
-
success: true,
|
|
234
|
-
data: {
|
|
235
|
-
serverId: name_1,
|
|
236
|
-
message: result.message,
|
|
237
|
-
toolsCount: tools.length,
|
|
238
|
-
resourcesCount: resources.length,
|
|
239
|
-
promptsCount: 0 // We don't generate prompts yet
|
|
240
|
-
}
|
|
241
|
-
});
|
|
242
|
-
}
|
|
243
|
-
else {
|
|
244
|
-
res.status(400).json({
|
|
245
|
-
success: false,
|
|
246
|
-
error: result.message
|
|
247
|
-
});
|
|
248
|
-
}
|
|
249
|
-
return [3 /*break*/, 5];
|
|
250
|
-
case 4:
|
|
251
|
-
error_2 = _c.sent();
|
|
252
|
-
console.error('Generation error:', error_2);
|
|
253
|
-
res.status(400).json({
|
|
254
|
-
success: false,
|
|
255
|
-
error: error_2 instanceof Error ? error_2.message : 'Unknown error'
|
|
256
|
-
});
|
|
257
|
-
return [3 /*break*/, 5];
|
|
258
|
-
case 5: return [2 /*return*/];
|
|
259
|
-
}
|
|
260
|
-
});
|
|
261
|
-
}); });
|
|
262
|
-
// List generated servers endpoint
|
|
263
|
-
app.get('/api/servers', function (req, res) {
|
|
264
|
-
var allServers = generator.getAllServers();
|
|
265
|
-
var servers = allServers.map(function (server) {
|
|
266
|
-
var tools = generator.getToolsForServer(server.id);
|
|
267
|
-
var resources = generator.getResourcesForServer(server.id);
|
|
268
|
-
return {
|
|
269
|
-
id: server.id,
|
|
270
|
-
name: server.name,
|
|
271
|
-
description: "".concat(server.name, " - Virtual MCP Server (").concat(server.dbConfig.type, ")"),
|
|
272
|
-
version: "1.0.0",
|
|
273
|
-
toolsCount: tools.length,
|
|
274
|
-
resourcesCount: resources.length,
|
|
275
|
-
promptsCount: 0,
|
|
276
|
-
};
|
|
277
|
-
});
|
|
278
|
-
res.json({ success: true, data: servers });
|
|
279
|
-
});
|
|
280
|
-
// Check if server name is available endpoint
|
|
281
|
-
app.get('/api/servers/check-name/:name', function (req, res) {
|
|
282
|
-
var serverName = req.params.name;
|
|
283
|
-
var existingServer = generator.getServer(serverName);
|
|
284
|
-
var isAvailable = !existingServer;
|
|
285
|
-
res.json({
|
|
286
|
-
success: true,
|
|
287
|
-
available: isAvailable,
|
|
288
|
-
message: isAvailable ?
|
|
289
|
-
"Server name \"".concat(serverName, "\" is available") :
|
|
290
|
-
"Server name \"".concat(serverName, "\" already exists")
|
|
291
|
-
});
|
|
292
|
-
});
|
|
293
|
-
// Get server details endpoint
|
|
294
|
-
app.get('/api/servers/:id', function (req, res) {
|
|
295
|
-
var server = generator.getServer(req.params.id);
|
|
296
|
-
if (!server) {
|
|
297
|
-
return res.status(404).json({
|
|
298
|
-
success: false,
|
|
299
|
-
error: 'Server not found'
|
|
300
|
-
});
|
|
301
|
-
}
|
|
302
|
-
var tools = generator.getToolsForServer(server.id);
|
|
303
|
-
var resources = generator.getResourcesForServer(server.id);
|
|
304
|
-
res.json({
|
|
305
|
-
success: true,
|
|
306
|
-
data: {
|
|
307
|
-
config: {
|
|
308
|
-
name: server.name,
|
|
309
|
-
description: "".concat(server.name, " - Virtual MCP Server (").concat(server.dbConfig.type, ")"),
|
|
310
|
-
version: "1.0.0",
|
|
311
|
-
tools: tools.map(function (tool) { return ({
|
|
312
|
-
name: tool.name,
|
|
313
|
-
description: tool.description,
|
|
314
|
-
inputSchema: tool.inputSchema,
|
|
315
|
-
operation: tool.operation
|
|
316
|
-
}); }),
|
|
317
|
-
resources: resources.map(function (resource) { return ({
|
|
318
|
-
name: resource.name,
|
|
319
|
-
description: resource.description,
|
|
320
|
-
uri_template: resource.uri_template
|
|
321
|
-
}); }),
|
|
322
|
-
prompts: []
|
|
323
|
-
},
|
|
324
|
-
parsedData: []
|
|
325
|
-
}
|
|
326
|
-
});
|
|
327
|
-
});
|
|
328
|
-
// Get server data endpoint - provides sample data from database
|
|
329
|
-
app.get('/api/servers/:id/data', function (req, res) { return __awaiter(void 0, void 0, void 0, function () {
|
|
330
|
-
var serverId, limit, server, DynamicMCPExecutor, executor, tools, selectTool, result, sampleData, error_3;
|
|
331
|
-
return __generator(this, function (_a) {
|
|
332
|
-
switch (_a.label) {
|
|
333
|
-
case 0:
|
|
334
|
-
_a.trys.push([0, 2, , 3]);
|
|
335
|
-
serverId = req.params.id;
|
|
336
|
-
limit = parseInt(req.query.limit) || 10;
|
|
337
|
-
server = generator.getServer(serverId);
|
|
338
|
-
if (!server) {
|
|
339
|
-
return [2 /*return*/, res.status(404).json({
|
|
340
|
-
success: false,
|
|
341
|
-
error: 'Server not found'
|
|
342
|
-
})];
|
|
343
|
-
}
|
|
344
|
-
DynamicMCPExecutor = require('../dynamic-mcp-executor.js').DynamicMCPExecutor;
|
|
345
|
-
executor = new DynamicMCPExecutor();
|
|
346
|
-
tools = generator.getToolsForServer(serverId);
|
|
347
|
-
selectTool = tools.find(function (tool) { return tool.operation === 'SELECT'; });
|
|
348
|
-
if (!selectTool) {
|
|
349
|
-
return [2 /*return*/, res.json({
|
|
350
|
-
success: true,
|
|
351
|
-
data: []
|
|
352
|
-
})];
|
|
353
|
-
}
|
|
354
|
-
return [4 /*yield*/, executor.executeTool("".concat(serverId, "__").concat(selectTool.name), { limit: limit })];
|
|
355
|
-
case 1:
|
|
356
|
-
result = _a.sent();
|
|
357
|
-
if (result.success && result.data) {
|
|
358
|
-
sampleData = Array.isArray(result.data) ? result.data : [];
|
|
359
|
-
res.json({
|
|
360
|
-
success: true,
|
|
361
|
-
data: sampleData.slice(0, limit)
|
|
362
|
-
});
|
|
363
|
-
}
|
|
364
|
-
else {
|
|
365
|
-
res.json({
|
|
366
|
-
success: true,
|
|
367
|
-
data: []
|
|
368
|
-
});
|
|
369
|
-
}
|
|
370
|
-
return [3 /*break*/, 3];
|
|
371
|
-
case 2:
|
|
372
|
-
error_3 = _a.sent();
|
|
373
|
-
console.error('Error getting server data:', error_3);
|
|
374
|
-
res.status(400).json({
|
|
375
|
-
success: false,
|
|
376
|
-
error: error_3 instanceof Error ? error_3.message : 'Unknown error'
|
|
377
|
-
});
|
|
378
|
-
return [3 /*break*/, 3];
|
|
379
|
-
case 3: return [2 /*return*/];
|
|
380
|
-
}
|
|
381
|
-
});
|
|
382
|
-
}); });
|
|
383
|
-
// Test server endpoint
|
|
384
|
-
app.post('/api/servers/:id/test', function (req, res) { return __awaiter(void 0, void 0, void 0, function () {
|
|
385
|
-
var server, tools, testResults, toolsToTest, _i, toolsToTest_1, tool, DynamicMCPExecutor, executor, testParams, _a, _b, _c, paramName, paramDef, result, error_4, error_5;
|
|
386
|
-
return __generator(this, function (_d) {
|
|
387
|
-
switch (_d.label) {
|
|
388
|
-
case 0:
|
|
389
|
-
_d.trys.push([0, 7, , 8]);
|
|
390
|
-
server = sqliteManager.getServer(req.params.id);
|
|
391
|
-
if (!server) {
|
|
392
|
-
return [2 /*return*/, res.status(404).json({
|
|
393
|
-
success: false,
|
|
394
|
-
error: 'Server not found'
|
|
395
|
-
})];
|
|
396
|
-
}
|
|
397
|
-
tools = sqliteManager.getToolsForServer(req.params.id);
|
|
398
|
-
testResults = [];
|
|
399
|
-
toolsToTest = tools.slice(0, 3);
|
|
400
|
-
_i = 0, toolsToTest_1 = toolsToTest;
|
|
401
|
-
_d.label = 1;
|
|
402
|
-
case 1:
|
|
403
|
-
if (!(_i < toolsToTest_1.length)) return [3 /*break*/, 6];
|
|
404
|
-
tool = toolsToTest_1[_i];
|
|
405
|
-
_d.label = 2;
|
|
406
|
-
case 2:
|
|
407
|
-
_d.trys.push([2, 4, , 5]);
|
|
408
|
-
DynamicMCPExecutor = require('../dynamic-mcp-executor.js').DynamicMCPExecutor;
|
|
409
|
-
executor = new DynamicMCPExecutor();
|
|
410
|
-
testParams = {};
|
|
411
|
-
if (tool.inputSchema && typeof tool.inputSchema === 'object' && tool.inputSchema.properties) {
|
|
412
|
-
for (_a = 0, _b = Object.entries(tool.inputSchema.properties); _a < _b.length; _a++) {
|
|
413
|
-
_c = _b[_a], paramName = _c[0], paramDef = _c[1];
|
|
414
|
-
if (paramName === 'limit')
|
|
415
|
-
testParams[paramName] = 5;
|
|
416
|
-
else if (paramName === 'offset')
|
|
417
|
-
testParams[paramName] = 0;
|
|
418
|
-
// Add other default test values as needed
|
|
419
|
-
}
|
|
420
|
-
}
|
|
421
|
-
return [4 /*yield*/, executor.executeTool("".concat(req.params.id, "__").concat(tool.name), testParams)];
|
|
422
|
-
case 3:
|
|
423
|
-
result = _d.sent();
|
|
424
|
-
testResults.push({
|
|
425
|
-
tool: tool.name,
|
|
426
|
-
status: 'success',
|
|
427
|
-
description: tool.description,
|
|
428
|
-
parameters: testParams,
|
|
429
|
-
result: result.success ? 'Tool executed successfully' : result,
|
|
430
|
-
rowCount: result.rowCount || 0
|
|
431
|
-
});
|
|
432
|
-
return [3 /*break*/, 5];
|
|
433
|
-
case 4:
|
|
434
|
-
error_4 = _d.sent();
|
|
435
|
-
testResults.push({
|
|
436
|
-
tool: tool.name,
|
|
437
|
-
status: 'error',
|
|
438
|
-
description: tool.description,
|
|
439
|
-
error: error_4 instanceof Error ? error_4.message : 'Unknown error'
|
|
440
|
-
});
|
|
441
|
-
return [3 /*break*/, 5];
|
|
442
|
-
case 5:
|
|
443
|
-
_i++;
|
|
444
|
-
return [3 /*break*/, 1];
|
|
445
|
-
case 6:
|
|
446
|
-
res.json({
|
|
447
|
-
success: true,
|
|
448
|
-
data: {
|
|
449
|
-
serverName: server.name,
|
|
450
|
-
toolsCount: tools.length,
|
|
451
|
-
testsRun: testResults.length,
|
|
452
|
-
results: testResults
|
|
453
|
-
}
|
|
454
|
-
});
|
|
455
|
-
return [3 /*break*/, 8];
|
|
456
|
-
case 7:
|
|
457
|
-
error_5 = _d.sent();
|
|
458
|
-
console.error('Test error:', error_5);
|
|
459
|
-
res.status(400).json({
|
|
460
|
-
success: false,
|
|
461
|
-
error: error_5 instanceof Error ? error_5.message : 'Unknown error'
|
|
462
|
-
});
|
|
463
|
-
return [3 /*break*/, 8];
|
|
464
|
-
case 8: return [2 /*return*/];
|
|
465
|
-
}
|
|
466
|
-
});
|
|
467
|
-
}); });
|
|
468
|
-
// Delete server endpoint
|
|
469
|
-
app.delete('/api/servers/:id', function (req, res) { return __awaiter(void 0, void 0, void 0, function () {
|
|
470
|
-
var serverId, existingServer, serverInfo, serverDir, error_6;
|
|
471
|
-
return __generator(this, function (_a) {
|
|
472
|
-
switch (_a.label) {
|
|
473
|
-
case 0:
|
|
474
|
-
_a.trys.push([0, 3, , 4]);
|
|
475
|
-
serverId = req.params.id;
|
|
476
|
-
console.log("Attempting to delete server with ID: ".concat(serverId));
|
|
477
|
-
existingServer = generator.getServer(serverId);
|
|
478
|
-
if (!existingServer) {
|
|
479
|
-
console.log("Server with ID \"".concat(serverId, "\" not found in database"));
|
|
480
|
-
return [2 /*return*/, res.status(404).json({
|
|
481
|
-
success: false,
|
|
482
|
-
error: "Server with ID \"".concat(serverId, "\" not found")
|
|
483
|
-
})];
|
|
484
|
-
}
|
|
485
|
-
// Delete from JSON database (primary storage)
|
|
486
|
-
generator.deleteServer(serverId);
|
|
487
|
-
console.log("Deleted server \"".concat(serverId, "\" from JSON database"));
|
|
488
|
-
serverInfo = generatedServers.get(serverId);
|
|
489
|
-
if (!serverInfo) return [3 /*break*/, 2];
|
|
490
|
-
serverDir = path_1.default.dirname(serverInfo.serverPath);
|
|
491
|
-
return [4 /*yield*/, promises_1.default.rm(serverDir, { recursive: true, force: true })];
|
|
492
|
-
case 1:
|
|
493
|
-
_a.sent();
|
|
494
|
-
console.log("Removed server files from ".concat(serverDir));
|
|
495
|
-
_a.label = 2;
|
|
496
|
-
case 2:
|
|
497
|
-
// Remove from memory
|
|
498
|
-
generatedServers.delete(req.params.id);
|
|
499
|
-
res.json({ success: true });
|
|
500
|
-
return [3 /*break*/, 4];
|
|
501
|
-
case 3:
|
|
502
|
-
error_6 = _a.sent();
|
|
503
|
-
console.error('Delete error:', error_6);
|
|
504
|
-
res.status(400).json({
|
|
505
|
-
success: false,
|
|
506
|
-
error: error_6 instanceof Error ? error_6.message : 'Unknown error'
|
|
507
|
-
});
|
|
508
|
-
return [3 /*break*/, 4];
|
|
509
|
-
case 4: return [2 /*return*/];
|
|
510
|
-
}
|
|
511
|
-
});
|
|
512
|
-
}); });
|
|
513
|
-
// Start runtime server endpoint
|
|
514
|
-
app.post('/api/servers/:id/start-runtime', function (req, res) { return __awaiter(void 0, void 0, void 0, function () {
|
|
515
|
-
var serverInfo, port, error_7;
|
|
516
|
-
var _a;
|
|
517
|
-
return __generator(this, function (_b) {
|
|
518
|
-
switch (_b.label) {
|
|
519
|
-
case 0:
|
|
520
|
-
_b.trys.push([0, 2, , 3]);
|
|
521
|
-
serverInfo = generatedServers.get(req.params.id);
|
|
522
|
-
if (!serverInfo) {
|
|
523
|
-
return [2 /*return*/, res.status(404).json({
|
|
524
|
-
success: false,
|
|
525
|
-
error: 'Server not found'
|
|
526
|
-
})];
|
|
527
|
-
}
|
|
528
|
-
return [4 /*yield*/, startRuntimeMCPServer(req.params.id, serverInfo.serverPath)];
|
|
529
|
-
case 1:
|
|
530
|
-
port = _b.sent();
|
|
531
|
-
res.json({
|
|
532
|
-
success: true,
|
|
533
|
-
data: {
|
|
534
|
-
serverId: req.params.id,
|
|
535
|
-
port: port,
|
|
536
|
-
endpoint: "http://localhost:".concat(port),
|
|
537
|
-
claudeConfig: (_a = {},
|
|
538
|
-
_a[serverInfo.config.name] = {
|
|
539
|
-
command: "curl",
|
|
540
|
-
args: ["-X", "POST", "http://localhost:".concat(port, "/sse/message")],
|
|
541
|
-
env: {
|
|
542
|
-
MCP_TRANSPORT: "sse"
|
|
543
|
-
}
|
|
544
|
-
},
|
|
545
|
-
_a)
|
|
546
|
-
}
|
|
547
|
-
});
|
|
548
|
-
return [3 /*break*/, 3];
|
|
549
|
-
case 2:
|
|
550
|
-
error_7 = _b.sent();
|
|
551
|
-
console.error('Runtime start error:', error_7);
|
|
552
|
-
res.status(500).json({
|
|
553
|
-
success: false,
|
|
554
|
-
error: error_7 instanceof Error ? error_7.message : 'Unknown error'
|
|
555
|
-
});
|
|
556
|
-
return [3 /*break*/, 3];
|
|
557
|
-
case 3: return [2 /*return*/];
|
|
558
|
-
}
|
|
559
|
-
});
|
|
560
|
-
}); });
|
|
561
|
-
// Stop runtime server endpoint
|
|
562
|
-
app.post('/api/servers/:id/stop-runtime', function (req, res) {
|
|
563
|
-
var serverInfo = generatedServers.get(req.params.id);
|
|
564
|
-
if (!serverInfo) {
|
|
565
|
-
return res.status(404).json({
|
|
566
|
-
success: false,
|
|
567
|
-
error: 'Server not found'
|
|
568
|
-
});
|
|
569
|
-
}
|
|
570
|
-
if (serverInfo.runtimeProcess) {
|
|
571
|
-
serverInfo.runtimeProcess.kill();
|
|
572
|
-
serverInfo.runtimeProcess = undefined;
|
|
573
|
-
serverInfo.runtimePort = undefined;
|
|
574
|
-
}
|
|
575
|
-
res.json({ success: true });
|
|
576
|
-
});
|
|
577
|
-
// Export server endpoint
|
|
578
|
-
app.get('/api/servers/:id/export', function (req, res) {
|
|
579
|
-
var serverInfo = generatedServers.get(req.params.id);
|
|
580
|
-
if (!serverInfo) {
|
|
581
|
-
return res.status(404).json({
|
|
582
|
-
success: false,
|
|
583
|
-
error: 'Server not found'
|
|
584
|
-
});
|
|
585
|
-
}
|
|
586
|
-
var serverDir = path_1.default.dirname(serverInfo.serverPath);
|
|
587
|
-
var archiveName = "".concat(serverInfo.config.name, "-mcp-server.zip");
|
|
588
|
-
// In a real implementation, you'd create a zip file here
|
|
589
|
-
res.json({
|
|
590
|
-
success: true,
|
|
591
|
-
data: {
|
|
592
|
-
downloadUrl: "/api/servers/".concat(req.params.id, "/download"),
|
|
593
|
-
filename: archiveName
|
|
594
|
-
}
|
|
595
|
-
});
|
|
596
|
-
});
|
|
597
|
-
// Serve the main HTML page
|
|
598
|
-
// Serve specific HTML files for different routes
|
|
599
|
-
app.get('/manage-servers', function (req, res) {
|
|
600
|
-
res.sendFile(path_1.default.join(__dirname, 'public', 'manage-servers.html'));
|
|
601
|
-
});
|
|
602
|
-
app.get('/test-servers', function (req, res) {
|
|
603
|
-
res.sendFile(path_1.default.join(__dirname, 'public', 'test-servers.html'));
|
|
604
|
-
});
|
|
605
|
-
app.get('/database-tables', function (req, res) {
|
|
606
|
-
res.sendFile(path_1.default.join(__dirname, 'public', 'database-tables.html'));
|
|
607
|
-
});
|
|
608
|
-
app.get('/how-to-use', function (req, res) {
|
|
609
|
-
res.sendFile(path_1.default.join(__dirname, 'public', 'how-to-use.html'));
|
|
610
|
-
});
|
|
611
|
-
// Database tables API endpoints
|
|
612
|
-
app.get('/api/database/tables', function (req, res) {
|
|
613
|
-
try {
|
|
614
|
-
// Get database path
|
|
615
|
-
var dbPath = path_1.default.join(process.cwd(), 'data', 'quickmcp.sqlite');
|
|
616
|
-
// Open database connection
|
|
617
|
-
var db_1 = new better_sqlite3_1.default(dbPath);
|
|
618
|
-
// Get all table names
|
|
619
|
-
var tables = db_1.prepare("SELECT name FROM sqlite_master WHERE type='table' AND name NOT LIKE 'sqlite_%'").all();
|
|
620
|
-
var tablesInfo = tables.map(function (table) {
|
|
621
|
-
var tableName = table.name;
|
|
622
|
-
// Get column information
|
|
623
|
-
var columns = db_1.prepare("PRAGMA table_info(".concat(tableName, ")")).all();
|
|
624
|
-
// Get row count
|
|
625
|
-
var rowCountResult = db_1.prepare("SELECT COUNT(*) as count FROM ".concat(tableName)).get();
|
|
626
|
-
var rowCount = (rowCountResult === null || rowCountResult === void 0 ? void 0 : rowCountResult.count) || 0;
|
|
627
|
-
// Get sample data (first 5 rows)
|
|
628
|
-
var sampleData = db_1.prepare("SELECT * FROM ".concat(tableName, " LIMIT 5")).all();
|
|
629
|
-
return {
|
|
630
|
-
name: tableName,
|
|
631
|
-
columns: columns.map(function (col) { return ({
|
|
632
|
-
name: col.name,
|
|
633
|
-
type: col.type,
|
|
634
|
-
notnull: col.notnull === 1,
|
|
635
|
-
pk: col.pk === 1
|
|
636
|
-
}); }),
|
|
637
|
-
rowCount: rowCount,
|
|
638
|
-
sampleData: sampleData
|
|
639
|
-
};
|
|
640
|
-
});
|
|
641
|
-
db_1.close();
|
|
642
|
-
res.json({
|
|
643
|
-
success: true,
|
|
644
|
-
data: {
|
|
645
|
-
dbPath: dbPath,
|
|
646
|
-
tables: tablesInfo
|
|
647
|
-
}
|
|
648
|
-
});
|
|
649
|
-
}
|
|
650
|
-
catch (error) {
|
|
651
|
-
console.error('Database tables error:', error);
|
|
652
|
-
res.status(400).json({
|
|
653
|
-
success: false,
|
|
654
|
-
error: error instanceof Error ? error.message : 'Unknown error'
|
|
655
|
-
});
|
|
656
|
-
}
|
|
657
|
-
});
|
|
658
|
-
// Get specific table details
|
|
659
|
-
app.get('/api/database/tables/:tableName', function (req, res) {
|
|
660
|
-
try {
|
|
661
|
-
var tableName = req.params.tableName;
|
|
662
|
-
var dbPath = path_1.default.join(process.cwd(), 'data', 'quickmcp.sqlite');
|
|
663
|
-
// Validate table name to prevent SQL injection
|
|
664
|
-
if (!/^[a-zA-Z0-9_]+$/.test(tableName)) {
|
|
665
|
-
return res.status(400).json({
|
|
666
|
-
success: false,
|
|
667
|
-
error: 'Invalid table name'
|
|
668
|
-
});
|
|
669
|
-
}
|
|
670
|
-
var db = new better_sqlite3_1.default(dbPath);
|
|
671
|
-
// Check if table exists
|
|
672
|
-
var tableExists = db.prepare("SELECT name FROM sqlite_master WHERE type='table' AND name = ?").get(tableName);
|
|
673
|
-
if (!tableExists) {
|
|
674
|
-
db.close();
|
|
675
|
-
return res.status(404).json({
|
|
676
|
-
success: false,
|
|
677
|
-
error: 'Table not found'
|
|
678
|
-
});
|
|
679
|
-
}
|
|
680
|
-
// Get column information
|
|
681
|
-
var columns = db.prepare("PRAGMA table_info(".concat(tableName, ")")).all();
|
|
682
|
-
// Get row count
|
|
683
|
-
var rowCountResult = db.prepare("SELECT COUNT(*) as count FROM ".concat(tableName)).get();
|
|
684
|
-
var rowCount = (rowCountResult === null || rowCountResult === void 0 ? void 0 : rowCountResult.count) || 0;
|
|
685
|
-
// Get sample data (first 10 rows)
|
|
686
|
-
var sampleData = db.prepare("SELECT * FROM ".concat(tableName, " LIMIT 10")).all();
|
|
687
|
-
db.close();
|
|
688
|
-
res.json({
|
|
689
|
-
success: true,
|
|
690
|
-
data: {
|
|
691
|
-
name: tableName,
|
|
692
|
-
columns: columns.map(function (col) { return ({
|
|
693
|
-
name: col.name,
|
|
694
|
-
type: col.type,
|
|
695
|
-
notnull: col.notnull === 1,
|
|
696
|
-
pk: col.pk === 1
|
|
697
|
-
}); }),
|
|
698
|
-
rowCount: rowCount,
|
|
699
|
-
sampleData: sampleData
|
|
700
|
-
}
|
|
701
|
-
});
|
|
702
|
-
}
|
|
703
|
-
catch (error) {
|
|
704
|
-
console.error('Table details error:', error);
|
|
705
|
-
res.status(400).json({
|
|
706
|
-
success: false,
|
|
707
|
-
error: error instanceof Error ? error.message : 'Unknown error'
|
|
708
|
-
});
|
|
709
|
-
}
|
|
710
|
-
});
|
|
711
|
-
// STDIO bridge endpoint for MCP
|
|
712
|
-
app.post('/api/mcp-stdio', function (req, res) {
|
|
713
|
-
console.log('MCP STDIO bridge connection established');
|
|
714
|
-
// Set headers for keeping connection alive
|
|
715
|
-
res.setHeader('Content-Type', 'application/json');
|
|
716
|
-
res.setHeader('Cache-Control', 'no-cache');
|
|
717
|
-
var buffer = '';
|
|
718
|
-
req.on('data', function (chunk) {
|
|
719
|
-
buffer += chunk.toString();
|
|
720
|
-
console.log('Received chunk:', chunk.toString());
|
|
721
|
-
// Process complete JSON-RPC messages
|
|
722
|
-
var lines = buffer.split('\n');
|
|
723
|
-
buffer = lines.pop() || ''; // Keep incomplete line in buffer
|
|
724
|
-
for (var _i = 0, lines_1 = lines; _i < lines_1.length; _i++) {
|
|
725
|
-
var line = lines_1[_i];
|
|
726
|
-
if (line.trim()) {
|
|
727
|
-
var message = null;
|
|
728
|
-
try {
|
|
729
|
-
message = JSON.parse(line);
|
|
730
|
-
console.log('Processing MCP message:', JSON.stringify(message, null, 2));
|
|
731
|
-
var response = null;
|
|
732
|
-
// Handle MCP initialize request
|
|
733
|
-
if (message.method === 'initialize') {
|
|
734
|
-
response = {
|
|
735
|
-
jsonrpc: '2.0',
|
|
736
|
-
id: message.id,
|
|
737
|
-
result: {
|
|
738
|
-
protocolVersion: '2024-11-05',
|
|
739
|
-
serverInfo: {
|
|
740
|
-
name: 'quickmcp-integrated',
|
|
741
|
-
version: '1.0.0'
|
|
742
|
-
},
|
|
743
|
-
capabilities: {
|
|
744
|
-
tools: {},
|
|
745
|
-
resources: {},
|
|
746
|
-
prompts: {}
|
|
747
|
-
}
|
|
748
|
-
}
|
|
749
|
-
};
|
|
750
|
-
}
|
|
751
|
-
// Handle tools/list request
|
|
752
|
-
else if (message.method === 'tools/list') {
|
|
753
|
-
var tools = [];
|
|
754
|
-
// Add tools from all generated servers
|
|
755
|
-
for (var _a = 0, generatedServers_1 = generatedServers; _a < generatedServers_1.length; _a++) {
|
|
756
|
-
var _b = generatedServers_1[_a], serverId = _b[0], serverInfo = _b[1];
|
|
757
|
-
for (var _c = 0, _d = serverInfo.config.tools; _c < _d.length; _c++) {
|
|
758
|
-
var tool = _d[_c];
|
|
759
|
-
tools.push({
|
|
760
|
-
name: "".concat(serverId, "__").concat(tool.name),
|
|
761
|
-
description: "[".concat(serverInfo.config.name, "] ").concat(tool.description),
|
|
762
|
-
inputSchema: tool.inputSchema
|
|
763
|
-
});
|
|
764
|
-
}
|
|
765
|
-
}
|
|
766
|
-
// Add management tools
|
|
767
|
-
tools.push({
|
|
768
|
-
name: 'quickmcp__list_servers',
|
|
769
|
-
description: 'List all generated MCP servers',
|
|
770
|
-
inputSchema: {
|
|
771
|
-
type: 'object',
|
|
772
|
-
properties: {},
|
|
773
|
-
required: []
|
|
774
|
-
}
|
|
775
|
-
});
|
|
776
|
-
response = {
|
|
777
|
-
jsonrpc: '2.0',
|
|
778
|
-
id: message.id,
|
|
779
|
-
result: { tools: tools }
|
|
780
|
-
};
|
|
781
|
-
}
|
|
782
|
-
// Handle initialized notification (no response needed)
|
|
783
|
-
else if (message.method === 'notifications/initialized') {
|
|
784
|
-
console.log('MCP client initialized');
|
|
785
|
-
// No response for notifications
|
|
786
|
-
}
|
|
787
|
-
// Handle other requests with placeholder responses
|
|
788
|
-
else if (message.id) {
|
|
789
|
-
response = {
|
|
790
|
-
jsonrpc: '2.0',
|
|
791
|
-
id: message.id,
|
|
792
|
-
result: {}
|
|
793
|
-
};
|
|
794
|
-
}
|
|
795
|
-
// Send response if we have one
|
|
796
|
-
if (response) {
|
|
797
|
-
var responseStr = JSON.stringify(response) + '\n';
|
|
798
|
-
console.log('Sending response:', responseStr.trim());
|
|
799
|
-
res.write(responseStr);
|
|
800
|
-
}
|
|
801
|
-
}
|
|
802
|
-
catch (error) {
|
|
803
|
-
console.error('Error processing MCP message:', error);
|
|
804
|
-
if (message && message.id) {
|
|
805
|
-
var errorResponse = {
|
|
806
|
-
jsonrpc: '2.0',
|
|
807
|
-
id: message.id,
|
|
808
|
-
error: {
|
|
809
|
-
code: -32603,
|
|
810
|
-
message: 'Internal error'
|
|
811
|
-
}
|
|
812
|
-
};
|
|
813
|
-
res.write(JSON.stringify(errorResponse) + '\n');
|
|
814
|
-
}
|
|
815
|
-
}
|
|
816
|
-
}
|
|
817
|
-
}
|
|
818
|
-
});
|
|
819
|
-
req.on('end', function () {
|
|
820
|
-
console.log('MCP stdio connection ended');
|
|
821
|
-
res.end();
|
|
822
|
-
});
|
|
823
|
-
req.on('error', function (error) {
|
|
824
|
-
console.error('MCP stdio connection error:', error);
|
|
825
|
-
res.end();
|
|
826
|
-
});
|
|
827
|
-
req.on('close', function () {
|
|
828
|
-
console.log('MCP stdio connection closed');
|
|
829
|
-
});
|
|
830
|
-
});
|
|
831
|
-
// Serve index.html for root and any other routes
|
|
832
|
-
app.get('*', function (req, res) {
|
|
833
|
-
res.sendFile(path_1.default.join(__dirname, 'public', 'index.html'));
|
|
834
|
-
});
|
|
835
|
-
var PORT = process.env.PORT || 3000;
|
|
836
|
-
var MCP_PORT = 3001;
|
|
837
|
-
// Initialize integrated MCP server
|
|
838
|
-
var integratedMCPServer = new integrated_mcp_server_new_1.IntegratedMCPServer();
|
|
839
|
-
app.listen(PORT, function () { return __awaiter(void 0, void 0, void 0, function () {
|
|
840
|
-
var error_8;
|
|
841
|
-
return __generator(this, function (_a) {
|
|
842
|
-
switch (_a.label) {
|
|
843
|
-
case 0:
|
|
844
|
-
console.log("\uD83C\uDF10 MCP Server Generator running on http://localhost:".concat(PORT));
|
|
845
|
-
_a.label = 1;
|
|
846
|
-
case 1:
|
|
847
|
-
_a.trys.push([1, 3, , 4]);
|
|
848
|
-
return [4 /*yield*/, integratedMCPServer.start(MCP_PORT)];
|
|
849
|
-
case 2:
|
|
850
|
-
_a.sent();
|
|
851
|
-
return [3 /*break*/, 4];
|
|
852
|
-
case 3:
|
|
853
|
-
error_8 = _a.sent();
|
|
854
|
-
console.error('❌ Failed to start integrated MCP server:', error_8);
|
|
855
|
-
return [3 /*break*/, 4];
|
|
856
|
-
case 4: return [2 /*return*/];
|
|
857
|
-
}
|
|
858
|
-
});
|
|
859
|
-
}); });
|
|
860
|
-
exports.default = app;
|