@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
|
@@ -0,0 +1,191 @@
|
|
|
1
|
+
<!DOCTYPE html>
|
|
2
|
+
<html lang="en" class="h-full">
|
|
3
|
+
<head>
|
|
4
|
+
<meta charset="UTF-8">
|
|
5
|
+
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|
6
|
+
<title>QuickMCP - Users</title>
|
|
7
|
+
|
|
8
|
+
<link rel="icon" type="image/png" href="/images/favicon.png">
|
|
9
|
+
<script src="https://cdn.tailwindcss.com"></script>
|
|
10
|
+
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.5.1/css/all.min.css">
|
|
11
|
+
<link rel="stylesheet" href="quickmcp-styles.css">
|
|
12
|
+
<script>tailwind.config = { darkMode: 'class' };</script>
|
|
13
|
+
</head>
|
|
14
|
+
<body class="h-screen flex flex-col bg-gradient-to-br from-slate-50 to-slate-100 overflow-hidden text-slate-900">
|
|
15
|
+
<header class="backdrop-blur-sm bg-white/80 border-b border-slate-200/60 shadow-sm relative z-50 h-16 flex-shrink-0 flex items-center justify-between px-6 py-3">
|
|
16
|
+
<div class="flex items-center gap-6">
|
|
17
|
+
<div class="flex items-center gap-3">
|
|
18
|
+
<div class="w-9 h-9 rounded-lg bg-blue-600 text-white flex items-center justify-center shadow-lg shadow-blue-500/25">
|
|
19
|
+
<i class="fas fa-rocket text-lg"></i>
|
|
20
|
+
</div>
|
|
21
|
+
<div>
|
|
22
|
+
<h1 class="text-xl font-bold gradient-text leading-tight">QuickMCP</h1>
|
|
23
|
+
<p class="text-xs text-slate-500 font-medium">Server Generator</p>
|
|
24
|
+
</div>
|
|
25
|
+
</div>
|
|
26
|
+
</div>
|
|
27
|
+
<div class="flex items-center gap-3">
|
|
28
|
+
<div class="w-8 h-8 rounded-full bg-gradient-to-tr from-blue-500 to-purple-500 text-white flex items-center justify-center text-sm font-bold shadow-md" data-user-avatar>G</div>
|
|
29
|
+
<button id="openSidebar" class="lg:hidden p-2 rounded-lg hover:bg-slate-100 transition-colors text-slate-500">
|
|
30
|
+
<i class="fas fa-bars"></i>
|
|
31
|
+
</button>
|
|
32
|
+
</div>
|
|
33
|
+
</header>
|
|
34
|
+
|
|
35
|
+
<div class="app-main-layout flex flex-1 overflow-x-hidden">
|
|
36
|
+
<div id="sidebar" class="w-72 bg-white/95 backdrop-blur-sm border-r border-slate-200/60 flex flex-col flex-shrink-0 z-[60] fixed inset-y-0 left-0 transform -translate-x-full lg:translate-x-0 lg:top-0 lg:h-screen transition-transform duration-300 ease-in-out h-full pt-16 lg:pt-0"></div>
|
|
37
|
+
<div id="sidebarOverlay" class="fixed inset-0 bg-slate-900/50 backdrop-blur-sm z-30 lg:hidden opacity-0 invisible transition-all duration-300"></div>
|
|
38
|
+
|
|
39
|
+
<main class="flex-1 overflow-y-auto p-8">
|
|
40
|
+
<div class="max-w-6xl mx-auto space-y-6">
|
|
41
|
+
<div class="text-center mb-10">
|
|
42
|
+
<h2 class="text-3xl font-bold text-slate-900">Users</h2>
|
|
43
|
+
<p class="text-slate-600 mt-1">Only users with the <span class="font-semibold">Admin</span> role can add new users.</p>
|
|
44
|
+
<p id="viewerInfo" class="text-sm text-slate-500 mt-2"></p>
|
|
45
|
+
</div>
|
|
46
|
+
|
|
47
|
+
<section id="createUserCard" class="card p-6 hidden">
|
|
48
|
+
<h3 class="text-lg font-semibold text-slate-900 mb-4">Add User</h3>
|
|
49
|
+
<form id="createUserForm" class="grid grid-cols-1 md:grid-cols-4 gap-3" autocomplete="off">
|
|
50
|
+
<input id="newUsername" class="input" placeholder="username" minlength="3" maxlength="64" required autocomplete="off" autocapitalize="off" autocorrect="off" spellcheck="false">
|
|
51
|
+
<input id="newPassword" type="password" class="input" placeholder="password (min 6)" minlength="6" required autocomplete="new-password">
|
|
52
|
+
<select id="newRole" class="input">
|
|
53
|
+
<option value="user">User</option>
|
|
54
|
+
<option value="admin">Admin</option>
|
|
55
|
+
</select>
|
|
56
|
+
<button type="submit" class="bg-blue-600 hover:bg-blue-700 text-white rounded-lg px-4 py-2 font-medium">Create</button>
|
|
57
|
+
</form>
|
|
58
|
+
<p id="createUserMessage" class="text-sm mt-3 hidden"></p>
|
|
59
|
+
</section>
|
|
60
|
+
|
|
61
|
+
<section class="card p-6">
|
|
62
|
+
<div class="flex items-center justify-between mb-4">
|
|
63
|
+
<h3 class="text-lg font-semibold text-slate-900">User List</h3>
|
|
64
|
+
<button id="refreshUsersBtn" class="px-3 py-2 rounded-lg border border-slate-200 text-slate-700 hover:border-blue-400 hover:text-blue-600 text-sm">Refresh</button>
|
|
65
|
+
</div>
|
|
66
|
+
<div id="usersTableWrap" class="overflow-x-auto"></div>
|
|
67
|
+
</section>
|
|
68
|
+
</div>
|
|
69
|
+
</main>
|
|
70
|
+
</div>
|
|
71
|
+
|
|
72
|
+
<script src="logger.js"></script>
|
|
73
|
+
<script src="shared.js"></script>
|
|
74
|
+
<script src="sidebar.js"></script>
|
|
75
|
+
<script>
|
|
76
|
+
let currentUser = null;
|
|
77
|
+
|
|
78
|
+
function setMessage(message, type) {
|
|
79
|
+
const el = document.getElementById('createUserMessage');
|
|
80
|
+
el.textContent = message;
|
|
81
|
+
el.classList.remove('hidden', 'text-green-700', 'text-red-600');
|
|
82
|
+
el.classList.add(type === 'success' ? 'text-green-700' : 'text-red-600');
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
function renderUsers(users) {
|
|
86
|
+
const root = document.getElementById('usersTableWrap');
|
|
87
|
+
if (!users.length) {
|
|
88
|
+
root.innerHTML = '<p class="text-sm text-slate-500">No users found.</p>';
|
|
89
|
+
return;
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
root.innerHTML = `
|
|
93
|
+
<table class="min-w-full text-sm">
|
|
94
|
+
<thead>
|
|
95
|
+
<tr class="text-left border-b border-slate-200">
|
|
96
|
+
<th class="py-2 pr-4 font-semibold text-slate-700">Username</th>
|
|
97
|
+
<th class="py-2 pr-4 font-semibold text-slate-700">Workspace</th>
|
|
98
|
+
<th class="py-2 pr-4 font-semibold text-slate-700">Role</th>
|
|
99
|
+
<th class="py-2 pr-4 font-semibold text-slate-700">Created</th>
|
|
100
|
+
</tr>
|
|
101
|
+
</thead>
|
|
102
|
+
<tbody>
|
|
103
|
+
${users.map((u) => `
|
|
104
|
+
<tr class="border-b border-slate-100">
|
|
105
|
+
<td class="py-2 pr-4 text-slate-800">${u.username}</td>
|
|
106
|
+
<td class="py-2 pr-4 text-slate-600">${u.workspaceId || '-'}</td>
|
|
107
|
+
<td class="py-2 pr-4">
|
|
108
|
+
<span class="px-2 py-1 rounded-full text-xs font-semibold ${u.role === 'admin' ? 'bg-blue-100 text-blue-700' : 'bg-slate-100 text-slate-700'}">${u.role}</span>
|
|
109
|
+
</td>
|
|
110
|
+
<td class="py-2 pr-4 text-slate-600">${u.createdAt || '-'}</td>
|
|
111
|
+
</tr>
|
|
112
|
+
`).join('')}
|
|
113
|
+
</tbody>
|
|
114
|
+
</table>
|
|
115
|
+
`;
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
async function loadViewer() {
|
|
119
|
+
const res = await fetch('/api/auth/me');
|
|
120
|
+
if (!res.ok) throw new Error('Unauthorized');
|
|
121
|
+
const payload = await res.json();
|
|
122
|
+
currentUser = payload?.data || {};
|
|
123
|
+
document.getElementById('viewerInfo').textContent = `Signed in as ${currentUser.username} (${currentUser.role || 'user'})`;
|
|
124
|
+
if (currentUser.isAdmin) {
|
|
125
|
+
document.getElementById('createUserCard').classList.remove('hidden');
|
|
126
|
+
}
|
|
127
|
+
}
|
|
128
|
+
|
|
129
|
+
async function loadUsers() {
|
|
130
|
+
const root = document.getElementById('usersTableWrap');
|
|
131
|
+
root.innerHTML = '<p class="text-sm text-slate-500">Loading users...</p>';
|
|
132
|
+
const res = await fetch('/api/auth/users');
|
|
133
|
+
if (res.status === 403) {
|
|
134
|
+
root.innerHTML = '<p class="text-sm text-amber-700">You do not have permission to view users.</p>';
|
|
135
|
+
return;
|
|
136
|
+
}
|
|
137
|
+
if (!res.ok) throw new Error('Failed to load users');
|
|
138
|
+
const payload = await res.json();
|
|
139
|
+
renderUsers(payload?.data?.users || []);
|
|
140
|
+
}
|
|
141
|
+
|
|
142
|
+
async function createUser(event) {
|
|
143
|
+
event.preventDefault();
|
|
144
|
+
const username = document.getElementById('newUsername').value.trim();
|
|
145
|
+
const password = document.getElementById('newPassword').value;
|
|
146
|
+
const role = document.getElementById('newRole').value;
|
|
147
|
+
|
|
148
|
+
const res = await fetch('/api/auth/users', {
|
|
149
|
+
method: 'POST',
|
|
150
|
+
headers: { 'Content-Type': 'application/json' },
|
|
151
|
+
body: JSON.stringify({ username, password, role })
|
|
152
|
+
});
|
|
153
|
+
const payload = await res.json().catch(() => ({}));
|
|
154
|
+
if (!res.ok) {
|
|
155
|
+
throw new Error(payload?.error || 'Failed to create user');
|
|
156
|
+
}
|
|
157
|
+
|
|
158
|
+
document.getElementById('createUserForm').reset();
|
|
159
|
+
setMessage(`User "${username}" created.`, 'success');
|
|
160
|
+
await loadUsers();
|
|
161
|
+
}
|
|
162
|
+
|
|
163
|
+
document.getElementById('refreshUsersBtn').addEventListener('click', () => {
|
|
164
|
+
loadUsers().catch((error) => {
|
|
165
|
+
document.getElementById('usersTableWrap').innerHTML = `<p class="text-sm text-red-600">${error.message || 'Failed to load users.'}</p>`;
|
|
166
|
+
});
|
|
167
|
+
});
|
|
168
|
+
|
|
169
|
+
document.getElementById('createUserForm').addEventListener('submit', async (event) => {
|
|
170
|
+
try {
|
|
171
|
+
await createUser(event);
|
|
172
|
+
} catch (error) {
|
|
173
|
+
setMessage(error.message || 'Failed to create user.', 'error');
|
|
174
|
+
}
|
|
175
|
+
});
|
|
176
|
+
|
|
177
|
+
document.addEventListener('DOMContentLoaded', async () => {
|
|
178
|
+
try {
|
|
179
|
+
const userEl = document.getElementById('newUsername');
|
|
180
|
+
const passEl = document.getElementById('newPassword');
|
|
181
|
+
if (userEl) userEl.value = '';
|
|
182
|
+
if (passEl) passEl.value = '';
|
|
183
|
+
await loadViewer();
|
|
184
|
+
await loadUsers();
|
|
185
|
+
} catch (error) {
|
|
186
|
+
document.getElementById('usersTableWrap').innerHTML = `<p class="text-sm text-red-600">${error.message || 'Failed to load users.'}</p>`;
|
|
187
|
+
}
|
|
188
|
+
});
|
|
189
|
+
</script>
|
|
190
|
+
</body>
|
|
191
|
+
</html>
|
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
import { MCPTestRequest, MCPTestResponse } from '../types';
|
|
2
|
-
import { TransportType } from '../transport';
|
|
3
|
-
export declare class MCPClientUnified {
|
|
4
|
-
private transportType;
|
|
5
|
-
private port;
|
|
6
|
-
private process;
|
|
7
|
-
private eventSource;
|
|
8
|
-
private messageId;
|
|
9
|
-
private pendingRequests;
|
|
10
|
-
private isConnected;
|
|
11
|
-
private buffer;
|
|
12
|
-
constructor(transportType?: TransportType, port?: number);
|
|
13
|
-
connect(serverPath?: string): Promise<void>;
|
|
14
|
-
private connectStdio;
|
|
15
|
-
private connectSSE;
|
|
16
|
-
disconnect(): Promise<void>;
|
|
17
|
-
listTools(): Promise<any[]>;
|
|
18
|
-
listResources(): Promise<any[]>;
|
|
19
|
-
listPrompts(): Promise<any[]>;
|
|
20
|
-
callTool(name: string, args?: any): Promise<MCPTestResponse>;
|
|
21
|
-
readResource(uri: string): Promise<MCPTestResponse>;
|
|
22
|
-
getPrompt(name: string, args?: any): Promise<MCPTestResponse>;
|
|
23
|
-
testRequest(request: MCPTestRequest): Promise<MCPTestResponse>;
|
|
24
|
-
private initialize;
|
|
25
|
-
private sendNotification;
|
|
26
|
-
private sendRequest;
|
|
27
|
-
private handleStdioMessage;
|
|
28
|
-
private handleSSEMessage;
|
|
29
|
-
private processMessage;
|
|
30
|
-
}
|
|
31
|
-
//# sourceMappingURL=MCPClientUnified.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"MCPClientUnified.d.ts","sourceRoot":"","sources":["../../src/client/MCPClientUnified.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,cAAc,EAAE,eAAe,EAAE,MAAM,UAAU,CAAC;AAC3D,OAAO,EAAE,aAAa,EAAE,MAAM,cAAc,CAAC;AAiB7C,qBAAa,gBAAgB;IAC3B,OAAO,CAAC,aAAa,CAAgB;IACrC,OAAO,CAAC,IAAI,CAAS;IACrB,OAAO,CAAC,OAAO,CAA6B;IAC5C,OAAO,CAAC,WAAW,CAAoC;IACvD,OAAO,CAAC,SAAS,CAAK;IACtB,OAAO,CAAC,eAAe,CAGlB;IACL,OAAO,CAAC,WAAW,CAAS;IAC5B,OAAO,CAAC,MAAM,CAAM;gBAER,aAAa,GAAE,aAAuB,EAAE,IAAI,GAAE,MAAa;IAKjE,OAAO,CAAC,UAAU,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;YAWnC,YAAY;YAkCZ,UAAU;IAmClB,UAAU,IAAI,OAAO,CAAC,IAAI,CAAC;IAW3B,SAAS,IAAI,OAAO,CAAC,GAAG,EAAE,CAAC;IAK3B,aAAa,IAAI,OAAO,CAAC,GAAG,EAAE,CAAC;IAK/B,WAAW,IAAI,OAAO,CAAC,GAAG,EAAE,CAAC;IAK7B,QAAQ,CAAC,IAAI,EAAE,MAAM,EAAE,IAAI,CAAC,EAAE,GAAG,GAAG,OAAO,CAAC,eAAe,CAAC;IAmB5D,YAAY,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC,eAAe,CAAC;IAenD,SAAS,CAAC,IAAI,EAAE,MAAM,EAAE,IAAI,CAAC,EAAE,GAAG,GAAG,OAAO,CAAC,eAAe,CAAC;IAmB7D,WAAW,CAAC,OAAO,EAAE,cAAc,GAAG,OAAO,CAAC,eAAe,CAAC;YAgBtD,UAAU;IAgBxB,OAAO,CAAC,gBAAgB;IAexB,OAAO,CAAC,WAAW;IAmCnB,OAAO,CAAC,kBAAkB;IAiB1B,OAAO,CAAC,gBAAgB;IAIxB,OAAO,CAAC,cAAc;CAYvB"}
|
|
@@ -1,275 +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
|
-
exports.MCPClientUnified = void 0;
|
|
7
|
-
const child_process_1 = require("child_process");
|
|
8
|
-
const axios_1 = __importDefault(require("axios"));
|
|
9
|
-
const eventsource_1 = require("eventsource");
|
|
10
|
-
class MCPClientUnified {
|
|
11
|
-
constructor(transportType = 'stdio', port = 3001) {
|
|
12
|
-
this.process = null;
|
|
13
|
-
this.eventSource = null;
|
|
14
|
-
this.messageId = 1;
|
|
15
|
-
this.pendingRequests = new Map();
|
|
16
|
-
this.isConnected = false;
|
|
17
|
-
this.buffer = '';
|
|
18
|
-
this.transportType = transportType;
|
|
19
|
-
this.port = port;
|
|
20
|
-
}
|
|
21
|
-
async connect(serverPath) {
|
|
22
|
-
if (this.transportType === 'stdio') {
|
|
23
|
-
if (!serverPath) {
|
|
24
|
-
throw new Error('Server path required for stdio transport');
|
|
25
|
-
}
|
|
26
|
-
return this.connectStdio(serverPath);
|
|
27
|
-
}
|
|
28
|
-
else {
|
|
29
|
-
return this.connectSSE();
|
|
30
|
-
}
|
|
31
|
-
}
|
|
32
|
-
async connectStdio(serverPath) {
|
|
33
|
-
return new Promise((resolve, reject) => {
|
|
34
|
-
this.process = (0, child_process_1.spawn)('node', [serverPath], {
|
|
35
|
-
stdio: ['pipe', 'pipe', 'pipe']
|
|
36
|
-
});
|
|
37
|
-
this.process.stdout?.on('data', (data) => {
|
|
38
|
-
this.handleStdioMessage(data.toString());
|
|
39
|
-
});
|
|
40
|
-
this.process.stderr?.on('data', (data) => {
|
|
41
|
-
console.error('MCP Server stderr:', data.toString());
|
|
42
|
-
});
|
|
43
|
-
this.process.on('error', (error) => {
|
|
44
|
-
console.error('MCP Server process error:', error);
|
|
45
|
-
reject(error);
|
|
46
|
-
});
|
|
47
|
-
this.process.on('exit', (code) => {
|
|
48
|
-
console.log('MCP Server process exited with code:', code);
|
|
49
|
-
this.isConnected = false;
|
|
50
|
-
});
|
|
51
|
-
// Initialize the connection
|
|
52
|
-
this.initialize()
|
|
53
|
-
.then(() => {
|
|
54
|
-
this.isConnected = true;
|
|
55
|
-
resolve();
|
|
56
|
-
})
|
|
57
|
-
.catch(reject);
|
|
58
|
-
});
|
|
59
|
-
}
|
|
60
|
-
async connectSSE() {
|
|
61
|
-
const EventSource = eventsource_1.EventSourcePolyfill || global.EventSource;
|
|
62
|
-
return new Promise((resolve, reject) => {
|
|
63
|
-
const sseUrl = `http://localhost:${this.port}/sse`;
|
|
64
|
-
this.eventSource = new EventSource(sseUrl);
|
|
65
|
-
this.eventSource.onmessage = (event) => {
|
|
66
|
-
try {
|
|
67
|
-
const message = JSON.parse(event.data);
|
|
68
|
-
if (message.type === 'connected') {
|
|
69
|
-
// Initialize the connection
|
|
70
|
-
this.initialize()
|
|
71
|
-
.then(() => {
|
|
72
|
-
this.isConnected = true;
|
|
73
|
-
resolve();
|
|
74
|
-
})
|
|
75
|
-
.catch(reject);
|
|
76
|
-
}
|
|
77
|
-
else {
|
|
78
|
-
this.handleSSEMessage(message);
|
|
79
|
-
}
|
|
80
|
-
}
|
|
81
|
-
catch (error) {
|
|
82
|
-
console.error('Error parsing SSE message:', error);
|
|
83
|
-
}
|
|
84
|
-
};
|
|
85
|
-
this.eventSource.onerror = (error) => {
|
|
86
|
-
console.error('SSE connection error:', error);
|
|
87
|
-
if (!this.isConnected) {
|
|
88
|
-
reject(new Error('Failed to connect to SSE server'));
|
|
89
|
-
}
|
|
90
|
-
};
|
|
91
|
-
});
|
|
92
|
-
}
|
|
93
|
-
async disconnect() {
|
|
94
|
-
if (this.transportType === 'stdio' && this.process) {
|
|
95
|
-
this.process.kill();
|
|
96
|
-
this.process = null;
|
|
97
|
-
}
|
|
98
|
-
else if (this.transportType === 'sse' && this.eventSource) {
|
|
99
|
-
this.eventSource.close();
|
|
100
|
-
this.eventSource = null;
|
|
101
|
-
}
|
|
102
|
-
this.isConnected = false;
|
|
103
|
-
}
|
|
104
|
-
async listTools() {
|
|
105
|
-
const response = await this.sendRequest('tools/list', {});
|
|
106
|
-
return response.tools || [];
|
|
107
|
-
}
|
|
108
|
-
async listResources() {
|
|
109
|
-
const response = await this.sendRequest('resources/list', {});
|
|
110
|
-
return response.resources || [];
|
|
111
|
-
}
|
|
112
|
-
async listPrompts() {
|
|
113
|
-
const response = await this.sendRequest('prompts/list', {});
|
|
114
|
-
return response.prompts || [];
|
|
115
|
-
}
|
|
116
|
-
async callTool(name, args) {
|
|
117
|
-
try {
|
|
118
|
-
const response = await this.sendRequest('tools/call', {
|
|
119
|
-
name,
|
|
120
|
-
arguments: args || {}
|
|
121
|
-
});
|
|
122
|
-
return {
|
|
123
|
-
success: true,
|
|
124
|
-
data: response
|
|
125
|
-
};
|
|
126
|
-
}
|
|
127
|
-
catch (error) {
|
|
128
|
-
return {
|
|
129
|
-
success: false,
|
|
130
|
-
error: error instanceof Error ? error.message : 'Unknown error'
|
|
131
|
-
};
|
|
132
|
-
}
|
|
133
|
-
}
|
|
134
|
-
async readResource(uri) {
|
|
135
|
-
try {
|
|
136
|
-
const response = await this.sendRequest('resources/read', { uri });
|
|
137
|
-
return {
|
|
138
|
-
success: true,
|
|
139
|
-
data: response
|
|
140
|
-
};
|
|
141
|
-
}
|
|
142
|
-
catch (error) {
|
|
143
|
-
return {
|
|
144
|
-
success: false,
|
|
145
|
-
error: error instanceof Error ? error.message : 'Unknown error'
|
|
146
|
-
};
|
|
147
|
-
}
|
|
148
|
-
}
|
|
149
|
-
async getPrompt(name, args) {
|
|
150
|
-
try {
|
|
151
|
-
const response = await this.sendRequest('prompts/get', {
|
|
152
|
-
name,
|
|
153
|
-
arguments: args || {}
|
|
154
|
-
});
|
|
155
|
-
return {
|
|
156
|
-
success: true,
|
|
157
|
-
data: response
|
|
158
|
-
};
|
|
159
|
-
}
|
|
160
|
-
catch (error) {
|
|
161
|
-
return {
|
|
162
|
-
success: false,
|
|
163
|
-
error: error instanceof Error ? error.message : 'Unknown error'
|
|
164
|
-
};
|
|
165
|
-
}
|
|
166
|
-
}
|
|
167
|
-
async testRequest(request) {
|
|
168
|
-
switch (request.method) {
|
|
169
|
-
case 'tool':
|
|
170
|
-
return this.callTool(request.name, request.params);
|
|
171
|
-
case 'resource':
|
|
172
|
-
return this.readResource(request.name);
|
|
173
|
-
case 'prompt':
|
|
174
|
-
return this.getPrompt(request.name, request.params);
|
|
175
|
-
default:
|
|
176
|
-
return {
|
|
177
|
-
success: false,
|
|
178
|
-
error: 'Unknown request method'
|
|
179
|
-
};
|
|
180
|
-
}
|
|
181
|
-
}
|
|
182
|
-
async initialize() {
|
|
183
|
-
const response = await this.sendRequest('initialize', {
|
|
184
|
-
protocolVersion: '2024-11-05',
|
|
185
|
-
capabilities: {},
|
|
186
|
-
clientInfo: {
|
|
187
|
-
name: 'quickmcp-test-client',
|
|
188
|
-
version: '1.0.0'
|
|
189
|
-
}
|
|
190
|
-
});
|
|
191
|
-
// Send initialized notification
|
|
192
|
-
this.sendNotification('notifications/initialized', {});
|
|
193
|
-
return response;
|
|
194
|
-
}
|
|
195
|
-
sendNotification(method, params) {
|
|
196
|
-
const message = {
|
|
197
|
-
jsonrpc: '2.0',
|
|
198
|
-
method,
|
|
199
|
-
params
|
|
200
|
-
};
|
|
201
|
-
if (this.transportType === 'stdio' && this.process?.stdin) {
|
|
202
|
-
this.process.stdin.write(JSON.stringify(message) + '\n');
|
|
203
|
-
}
|
|
204
|
-
else if (this.transportType === 'sse') {
|
|
205
|
-
axios_1.default.post(`http://localhost:${this.port}/message`, message)
|
|
206
|
-
.catch(error => console.error('Error sending SSE message:', error));
|
|
207
|
-
}
|
|
208
|
-
}
|
|
209
|
-
sendRequest(method, params) {
|
|
210
|
-
return new Promise((resolve, reject) => {
|
|
211
|
-
const id = this.messageId++;
|
|
212
|
-
const message = {
|
|
213
|
-
jsonrpc: '2.0',
|
|
214
|
-
id,
|
|
215
|
-
method,
|
|
216
|
-
params
|
|
217
|
-
};
|
|
218
|
-
this.pendingRequests.set(id, { resolve, reject });
|
|
219
|
-
if (this.transportType === 'stdio' && this.process?.stdin) {
|
|
220
|
-
this.process.stdin.write(JSON.stringify(message) + '\n');
|
|
221
|
-
}
|
|
222
|
-
else if (this.transportType === 'sse') {
|
|
223
|
-
axios_1.default.post(`http://localhost:${this.port}/message`, message)
|
|
224
|
-
.catch(error => {
|
|
225
|
-
this.pendingRequests.delete(id);
|
|
226
|
-
reject(error);
|
|
227
|
-
});
|
|
228
|
-
}
|
|
229
|
-
else {
|
|
230
|
-
this.pendingRequests.delete(id);
|
|
231
|
-
reject(new Error('Not connected'));
|
|
232
|
-
}
|
|
233
|
-
// Add timeout
|
|
234
|
-
setTimeout(() => {
|
|
235
|
-
if (this.pendingRequests.has(id)) {
|
|
236
|
-
this.pendingRequests.delete(id);
|
|
237
|
-
reject(new Error('Request timeout'));
|
|
238
|
-
}
|
|
239
|
-
}, 30000);
|
|
240
|
-
});
|
|
241
|
-
}
|
|
242
|
-
handleStdioMessage(data) {
|
|
243
|
-
this.buffer += data;
|
|
244
|
-
const lines = this.buffer.split('\n');
|
|
245
|
-
this.buffer = lines.pop() || '';
|
|
246
|
-
for (const line of lines) {
|
|
247
|
-
if (!line.trim())
|
|
248
|
-
continue;
|
|
249
|
-
try {
|
|
250
|
-
const message = JSON.parse(line);
|
|
251
|
-
this.processMessage(message);
|
|
252
|
-
}
|
|
253
|
-
catch (error) {
|
|
254
|
-
console.error('Error parsing message:', error, 'Line:', line);
|
|
255
|
-
}
|
|
256
|
-
}
|
|
257
|
-
}
|
|
258
|
-
handleSSEMessage(message) {
|
|
259
|
-
this.processMessage(message);
|
|
260
|
-
}
|
|
261
|
-
processMessage(message) {
|
|
262
|
-
if (message.id && this.pendingRequests.has(message.id)) {
|
|
263
|
-
const { resolve, reject } = this.pendingRequests.get(message.id);
|
|
264
|
-
this.pendingRequests.delete(message.id);
|
|
265
|
-
if (message.error) {
|
|
266
|
-
reject(new Error(message.error.message));
|
|
267
|
-
}
|
|
268
|
-
else {
|
|
269
|
-
resolve(message.result);
|
|
270
|
-
}
|
|
271
|
-
}
|
|
272
|
-
}
|
|
273
|
-
}
|
|
274
|
-
exports.MCPClientUnified = MCPClientUnified;
|
|
275
|
-
//# sourceMappingURL=MCPClientUnified.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"MCPClientUnified.js","sourceRoot":"","sources":["../../src/client/MCPClientUnified.ts"],"names":[],"mappings":";;;;;;AAAA,iDAAoD;AAGpD,kDAA0B;AAC1B,6CAAkD;AAelD,MAAa,gBAAgB;IAa3B,YAAY,gBAA+B,OAAO,EAAE,OAAe,IAAI;QAV/D,YAAO,GAAwB,IAAI,CAAC;QACpC,gBAAW,GAA+B,IAAI,CAAC;QAC/C,cAAS,GAAG,CAAC,CAAC;QACd,oBAAe,GAAG,IAAI,GAAG,EAG7B,CAAC;QACG,gBAAW,GAAG,KAAK,CAAC;QACpB,WAAM,GAAG,EAAE,CAAC;QAGlB,IAAI,CAAC,aAAa,GAAG,aAAa,CAAC;QACnC,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC;IACnB,CAAC;IAED,KAAK,CAAC,OAAO,CAAC,UAAmB;QAC/B,IAAI,IAAI,CAAC,aAAa,KAAK,OAAO,EAAE,CAAC;YACnC,IAAI,CAAC,UAAU,EAAE,CAAC;gBAChB,MAAM,IAAI,KAAK,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AAE,IAAI,IAAI,CAAC,eAAe,CAAC,GAAG,CAAC,OAAO,CAAC,EAAE,CAAC,EAAE,CAAC;YACvD,MAAM,EAAE,OAAO,EAAE,MAAM,EAAE,GAAG,IAAI,CAAC,eAAe,CAAC,GAAG,CAAC,OAAO,CAAC,EAAE,CAAE,CAAC;YAClE,IAAI,CAAC,eAAe,CAAC,MAAM,CAAC,OAAO,CAAC,EAAE,CAAC,CAAC;YAExC,IAAI,OAAO,CAAC,KAAK,EAAE,CAAC;gBAClB,MAAM,CAAC,IAAI,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC;YAC3C,CAAC;iBAAM,CAAC;gBACN,OAAO,CAAC,OAAO,CAAC,MAAM,CAAC,CAAC;YAC1B,CAAC;QACH,CAAC;IACH,CAAC;CACF;AApSD,4CAoSC"}
|
|
@@ -1,48 +0,0 @@
|
|
|
1
|
-
import { MCPClientUnified } from './MCPClientUnified';
|
|
2
|
-
import { MCPTestRequest, MCPTestResponse } from '../types';
|
|
3
|
-
import { TransportType } from '../transport';
|
|
4
|
-
export interface TestSuite {
|
|
5
|
-
name: string;
|
|
6
|
-
description: string;
|
|
7
|
-
tests: TestCase[];
|
|
8
|
-
}
|
|
9
|
-
export interface TestCase {
|
|
10
|
-
name: string;
|
|
11
|
-
description: string;
|
|
12
|
-
request: MCPTestRequest;
|
|
13
|
-
expectedSuccess?: boolean;
|
|
14
|
-
expectedDataContains?: any;
|
|
15
|
-
timeout?: number;
|
|
16
|
-
}
|
|
17
|
-
export interface TestResult {
|
|
18
|
-
testCase: TestCase;
|
|
19
|
-
response: MCPTestResponse;
|
|
20
|
-
passed: boolean;
|
|
21
|
-
duration: number;
|
|
22
|
-
error?: string;
|
|
23
|
-
transport?: TransportType;
|
|
24
|
-
}
|
|
25
|
-
export interface TestSuiteResult {
|
|
26
|
-
testSuite: TestSuite;
|
|
27
|
-
results: TestResult[];
|
|
28
|
-
totalTests: number;
|
|
29
|
-
passedTests: number;
|
|
30
|
-
failedTests: number;
|
|
31
|
-
duration: number;
|
|
32
|
-
transport?: TransportType;
|
|
33
|
-
}
|
|
34
|
-
export declare class MCPTestRunnerUnified {
|
|
35
|
-
private stdioClient;
|
|
36
|
-
private sseClient;
|
|
37
|
-
constructor(ssePort?: number);
|
|
38
|
-
runTestSuiteBothTransports(serverPath: string, testSuite: TestSuite): Promise<{
|
|
39
|
-
stdio: TestSuiteResult;
|
|
40
|
-
sse: TestSuiteResult;
|
|
41
|
-
}>;
|
|
42
|
-
runTestSuite(serverPath: string | null, testSuite: TestSuite, transport?: TransportType): Promise<TestSuiteResult>;
|
|
43
|
-
runTestCase(client: MCPClientUnified, testCase: TestCase, transport: TransportType): Promise<TestResult>;
|
|
44
|
-
generateTestSuite(serverPath: string | null, suiteName: string, transport?: TransportType): Promise<TestSuite>;
|
|
45
|
-
private evaluateTestResult;
|
|
46
|
-
private generateSampleParams;
|
|
47
|
-
}
|
|
48
|
-
//# sourceMappingURL=MCPTestRunnerUnified.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"MCPTestRunnerUnified.d.ts","sourceRoot":"","sources":["../../src/client/MCPTestRunnerUnified.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AACtD,OAAO,EAAE,cAAc,EAAE,eAAe,EAAE,MAAM,UAAU,CAAC;AAC3D,OAAO,EAAE,aAAa,EAAE,MAAM,cAAc,CAAC;AAE7C,MAAM,WAAW,SAAS;IACxB,IAAI,EAAE,MAAM,CAAC;IACb,WAAW,EAAE,MAAM,CAAC;IACpB,KAAK,EAAE,QAAQ,EAAE,CAAC;CACnB;AAED,MAAM,WAAW,QAAQ;IACvB,IAAI,EAAE,MAAM,CAAC;IACb,WAAW,EAAE,MAAM,CAAC;IACpB,OAAO,EAAE,cAAc,CAAC;IACxB,eAAe,CAAC,EAAE,OAAO,CAAC;IAC1B,oBAAoB,CAAC,EAAE,GAAG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