github-to-mcp-monorepo 1.0.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/.env.example +8 -0
- package/.github/CODEOWNERS +6 -0
- package/.husky/pre-commit +1 -0
- package/.nvmrc +1 -0
- package/.prettierignore +5 -0
- package/.prettierrc +7 -0
- package/.vscode/settings.json +4 -0
- package/ARCHITECTURE.md +1429 -0
- package/CHANGELOG.md +167 -0
- package/CONTRIBUTING.md +327 -0
- package/LICENSE +201 -0
- package/README.md +1028 -0
- package/SECURITY.md +248 -0
- package/VISUAL_GUIDE.md +437 -0
- package/apps/vscode/IMPLEMENTATION.md +480 -0
- package/apps/vscode/README.md +248 -0
- package/apps/vscode/package.json +381 -0
- package/apps/vscode/resources/icon.png +0 -0
- package/apps/vscode/resources/icon.svg +5 -0
- package/apps/vscode/src/commands/browseRegistry.ts +211 -0
- package/apps/vscode/src/commands/configureClaudeDesktop.ts +332 -0
- package/apps/vscode/src/commands/convert.ts +82 -0
- package/apps/vscode/src/commands/convertCurrentRepo.ts +109 -0
- package/apps/vscode/src/commands/convertFromUrl.ts +138 -0
- package/apps/vscode/src/commands/index.ts +121 -0
- package/apps/vscode/src/commands/validate.ts +197 -0
- package/apps/vscode/src/extension.ts +464 -0
- package/apps/vscode/src/global.d.ts +36 -0
- package/apps/vscode/src/test/extension.test.ts +73 -0
- package/apps/vscode/src/utils/file-generator.ts +529 -0
- package/apps/vscode/src/utils/github-api.ts +335 -0
- package/apps/vscode/src/utils/index.ts +29 -0
- package/apps/vscode/src/utils/mcp-config.ts +334 -0
- package/apps/vscode/src/utils/storage.ts +87 -0
- package/apps/vscode/src/views/McpServersTreeView.ts +160 -0
- package/apps/vscode/src/views/OutputChannelView.ts +195 -0
- package/apps/vscode/src/views/StatusBarItem.ts +251 -0
- package/apps/vscode/src/views/ToolsExplorerView.ts +314 -0
- package/apps/vscode/src/views/historyProvider.ts +75 -0
- package/apps/vscode/src/views/index.ts +12 -0
- package/apps/vscode/src/views/resultsPanel.ts +330 -0
- package/apps/vscode/src/webviews/ConversionPanel.ts +350 -0
- package/apps/vscode/src/webviews/ToolDetailsPanel.ts +448 -0
- package/apps/vscode/src/webviews/index.ts +9 -0
- package/apps/vscode/src/webviews/webview-ui/styles.ts +492 -0
- package/apps/vscode/tsconfig.json +20 -0
- package/apps/web/PLAYGROUND_GUIDE.md +499 -0
- package/apps/web/README.md +505 -0
- package/apps/web/app/api/convert/route.ts +100 -0
- package/apps/web/app/api/convert/stream/route.ts +198 -0
- package/apps/web/app/api/deploy/route.ts +157 -0
- package/apps/web/app/api/edge/route.ts +308 -0
- package/apps/web/app/api/export-docker/route.ts +284 -0
- package/apps/web/app/api/generate-openapi/route.ts +119 -0
- package/apps/web/app/api/mcp/[serverId]/route.ts +263 -0
- package/apps/web/app/api/playground/connect/route.ts +143 -0
- package/apps/web/app/api/playground/disconnect/route.ts +78 -0
- package/apps/web/app/api/playground/execute/route.ts +135 -0
- package/apps/web/app/api/playground/sessions/route.ts +103 -0
- package/apps/web/app/api/playground/tools/route.ts +117 -0
- package/apps/web/app/api/playground/v2/connect/route.ts +96 -0
- package/apps/web/app/api/playground/v2/disconnect/route.ts +88 -0
- package/apps/web/app/api/playground/v2/health/route.ts +80 -0
- package/apps/web/app/api/playground/v2/prompts/route.ts +160 -0
- package/apps/web/app/api/playground/v2/resources/route.ts +159 -0
- package/apps/web/app/api/playground/v2/sessions/route.ts +184 -0
- package/apps/web/app/api/playground/v2/tools/route.ts +167 -0
- package/apps/web/app/api/stream/route.ts +232 -0
- package/apps/web/app/batch/BatchConvertClient.tsx +190 -0
- package/apps/web/app/batch/page.tsx +37 -0
- package/apps/web/app/convert/page.tsx +269 -0
- package/apps/web/app/dashboard/page.tsx +380 -0
- package/apps/web/app/globals.css +622 -0
- package/apps/web/app/layout.tsx +120 -0
- package/apps/web/app/manifest.ts +31 -0
- package/apps/web/app/opengraph-image.tsx +112 -0
- package/apps/web/app/page.old.tsx +924 -0
- package/apps/web/app/page.tsx +77 -0
- package/apps/web/app/playground/page.tsx +306 -0
- package/apps/web/app/playground/v2/error.tsx +163 -0
- package/apps/web/app/playground/v2/layout.tsx +58 -0
- package/apps/web/app/playground/v2/loading.tsx +152 -0
- package/apps/web/app/playground/v2/page.tsx +644 -0
- package/apps/web/app/playground/v2/providers.tsx +214 -0
- package/apps/web/app/playground/v2/use-shortcuts.ts +209 -0
- package/apps/web/app/playground/v2/use-url-state.ts +296 -0
- package/apps/web/app/providers.tsx +22 -0
- package/apps/web/app/sitemap.ts +32 -0
- package/apps/web/app/twitter-image.tsx +112 -0
- package/apps/web/components/BranchSelector.tsx +401 -0
- package/apps/web/components/ClaudeConfigExport.tsx +226 -0
- package/apps/web/components/Features.tsx +84 -0
- package/apps/web/components/Footer.tsx +119 -0
- package/apps/web/components/GenerationProgress.tsx +248 -0
- package/apps/web/components/GithubUrlInput.tsx +483 -0
- package/apps/web/components/Header.tsx +175 -0
- package/apps/web/components/Hero.tsx +117 -0
- package/apps/web/components/HowItWorks.tsx +119 -0
- package/apps/web/components/InstallBanner.tsx +158 -0
- package/apps/web/components/Logo.tsx +116 -0
- package/apps/web/components/ParticleBackground.tsx +105 -0
- package/apps/web/components/Playground.tsx +472 -0
- package/apps/web/components/PlaygroundToolTester.tsx +410 -0
- package/apps/web/components/ProductCards.tsx +179 -0
- package/apps/web/components/SplitView.tsx +194 -0
- package/apps/web/components/ToolFilter.tsx +260 -0
- package/apps/web/components/ToolList.tsx +325 -0
- package/apps/web/components/batch/BatchConvert.tsx +785 -0
- package/apps/web/components/batch/index.ts +7 -0
- package/apps/web/components/convert/ConfigTabs.tsx +230 -0
- package/apps/web/components/convert/ConversionResult.tsx +482 -0
- package/apps/web/components/convert/InlinePlayground.tsx +259 -0
- package/apps/web/components/convert/LoadingSteps.tsx +311 -0
- package/apps/web/components/convert/OneClickInstall.tsx +224 -0
- package/apps/web/components/convert/ToolCard.tsx +189 -0
- package/apps/web/components/convert/TryInPlayground.tsx +242 -0
- package/apps/web/components/convert/index.ts +12 -0
- package/apps/web/components/deploy/DeployButton.tsx +369 -0
- package/apps/web/components/deploy/index.ts +7 -0
- package/apps/web/components/docker/DockerExport.tsx +690 -0
- package/apps/web/components/docker/index.ts +7 -0
- package/apps/web/components/install/OneClickInstall.tsx +676 -0
- package/apps/web/components/install/index.ts +7 -0
- package/apps/web/components/playground/CapabilityTabs.tsx +150 -0
- package/apps/web/components/playground/ConnectionStatusV2.tsx +322 -0
- package/apps/web/components/playground/EmptyStates.tsx +305 -0
- package/apps/web/components/playground/ExecutionLog.tsx +260 -0
- package/apps/web/components/playground/ExecutionLogV2.tsx +378 -0
- package/apps/web/components/playground/JsonViewer.tsx +388 -0
- package/apps/web/components/playground/PlaygroundLayout.tsx +244 -0
- package/apps/web/components/playground/PromptsPanel.tsx +385 -0
- package/apps/web/components/playground/ResourcesPanel.tsx +378 -0
- package/apps/web/components/playground/SchemaForm.tsx +477 -0
- package/apps/web/components/playground/ServerStatus.tsx +151 -0
- package/apps/web/components/playground/ShareButton.tsx +239 -0
- package/apps/web/components/playground/ToolsPanel.tsx +309 -0
- package/apps/web/components/playground/TransportConfigurator.tsx +563 -0
- package/apps/web/components/playground/index.ts +74 -0
- package/apps/web/components/playground/types.ts +202 -0
- package/apps/web/components/streaming/StreamingProgress.tsx +441 -0
- package/apps/web/components/streaming/index.ts +7 -0
- package/apps/web/components/ui/badge.tsx +42 -0
- package/apps/web/components/ui/button.tsx +88 -0
- package/apps/web/components/ui/card.tsx +75 -0
- package/apps/web/components/ui/code-block.tsx +122 -0
- package/apps/web/components/ui/index.ts +12 -0
- package/apps/web/components/ui/input.tsx +55 -0
- package/apps/web/components/ui/tabs.tsx +61 -0
- package/apps/web/hooks/index.ts +85 -0
- package/apps/web/hooks/types.ts +1173 -0
- package/apps/web/hooks/use-conversion.ts +133 -0
- package/apps/web/hooks/use-execution-history.ts +376 -0
- package/apps/web/hooks/use-generation-progress.ts +147 -0
- package/apps/web/hooks/use-local-storage.ts +88 -0
- package/apps/web/hooks/use-mcp-client.ts +623 -0
- package/apps/web/hooks/use-mcp-connection.ts +500 -0
- package/apps/web/hooks/use-mcp-execution.ts +282 -0
- package/apps/web/hooks/use-mcp-prompts.ts +441 -0
- package/apps/web/hooks/use-mcp-resources.ts +430 -0
- package/apps/web/hooks/use-mcp-tools.ts +540 -0
- package/apps/web/hooks/use-playground-store.ts +299 -0
- package/apps/web/hooks/use-playground.ts +184 -0
- package/apps/web/hooks/use-streaming-conversion.ts +227 -0
- package/apps/web/hooks/useBatchConversion.ts +271 -0
- package/apps/web/hooks/useDockerConfig.ts +161 -0
- package/apps/web/hooks/usePlatformDetection.ts +80 -0
- package/apps/web/hooks/useStreaming.ts +199 -0
- package/apps/web/lib/api/errors.ts +386 -0
- package/apps/web/lib/api/index.ts +137 -0
- package/apps/web/lib/api/logger.ts +187 -0
- package/apps/web/lib/api/middleware.ts +364 -0
- package/apps/web/lib/api/openapi.ts +977 -0
- package/apps/web/lib/api/session-manager.ts +594 -0
- package/apps/web/lib/api/types.ts +433 -0
- package/apps/web/lib/api/validation.ts +523 -0
- package/apps/web/lib/constants.ts +114 -0
- package/apps/web/lib/mcp/client.ts +1137 -0
- package/apps/web/lib/mcp/events.ts +651 -0
- package/apps/web/lib/mcp/index.ts +347 -0
- package/apps/web/lib/mcp/logger.ts +428 -0
- package/apps/web/lib/mcp/metrics.ts +703 -0
- package/apps/web/lib/mcp/retry.ts +616 -0
- package/apps/web/lib/mcp/session-manager.ts +779 -0
- package/apps/web/lib/mcp/transports.ts +988 -0
- package/apps/web/lib/mcp/types.ts +594 -0
- package/apps/web/lib/mcp-client-enhanced.ts +871 -0
- package/apps/web/lib/mcp-client.ts +778 -0
- package/apps/web/lib/mcp-errors.ts +489 -0
- package/apps/web/lib/mcp-sandbox.ts +593 -0
- package/apps/web/lib/mcp-testing.ts +428 -0
- package/apps/web/lib/mcp-types.ts +448 -0
- package/apps/web/lib/playground-store.tsx +1147 -0
- package/apps/web/lib/utils.ts +439 -0
- package/apps/web/next-env.d.ts +5 -0
- package/apps/web/next.config.js +23 -0
- package/apps/web/package.json +55 -0
- package/apps/web/postcss.config.js +6 -0
- package/apps/web/public/.well-known/ai-plugin.json +17 -0
- package/apps/web/public/logo.svg +6 -0
- package/apps/web/public/robots.txt +22 -0
- package/apps/web/public/schema.json +27 -0
- package/apps/web/tailwind.config.js +26 -0
- package/apps/web/tailwind.config.ts +123 -0
- package/apps/web/tsconfig.json +20 -0
- package/apps/web/types/deploy.ts +139 -0
- package/apps/web/types/index.ts +247 -0
- package/apps/web/vercel.json +39 -0
- package/eslint.config.mjs +23 -0
- package/llms.txt +102 -0
- package/mkdocs/docs/api/core.md +318 -0
- package/mkdocs/docs/api/index.md +128 -0
- package/mkdocs/docs/api/mcp-server.md +301 -0
- package/mkdocs/docs/api/openapi-parser.md +254 -0
- package/mkdocs/docs/assets/logo.svg +7 -0
- package/mkdocs/docs/changelog.md +118 -0
- package/mkdocs/docs/cli/generate.md +148 -0
- package/mkdocs/docs/cli/index.md +52 -0
- package/mkdocs/docs/cli/inspect.md +164 -0
- package/mkdocs/docs/cli/serve.md +136 -0
- package/mkdocs/docs/concepts/classification.md +254 -0
- package/mkdocs/docs/concepts/how-it-works.md +299 -0
- package/mkdocs/docs/concepts/index.md +77 -0
- package/mkdocs/docs/concepts/mcp-protocol.md +362 -0
- package/mkdocs/docs/concepts/tool-types.md +382 -0
- package/mkdocs/docs/contributing/architecture.md +262 -0
- package/mkdocs/docs/contributing/development.md +245 -0
- package/mkdocs/docs/contributing/index.md +73 -0
- package/mkdocs/docs/contributing/testing.md +320 -0
- package/mkdocs/docs/getting-started/configuration.md +235 -0
- package/mkdocs/docs/getting-started/index.md +54 -0
- package/mkdocs/docs/getting-started/installation.md +145 -0
- package/mkdocs/docs/getting-started/quickstart.md +160 -0
- package/mkdocs/docs/guides/batch.md +375 -0
- package/mkdocs/docs/guides/claude-desktop.md +227 -0
- package/mkdocs/docs/guides/cursor.md +188 -0
- package/mkdocs/docs/guides/custom-tools.md +367 -0
- package/mkdocs/docs/guides/index.md +78 -0
- package/mkdocs/docs/guides/private-repos.md +221 -0
- package/mkdocs/docs/guides/vscode.md +247 -0
- package/mkdocs/docs/index.md +175 -0
- package/mkdocs/docs/reference/config.md +223 -0
- package/mkdocs/docs/reference/env.md +192 -0
- package/mkdocs/docs/reference/index.md +102 -0
- package/mkdocs/docs/reference/tools.md +309 -0
- package/mkdocs/docs/stylesheets/extra.css +231 -0
- package/mkdocs/mkdocs.yml +204 -0
- package/mkdocs/overrides/.gitkeep +1 -0
- package/mkdocs/overrides/main.html +7 -0
- package/mkdocs/python-deps.txt +7 -0
- package/mkdocs/vercel.json +11 -0
- package/package.json +63 -0
- package/packages/core/package.json +61 -0
- package/packages/core/src/__tests__/bitbucket-client.test.ts +366 -0
- package/packages/core/src/__tests__/cli.test.ts +235 -0
- package/packages/core/src/__tests__/code-extractor.test.ts +378 -0
- package/packages/core/src/__tests__/docker-generator.test.ts +255 -0
- package/packages/core/src/__tests__/github-client.test.ts +390 -0
- package/packages/core/src/__tests__/gitlab-client.test.ts +319 -0
- package/packages/core/src/__tests__/go-extractor.test.ts +351 -0
- package/packages/core/src/__tests__/graphql-extractor.test.ts +330 -0
- package/packages/core/src/__tests__/java-extractor.test.ts +497 -0
- package/packages/core/src/__tests__/plugins.test.ts +467 -0
- package/packages/core/src/__tests__/readme-extractor.test.ts +258 -0
- package/packages/core/src/__tests__/redis-cache.test.ts +307 -0
- package/packages/core/src/__tests__/rust-extractor.test.ts +252 -0
- package/packages/core/src/__tests__/streaming.test.ts +251 -0
- package/packages/core/src/additional-extractors.ts +333 -0
- package/packages/core/src/cache/cache-interface.ts +179 -0
- package/packages/core/src/cache/index.ts +210 -0
- package/packages/core/src/cache/redis-cache.ts +291 -0
- package/packages/core/src/cache/upstash-cache.ts +379 -0
- package/packages/core/src/cache.ts +251 -0
- package/packages/core/src/cli.ts +822 -0
- package/packages/core/src/code-extractor.ts +696 -0
- package/packages/core/src/docker-generator.ts +470 -0
- package/packages/core/src/edge-compatible.ts +491 -0
- package/packages/core/src/extractors/go-extractor.ts +791 -0
- package/packages/core/src/extractors/index.ts +9 -0
- package/packages/core/src/extractors/java-extractor.ts +937 -0
- package/packages/core/src/extractors/rust-extractor.ts +744 -0
- package/packages/core/src/github-client.ts +319 -0
- package/packages/core/src/go-generator.ts +356 -0
- package/packages/core/src/graphql-extractor.ts +358 -0
- package/packages/core/src/index.ts +797 -0
- package/packages/core/src/langchain-exporter.ts +617 -0
- package/packages/core/src/language-parsers.ts +1114 -0
- package/packages/core/src/mcp-introspector.ts +279 -0
- package/packages/core/src/monorepo-detector.ts +378 -0
- package/packages/core/src/plugins/index.ts +370 -0
- package/packages/core/src/plugins/registry.ts +404 -0
- package/packages/core/src/plugins/types.ts +215 -0
- package/packages/core/src/providers/base-provider.ts +246 -0
- package/packages/core/src/providers/bitbucket-client.ts +464 -0
- package/packages/core/src/providers/gitlab-client.ts +388 -0
- package/packages/core/src/providers/index.ts +176 -0
- package/packages/core/src/python-generator.ts +260 -0
- package/packages/core/src/queue/index.ts +100 -0
- package/packages/core/src/queue/memory-queue.ts +445 -0
- package/packages/core/src/queue/redis-queue.ts +578 -0
- package/packages/core/src/queue/types.ts +251 -0
- package/packages/core/src/readme-extractor.ts +409 -0
- package/packages/core/src/schema-generator.ts +638 -0
- package/packages/core/src/streaming.ts +999 -0
- package/packages/core/src/types.ts +289 -0
- package/packages/core/tsconfig.json +9 -0
- package/packages/core/tsup.config.ts +25 -0
- package/packages/mcp-server/README.md +297 -0
- package/packages/mcp-server/package.json +55 -0
- package/packages/mcp-server/src/__tests__/mcp-server.test.ts +177 -0
- package/packages/mcp-server/src/__tests__/tools.test.ts +217 -0
- package/packages/mcp-server/src/index.ts +1206 -0
- package/packages/mcp-server/src/prompts/index.ts +601 -0
- package/packages/mcp-server/src/tools/export-docker.ts +362 -0
- package/packages/mcp-server/src/tools/generate-openapi.ts +162 -0
- package/packages/mcp-server/src/tools/monitor-mcp-server.ts +448 -0
- package/packages/mcp-server/src/tools/stream-convert.ts +398 -0
- package/packages/mcp-server/src/tools/test-mcp-tool.ts +531 -0
- package/packages/mcp-server/tsconfig.json +12 -0
- package/packages/mcp-server/tsup.config.ts +14 -0
- package/packages/openapi-parser/package-lock.json +3028 -0
- package/packages/openapi-parser/package.json +41 -0
- package/packages/openapi-parser/src/analyzer.ts +700 -0
- package/packages/openapi-parser/src/asyncapi-parser.ts +475 -0
- package/packages/openapi-parser/src/cli.ts +302 -0
- package/packages/openapi-parser/src/generator.ts +570 -0
- package/packages/openapi-parser/src/generators/express-analyzer.ts +649 -0
- package/packages/openapi-parser/src/generators/fastapi-analyzer.ts +960 -0
- package/packages/openapi-parser/src/generators/index.ts +200 -0
- package/packages/openapi-parser/src/generators/nextjs-analyzer.ts +768 -0
- package/packages/openapi-parser/src/generators/openapi-builder.ts +527 -0
- package/packages/openapi-parser/src/generators/types.ts +298 -0
- package/packages/openapi-parser/src/graphql-parser.ts +462 -0
- package/packages/openapi-parser/src/grpc-parser.ts +649 -0
- package/packages/openapi-parser/src/har-parser.ts +723 -0
- package/packages/openapi-parser/src/index.ts +635 -0
- package/packages/openapi-parser/src/insomnia-parser.ts +614 -0
- package/packages/openapi-parser/src/parser.ts +231 -0
- package/packages/openapi-parser/src/postman-parser.ts +611 -0
- package/packages/openapi-parser/src/ref-resolver.ts +313 -0
- package/packages/openapi-parser/src/transformer.ts +459 -0
- package/packages/openapi-parser/tests/generators/express.test.ts +209 -0
- package/packages/openapi-parser/tests/generators/fastapi.test.ts +236 -0
- package/packages/openapi-parser/tests/generators/nextjs.test.ts +273 -0
- package/packages/openapi-parser/tests/parsers.test.ts +847 -0
- package/packages/openapi-parser/tsconfig.json +9 -0
- package/packages/openapi-parser/tsup.config.ts +11 -0
- package/packages/registry/package.json +59 -0
- package/packages/registry/src/cli.ts +456 -0
- package/packages/registry/src/index.ts +44 -0
- package/packages/registry/src/popular/github.json +47 -0
- package/packages/registry/src/popular/index.ts +55 -0
- package/packages/registry/src/popular/linear.json +42 -0
- package/packages/registry/src/popular/notion.json +42 -0
- package/packages/registry/src/popular/openai.json +40 -0
- package/packages/registry/src/popular/resend.json +38 -0
- package/packages/registry/src/popular/slack.json +42 -0
- package/packages/registry/src/popular/stripe.json +163 -0
- package/packages/registry/src/popular/supabase.json +42 -0
- package/packages/registry/src/popular/twilio.json +40 -0
- package/packages/registry/src/popular/vercel.json +40 -0
- package/packages/registry/src/registry.ts +492 -0
- package/packages/registry/src/storage.ts +334 -0
- package/packages/registry/src/types.ts +275 -0
- package/packages/registry/src/updater.ts +208 -0
- package/packages/registry/tsconfig.json +10 -0
- package/packages/registry/tsup.config.ts +11 -0
- package/pnpm-workspace.yaml +3 -0
- package/scripts/build-docs.sh +16 -0
- package/server.json +9 -0
- package/templates/Dockerfile.python.template +60 -0
- package/templates/Dockerfile.typescript.template +60 -0
- package/templates/docker-compose.template.yml +68 -0
- package/tests/fixtures/express-app/index.js +34 -0
- package/tests/fixtures/express-app/routes/posts.js +43 -0
- package/tests/fixtures/express-app/routes/users.js +58 -0
- package/tests/fixtures/fastapi-app/main.py +125 -0
- package/tests/fixtures/fastapi-app/routes/admin.py +42 -0
- package/tests/fixtures/graphql/simple-schema.graphql +65 -0
- package/tests/fixtures/mocks/github-api-responses.json +63 -0
- package/tests/fixtures/nextjs-app/app/api/posts/route.ts +55 -0
- package/tests/fixtures/nextjs-app/app/api/users/[id]/route.ts +63 -0
- package/tests/fixtures/nextjs-app/app/api/users/route.ts +44 -0
- package/tests/fixtures/nextjs-app/pages/api/health.ts +28 -0
- package/tests/fixtures/openapi/petstore.yaml +179 -0
- package/tests/integration/langchain-export.test.ts +405 -0
- package/tests/integration/openapi-conversion.test.ts +221 -0
- package/tsconfig.json +18 -0
- package/vitest.config.ts +32 -0
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
'use client'
|
|
2
|
+
|
|
3
|
+
import Header from '@/components/Header'
|
|
4
|
+
import Hero from '@/components/Hero'
|
|
5
|
+
import ProductCards from '@/components/ProductCards'
|
|
6
|
+
import HowItWorks from '@/components/HowItWorks'
|
|
7
|
+
import Features from '@/components/Features'
|
|
8
|
+
import Footer from '@/components/Footer'
|
|
9
|
+
import ParticleBackground from '@/components/ParticleBackground'
|
|
10
|
+
import InstallBanner from '@/components/InstallBanner'
|
|
11
|
+
import { motion } from 'framer-motion'
|
|
12
|
+
import { Github } from 'lucide-react'
|
|
13
|
+
|
|
14
|
+
export default function Home() {
|
|
15
|
+
return (
|
|
16
|
+
<main id="main-content" className="relative min-h-screen">
|
|
17
|
+
<ParticleBackground />
|
|
18
|
+
<Header />
|
|
19
|
+
|
|
20
|
+
<div className="container mx-auto px-4 pt-24 pb-16">
|
|
21
|
+
{/* Hero with main conversion tool - front and center */}
|
|
22
|
+
<Hero />
|
|
23
|
+
|
|
24
|
+
{/* Quick links and secondary actions */}
|
|
25
|
+
<motion.div
|
|
26
|
+
initial={{ opacity: 0, y: 20 }}
|
|
27
|
+
animate={{ opacity: 1, y: 0 }}
|
|
28
|
+
transition={{ delay: 0.35 }}
|
|
29
|
+
className="flex flex-wrap justify-center gap-4 mt-12 mb-8"
|
|
30
|
+
>
|
|
31
|
+
<a
|
|
32
|
+
href="/#how-it-works"
|
|
33
|
+
className="px-6 py-3 bg-transparent border border-neutral-700 rounded-xl font-semibold text-white hover:border-neutral-500 hover:bg-white/5 transition-all"
|
|
34
|
+
>
|
|
35
|
+
How It Works
|
|
36
|
+
</a>
|
|
37
|
+
<a
|
|
38
|
+
href="/playground"
|
|
39
|
+
className="px-6 py-3 bg-transparent border border-neutral-700 rounded-xl font-semibold text-white hover:border-neutral-500 hover:bg-white/5 transition-all"
|
|
40
|
+
>
|
|
41
|
+
Try Playground
|
|
42
|
+
</a>
|
|
43
|
+
<a
|
|
44
|
+
href="https://github.com/nirholas/github-to-mcp"
|
|
45
|
+
target="_blank"
|
|
46
|
+
rel="noopener noreferrer"
|
|
47
|
+
className="px-6 py-3 bg-transparent border border-neutral-700 rounded-xl font-semibold text-white hover:border-neutral-500 hover:bg-white/5 transition-all flex items-center gap-2"
|
|
48
|
+
>
|
|
49
|
+
<Github className="w-4 h-4" />
|
|
50
|
+
View on GitHub
|
|
51
|
+
</a>
|
|
52
|
+
</motion.div>
|
|
53
|
+
|
|
54
|
+
{/* CLI Install Banner */}
|
|
55
|
+
<motion.div
|
|
56
|
+
initial={{ opacity: 0, y: 20 }}
|
|
57
|
+
animate={{ opacity: 1, y: 0 }}
|
|
58
|
+
transition={{ delay: 0.4 }}
|
|
59
|
+
className="max-w-2xl mx-auto mb-16"
|
|
60
|
+
>
|
|
61
|
+
<InstallBanner variant="hero" />
|
|
62
|
+
</motion.div>
|
|
63
|
+
|
|
64
|
+
{/* All tools and features - accessible from homepage */}
|
|
65
|
+
<ProductCards />
|
|
66
|
+
|
|
67
|
+
{/* How it works - educational content below */}
|
|
68
|
+
<HowItWorks />
|
|
69
|
+
|
|
70
|
+
{/* Technical features */}
|
|
71
|
+
<Features />
|
|
72
|
+
</div>
|
|
73
|
+
|
|
74
|
+
<Footer />
|
|
75
|
+
</main>
|
|
76
|
+
)
|
|
77
|
+
}
|
|
@@ -0,0 +1,306 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Playground Page - Interactive MCP tool testing
|
|
3
|
+
* @copyright 2024-2026 nirholas
|
|
4
|
+
* @license MIT
|
|
5
|
+
*/
|
|
6
|
+
|
|
7
|
+
'use client';
|
|
8
|
+
|
|
9
|
+
import { Suspense, useEffect, useState } from 'react';
|
|
10
|
+
import { useSearchParams } from 'next/navigation';
|
|
11
|
+
import { motion } from 'framer-motion';
|
|
12
|
+
import { Terminal, ArrowLeft, AlertCircle, RefreshCw, Share2, Check, Loader2 } from 'lucide-react';
|
|
13
|
+
import Link from 'next/link';
|
|
14
|
+
|
|
15
|
+
import Header from '@/components/Header';
|
|
16
|
+
import Footer from '@/components/Footer';
|
|
17
|
+
import ParticleBackground from '@/components/ParticleBackground';
|
|
18
|
+
import Playground from '@/components/Playground';
|
|
19
|
+
import { Button } from '@/components/ui/button';
|
|
20
|
+
import { usePlaygroundState, usePlaygroundErrors, usePlaygroundSharing } from '@/hooks/use-playground-store';
|
|
21
|
+
|
|
22
|
+
// V2 Banner Component
|
|
23
|
+
function V2Banner() {
|
|
24
|
+
return (
|
|
25
|
+
<motion.div
|
|
26
|
+
initial={{ opacity: 0, y: -10 }}
|
|
27
|
+
animate={{ opacity: 1, y: 0 }}
|
|
28
|
+
className="mb-6"
|
|
29
|
+
>
|
|
30
|
+
<Link
|
|
31
|
+
href="/playground/v2"
|
|
32
|
+
className="block p-4 rounded-xl border border-green-500/30 bg-green-500/10 hover:bg-green-500/20 transition-colors group"
|
|
33
|
+
>
|
|
34
|
+
<div className="flex items-center justify-between">
|
|
35
|
+
<div className="flex items-center gap-3">
|
|
36
|
+
<span className="px-2 py-1 text-xs font-bold bg-green-500/20 text-green-400 rounded-full">
|
|
37
|
+
NEW
|
|
38
|
+
</span>
|
|
39
|
+
<p className="text-white font-medium">
|
|
40
|
+
Try the new Playground v2 with enhanced MCP support
|
|
41
|
+
</p>
|
|
42
|
+
</div>
|
|
43
|
+
<span className="text-green-400 group-hover:translate-x-1 transition-transform">
|
|
44
|
+
→
|
|
45
|
+
</span>
|
|
46
|
+
</div>
|
|
47
|
+
<p className="mt-2 text-sm text-neutral-400 ml-14">
|
|
48
|
+
Connect to any MCP server using STDIO, SSE, or Streamable HTTP transport.
|
|
49
|
+
</p>
|
|
50
|
+
</Link>
|
|
51
|
+
</motion.div>
|
|
52
|
+
);
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
function PlaygroundContent() {
|
|
56
|
+
const searchParams = useSearchParams();
|
|
57
|
+
const {
|
|
58
|
+
generatedCode,
|
|
59
|
+
tools,
|
|
60
|
+
repoName,
|
|
61
|
+
isLoading,
|
|
62
|
+
conversionResult,
|
|
63
|
+
loadFromUrl,
|
|
64
|
+
} = usePlaygroundState();
|
|
65
|
+
|
|
66
|
+
const {
|
|
67
|
+
error,
|
|
68
|
+
hasError,
|
|
69
|
+
isRecoverable,
|
|
70
|
+
retryCount,
|
|
71
|
+
clearError,
|
|
72
|
+
incrementRetry,
|
|
73
|
+
} = usePlaygroundErrors();
|
|
74
|
+
|
|
75
|
+
const {
|
|
76
|
+
canShare,
|
|
77
|
+
copyShareLink,
|
|
78
|
+
} = usePlaygroundSharing();
|
|
79
|
+
|
|
80
|
+
const [shareCopied, setShareCopied] = useState(false);
|
|
81
|
+
const [isRetrying, setIsRetrying] = useState(false);
|
|
82
|
+
|
|
83
|
+
// Load from URL params on mount
|
|
84
|
+
useEffect(() => {
|
|
85
|
+
const hasUrlParams = searchParams.has('code') || searchParams.has('gist');
|
|
86
|
+
if (hasUrlParams) {
|
|
87
|
+
loadFromUrl(searchParams);
|
|
88
|
+
}
|
|
89
|
+
}, [searchParams, loadFromUrl]);
|
|
90
|
+
|
|
91
|
+
// Handle share button click
|
|
92
|
+
const handleShare = async () => {
|
|
93
|
+
const success = await copyShareLink();
|
|
94
|
+
if (success) {
|
|
95
|
+
setShareCopied(true);
|
|
96
|
+
setTimeout(() => setShareCopied(false), 2000);
|
|
97
|
+
}
|
|
98
|
+
};
|
|
99
|
+
|
|
100
|
+
// Handle retry
|
|
101
|
+
const handleRetry = async () => {
|
|
102
|
+
setIsRetrying(true);
|
|
103
|
+
incrementRetry();
|
|
104
|
+
|
|
105
|
+
// Try to reload from URL params
|
|
106
|
+
const hasUrlParams = searchParams.has('code') || searchParams.has('gist');
|
|
107
|
+
if (hasUrlParams) {
|
|
108
|
+
await loadFromUrl(searchParams);
|
|
109
|
+
}
|
|
110
|
+
|
|
111
|
+
clearError();
|
|
112
|
+
setIsRetrying(false);
|
|
113
|
+
};
|
|
114
|
+
|
|
115
|
+
// Determine if we have content to show
|
|
116
|
+
const hasContent = !!generatedCode || tools.length > 0;
|
|
117
|
+
|
|
118
|
+
return (
|
|
119
|
+
<main id="main-content" className="relative min-h-screen flex flex-col">
|
|
120
|
+
<ParticleBackground />
|
|
121
|
+
<Header />
|
|
122
|
+
|
|
123
|
+
<div className="container mx-auto px-4 pt-24 pb-8 flex-1 flex flex-col">
|
|
124
|
+
{/* Back link */}
|
|
125
|
+
<motion.div
|
|
126
|
+
initial={{ opacity: 0, x: -20 }}
|
|
127
|
+
animate={{ opacity: 1, x: 0 }}
|
|
128
|
+
className="mb-6 flex items-center justify-between"
|
|
129
|
+
>
|
|
130
|
+
<Link
|
|
131
|
+
href="/"
|
|
132
|
+
className="inline-flex items-center gap-2 text-sm text-neutral-400 hover:text-white transition-colors"
|
|
133
|
+
>
|
|
134
|
+
<ArrowLeft className="w-4 h-4" />
|
|
135
|
+
Back to Home
|
|
136
|
+
</Link>
|
|
137
|
+
|
|
138
|
+
{/* Share button */}
|
|
139
|
+
{canShare && (
|
|
140
|
+
<Button
|
|
141
|
+
onClick={handleShare}
|
|
142
|
+
variant="outline"
|
|
143
|
+
size="sm"
|
|
144
|
+
className="gap-2"
|
|
145
|
+
>
|
|
146
|
+
{shareCopied ? (
|
|
147
|
+
<>
|
|
148
|
+
<Check className="w-4 h-4 text-green-400" />
|
|
149
|
+
Link Copied!
|
|
150
|
+
</>
|
|
151
|
+
) : (
|
|
152
|
+
<>
|
|
153
|
+
<Share2 className="w-4 h-4" />
|
|
154
|
+
Share
|
|
155
|
+
</>
|
|
156
|
+
)}
|
|
157
|
+
</Button>
|
|
158
|
+
)}
|
|
159
|
+
</motion.div>
|
|
160
|
+
|
|
161
|
+
{/* Page header */}
|
|
162
|
+
<motion.div
|
|
163
|
+
initial={{ opacity: 0, y: 20 }}
|
|
164
|
+
animate={{ opacity: 1, y: 0 }}
|
|
165
|
+
className="text-center mb-8"
|
|
166
|
+
>
|
|
167
|
+
{/* V2 Banner */}
|
|
168
|
+
<V2Banner />
|
|
169
|
+
|
|
170
|
+
<div className="inline-flex items-center gap-2 px-4 py-2 rounded-full bg-white/5 border border-neutral-800 mb-6">
|
|
171
|
+
<Terminal className="w-4 h-4 text-white" />
|
|
172
|
+
<span className="text-sm font-medium text-neutral-400">
|
|
173
|
+
Interactive <span className="text-white font-semibold">Playground</span>
|
|
174
|
+
</span>
|
|
175
|
+
{repoName && (
|
|
176
|
+
<span className="ml-2 px-2 py-0.5 text-xs bg-white/10 text-white rounded-full">
|
|
177
|
+
{repoName}
|
|
178
|
+
</span>
|
|
179
|
+
)}
|
|
180
|
+
</div>
|
|
181
|
+
|
|
182
|
+
<h1 className="text-4xl md:text-5xl font-bold text-white mb-4">
|
|
183
|
+
Test Your MCP Tools
|
|
184
|
+
</h1>
|
|
185
|
+
<p className="text-lg text-neutral-400 max-w-2xl mx-auto">
|
|
186
|
+
{hasContent
|
|
187
|
+
? `Execute ${tools.length} tool${tools.length !== 1 ? 's' : ''} with an interactive testing interface.`
|
|
188
|
+
: 'Try out generated tools with an interactive testing interface. Execute tools, view responses, and explore schemas.'
|
|
189
|
+
}
|
|
190
|
+
</p>
|
|
191
|
+
</motion.div>
|
|
192
|
+
|
|
193
|
+
{/* Loading state */}
|
|
194
|
+
{isLoading && (
|
|
195
|
+
<motion.div
|
|
196
|
+
initial={{ opacity: 0 }}
|
|
197
|
+
animate={{ opacity: 1 }}
|
|
198
|
+
className="flex-1 flex items-center justify-center"
|
|
199
|
+
>
|
|
200
|
+
<div className="text-center">
|
|
201
|
+
<Loader2 className="w-12 h-12 text-white animate-spin mx-auto mb-4" />
|
|
202
|
+
<p className="text-neutral-400">Loading playground...</p>
|
|
203
|
+
</div>
|
|
204
|
+
</motion.div>
|
|
205
|
+
)}
|
|
206
|
+
|
|
207
|
+
{/* Error state */}
|
|
208
|
+
{hasError && error && (
|
|
209
|
+
<motion.div
|
|
210
|
+
initial={{ opacity: 0, y: 20 }}
|
|
211
|
+
animate={{ opacity: 1, y: 0 }}
|
|
212
|
+
className="max-w-2xl mx-auto mb-8"
|
|
213
|
+
>
|
|
214
|
+
<div className={`rounded-xl border p-6 ${
|
|
215
|
+
error.type === 'syntax'
|
|
216
|
+
? 'border-yellow-500/30 bg-yellow-500/10'
|
|
217
|
+
: 'border-red-500/30 bg-red-500/10'
|
|
218
|
+
}`}>
|
|
219
|
+
<div className="flex items-start gap-4">
|
|
220
|
+
<div className={`w-10 h-10 rounded-lg flex items-center justify-center flex-shrink-0 ${
|
|
221
|
+
error.type === 'syntax'
|
|
222
|
+
? 'bg-yellow-500/20'
|
|
223
|
+
: 'bg-red-500/20'
|
|
224
|
+
}`}>
|
|
225
|
+
<AlertCircle className={`w-5 h-5 ${
|
|
226
|
+
error.type === 'syntax' ? 'text-yellow-400' : 'text-red-400'
|
|
227
|
+
}`} />
|
|
228
|
+
</div>
|
|
229
|
+
<div className="flex-1">
|
|
230
|
+
<h3 className={`text-lg font-semibold mb-2 ${
|
|
231
|
+
error.type === 'syntax' ? 'text-yellow-400' : 'text-red-400'
|
|
232
|
+
}`}>
|
|
233
|
+
{error.type === 'syntax' && 'Syntax Error'}
|
|
234
|
+
{error.type === 'server' && 'Server Error'}
|
|
235
|
+
{error.type === 'execution' && 'Execution Error'}
|
|
236
|
+
{error.type === 'network' && 'Network Error'}
|
|
237
|
+
{error.type === 'unknown' && 'Error'}
|
|
238
|
+
</h3>
|
|
239
|
+
<p className="text-neutral-300 mb-2">{error.message}</p>
|
|
240
|
+
{error.details && (
|
|
241
|
+
<pre className="text-sm text-neutral-500 bg-black/30 rounded-lg p-3 overflow-x-auto mb-4 font-mono">
|
|
242
|
+
{error.details}
|
|
243
|
+
</pre>
|
|
244
|
+
)}
|
|
245
|
+
|
|
246
|
+
<div className="flex items-center gap-3">
|
|
247
|
+
{isRecoverable && (
|
|
248
|
+
<Button
|
|
249
|
+
onClick={handleRetry}
|
|
250
|
+
disabled={isRetrying}
|
|
251
|
+
variant="outline"
|
|
252
|
+
size="sm"
|
|
253
|
+
>
|
|
254
|
+
{isRetrying ? (
|
|
255
|
+
<Loader2 className="w-4 h-4 mr-2 animate-spin" />
|
|
256
|
+
) : (
|
|
257
|
+
<RefreshCw className="w-4 h-4 mr-2" />
|
|
258
|
+
)}
|
|
259
|
+
{retryCount > 0 ? `Retry (${retryCount})` : 'Retry'}
|
|
260
|
+
</Button>
|
|
261
|
+
)}
|
|
262
|
+
<Button
|
|
263
|
+
onClick={clearError}
|
|
264
|
+
variant="ghost"
|
|
265
|
+
size="sm"
|
|
266
|
+
>
|
|
267
|
+
Dismiss
|
|
268
|
+
</Button>
|
|
269
|
+
</div>
|
|
270
|
+
</div>
|
|
271
|
+
</div>
|
|
272
|
+
</div>
|
|
273
|
+
</motion.div>
|
|
274
|
+
)}
|
|
275
|
+
|
|
276
|
+
{/* Playground component */}
|
|
277
|
+
{!isLoading && (
|
|
278
|
+
<motion.div
|
|
279
|
+
initial={{ opacity: 0, y: 20 }}
|
|
280
|
+
animate={{ opacity: 1, y: 0 }}
|
|
281
|
+
transition={{ delay: 0.1 }}
|
|
282
|
+
className="flex-1 min-h-[600px]"
|
|
283
|
+
>
|
|
284
|
+
<Playground initialResult={conversionResult} />
|
|
285
|
+
</motion.div>
|
|
286
|
+
)}
|
|
287
|
+
</div>
|
|
288
|
+
|
|
289
|
+
<Footer />
|
|
290
|
+
</main>
|
|
291
|
+
);
|
|
292
|
+
}
|
|
293
|
+
|
|
294
|
+
export default function PlaygroundPage() {
|
|
295
|
+
return (
|
|
296
|
+
<Suspense
|
|
297
|
+
fallback={
|
|
298
|
+
<div className="min-h-screen bg-black flex items-center justify-center">
|
|
299
|
+
<div className="animate-spin w-8 h-8 border-2 border-white border-t-transparent rounded-full" />
|
|
300
|
+
</div>
|
|
301
|
+
}
|
|
302
|
+
>
|
|
303
|
+
<PlaygroundContent />
|
|
304
|
+
</Suspense>
|
|
305
|
+
);
|
|
306
|
+
}
|
|
@@ -0,0 +1,163 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Playground V2 Error Boundary - Error display with retry option
|
|
3
|
+
* @copyright 2024-2026 nirholas
|
|
4
|
+
* @license MIT
|
|
5
|
+
*/
|
|
6
|
+
|
|
7
|
+
'use client';
|
|
8
|
+
|
|
9
|
+
import { useEffect } from 'react';
|
|
10
|
+
import { motion } from 'framer-motion';
|
|
11
|
+
import { AlertTriangle, RefreshCw, Home, Bug } from 'lucide-react';
|
|
12
|
+
import Link from 'next/link';
|
|
13
|
+
import { Button } from '@/components/ui/button';
|
|
14
|
+
|
|
15
|
+
interface PlaygroundV2ErrorProps {
|
|
16
|
+
error: Error & { digest?: string };
|
|
17
|
+
reset: () => void;
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
export default function PlaygroundV2Error({ error, reset }: PlaygroundV2ErrorProps) {
|
|
21
|
+
useEffect(() => {
|
|
22
|
+
// Log error to console
|
|
23
|
+
console.error('[Playground V2 Error]', {
|
|
24
|
+
message: error.message,
|
|
25
|
+
stack: error.stack,
|
|
26
|
+
digest: error.digest,
|
|
27
|
+
});
|
|
28
|
+
|
|
29
|
+
// Optional: Send to error reporting service
|
|
30
|
+
// Example: Sentry, LogRocket, etc.
|
|
31
|
+
// reportError(error);
|
|
32
|
+
}, [error]);
|
|
33
|
+
|
|
34
|
+
const handleReset = () => {
|
|
35
|
+
// Clear any cached state that might cause issues
|
|
36
|
+
if (typeof window !== 'undefined') {
|
|
37
|
+
try {
|
|
38
|
+
// Clear potentially corrupted localStorage data
|
|
39
|
+
const keysToPreserve = ['mcp-playground-v2-visited'];
|
|
40
|
+
const keysToRemove: string[] = [];
|
|
41
|
+
|
|
42
|
+
for (let i = 0; i < localStorage.length; i++) {
|
|
43
|
+
const key = localStorage.key(i);
|
|
44
|
+
if (key && key.startsWith('mcp-playground') && !keysToPreserve.includes(key)) {
|
|
45
|
+
keysToRemove.push(key);
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
keysToRemove.forEach((key) => localStorage.removeItem(key));
|
|
50
|
+
} catch (e) {
|
|
51
|
+
console.warn('Failed to clear localStorage:', e);
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
reset();
|
|
56
|
+
};
|
|
57
|
+
|
|
58
|
+
const isNetworkError = error.message.toLowerCase().includes('network') ||
|
|
59
|
+
error.message.toLowerCase().includes('fetch');
|
|
60
|
+
|
|
61
|
+
const isConnectionError = error.message.toLowerCase().includes('connection') ||
|
|
62
|
+
error.message.toLowerCase().includes('connect');
|
|
63
|
+
|
|
64
|
+
return (
|
|
65
|
+
<main className="relative min-h-screen flex flex-col bg-black">
|
|
66
|
+
{/* Header placeholder */}
|
|
67
|
+
<div className="fixed top-0 left-0 right-0 z-50 backdrop-blur-xl bg-black/80 border-b border-neutral-800">
|
|
68
|
+
<div className="container mx-auto px-4">
|
|
69
|
+
<div className="flex items-center justify-between h-16">
|
|
70
|
+
<Link href="/" className="text-white font-bold">
|
|
71
|
+
github-to-mcp
|
|
72
|
+
</Link>
|
|
73
|
+
</div>
|
|
74
|
+
</div>
|
|
75
|
+
</div>
|
|
76
|
+
|
|
77
|
+
<div className="container mx-auto px-4 pt-24 pb-8 flex-1 flex items-center justify-center">
|
|
78
|
+
<motion.div
|
|
79
|
+
initial={{ opacity: 0, y: 20 }}
|
|
80
|
+
animate={{ opacity: 1, y: 0 }}
|
|
81
|
+
className="max-w-md w-full text-center"
|
|
82
|
+
>
|
|
83
|
+
{/* Error Icon */}
|
|
84
|
+
<div className="flex justify-center mb-6">
|
|
85
|
+
<div className="w-16 h-16 rounded-full bg-red-500/10 border border-red-500/30 flex items-center justify-center">
|
|
86
|
+
<AlertTriangle className="w-8 h-8 text-red-400" />
|
|
87
|
+
</div>
|
|
88
|
+
</div>
|
|
89
|
+
|
|
90
|
+
{/* Error Message */}
|
|
91
|
+
<h1 className="text-2xl font-bold text-white mb-2">
|
|
92
|
+
Something went wrong
|
|
93
|
+
</h1>
|
|
94
|
+
<p className="text-neutral-400 mb-6">
|
|
95
|
+
{isNetworkError
|
|
96
|
+
? 'Unable to connect to the server. Please check your network connection.'
|
|
97
|
+
: isConnectionError
|
|
98
|
+
? 'Failed to connect to the MCP server. Please verify your configuration.'
|
|
99
|
+
: 'An unexpected error occurred in the playground.'}
|
|
100
|
+
</p>
|
|
101
|
+
|
|
102
|
+
{/* Error Details (collapsible) */}
|
|
103
|
+
{process.env.NODE_ENV === 'development' && (
|
|
104
|
+
<details className="mb-6 text-left">
|
|
105
|
+
<summary className="cursor-pointer text-sm text-neutral-500 hover:text-neutral-400 transition-colors">
|
|
106
|
+
Show error details
|
|
107
|
+
</summary>
|
|
108
|
+
<div className="mt-3 p-4 rounded-lg bg-neutral-900 border border-neutral-800 overflow-x-auto">
|
|
109
|
+
<p className="text-xs text-red-400 font-mono break-all">
|
|
110
|
+
{error.message}
|
|
111
|
+
</p>
|
|
112
|
+
{error.digest && (
|
|
113
|
+
<p className="text-xs text-neutral-500 mt-2">
|
|
114
|
+
Digest: {error.digest}
|
|
115
|
+
</p>
|
|
116
|
+
)}
|
|
117
|
+
{error.stack && (
|
|
118
|
+
<pre className="text-xs text-neutral-500 mt-2 whitespace-pre-wrap">
|
|
119
|
+
{error.stack.split('\n').slice(0, 5).join('\n')}
|
|
120
|
+
</pre>
|
|
121
|
+
)}
|
|
122
|
+
</div>
|
|
123
|
+
</details>
|
|
124
|
+
)}
|
|
125
|
+
|
|
126
|
+
{/* Action Buttons */}
|
|
127
|
+
<div className="flex flex-col sm:flex-row gap-3 justify-center">
|
|
128
|
+
<Button
|
|
129
|
+
onClick={handleReset}
|
|
130
|
+
className="gap-2"
|
|
131
|
+
>
|
|
132
|
+
<RefreshCw className="w-4 h-4" />
|
|
133
|
+
Try Again
|
|
134
|
+
</Button>
|
|
135
|
+
<Button
|
|
136
|
+
variant="outline"
|
|
137
|
+
asChild
|
|
138
|
+
>
|
|
139
|
+
<Link href="/" className="gap-2">
|
|
140
|
+
<Home className="w-4 h-4" />
|
|
141
|
+
Go Home
|
|
142
|
+
</Link>
|
|
143
|
+
</Button>
|
|
144
|
+
</div>
|
|
145
|
+
|
|
146
|
+
{/* Help Text */}
|
|
147
|
+
<p className="mt-8 text-xs text-neutral-600">
|
|
148
|
+
If this problem persists, please{' '}
|
|
149
|
+
<a
|
|
150
|
+
href="https://github.com/nirholas/github-to-mcp/issues/new"
|
|
151
|
+
target="_blank"
|
|
152
|
+
rel="noopener noreferrer"
|
|
153
|
+
className="text-neutral-500 hover:text-neutral-400 underline inline-flex items-center gap-1"
|
|
154
|
+
>
|
|
155
|
+
report an issue
|
|
156
|
+
<Bug className="w-3 h-3" />
|
|
157
|
+
</a>
|
|
158
|
+
</p>
|
|
159
|
+
</motion.div>
|
|
160
|
+
</div>
|
|
161
|
+
</main>
|
|
162
|
+
);
|
|
163
|
+
}
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Playground V2 Layout - Metadata and layout wrapper
|
|
3
|
+
* @copyright 2024-2026 nirholas
|
|
4
|
+
* @license MIT
|
|
5
|
+
*/
|
|
6
|
+
|
|
7
|
+
import type { Metadata, Viewport } from 'next';
|
|
8
|
+
import { ReactNode } from 'react';
|
|
9
|
+
import { PlaygroundV2Providers } from './providers';
|
|
10
|
+
|
|
11
|
+
export const metadata: Metadata = {
|
|
12
|
+
title: 'MCP Playground | github-to-mcp',
|
|
13
|
+
description: 'Interactive MCP server testing playground. Connect to any MCP server using STDIO, SSE, or Streamable HTTP transport and test tools, resources, and prompts in real-time.',
|
|
14
|
+
keywords: [
|
|
15
|
+
'MCP',
|
|
16
|
+
'Model Context Protocol',
|
|
17
|
+
'playground',
|
|
18
|
+
'testing',
|
|
19
|
+
'tools',
|
|
20
|
+
'resources',
|
|
21
|
+
'prompts',
|
|
22
|
+
'AI',
|
|
23
|
+
'LLM',
|
|
24
|
+
],
|
|
25
|
+
openGraph: {
|
|
26
|
+
title: 'MCP Playground | github-to-mcp',
|
|
27
|
+
description: 'Interactive MCP server testing playground. Test tools, resources, and prompts in real-time.',
|
|
28
|
+
type: 'website',
|
|
29
|
+
},
|
|
30
|
+
twitter: {
|
|
31
|
+
card: 'summary_large_image',
|
|
32
|
+
title: 'MCP Playground | github-to-mcp',
|
|
33
|
+
description: 'Interactive MCP server testing playground. Test tools, resources, and prompts in real-time.',
|
|
34
|
+
},
|
|
35
|
+
robots: {
|
|
36
|
+
index: true,
|
|
37
|
+
follow: true,
|
|
38
|
+
},
|
|
39
|
+
};
|
|
40
|
+
|
|
41
|
+
export const viewport: Viewport = {
|
|
42
|
+
width: 'device-width',
|
|
43
|
+
initialScale: 1,
|
|
44
|
+
maximumScale: 1,
|
|
45
|
+
themeColor: '#000000',
|
|
46
|
+
};
|
|
47
|
+
|
|
48
|
+
interface PlaygroundV2LayoutProps {
|
|
49
|
+
children: ReactNode;
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
export default function PlaygroundV2Layout({ children }: PlaygroundV2LayoutProps) {
|
|
53
|
+
return (
|
|
54
|
+
<PlaygroundV2Providers>
|
|
55
|
+
{children}
|
|
56
|
+
</PlaygroundV2Providers>
|
|
57
|
+
);
|
|
58
|
+
}
|