feat(setup): import credential-free remote MCP entries - #240
Conversation
📝 WalkthroughWalkthroughThe client-entry import flow now accepts either a selected local stdio entry or a credential-free HTTPS remote entry. Remote inputs receive strict type, URL, and credential-shape validation, then produce read-only default configurations without OAuth discovery or upstream calls. CLI, Console, documentation, and tests reflect the expanded behavior. ChangesMCP client entry import
Estimated code review effort: 3 (Moderate) | ~25 minutes Possibly related issues
Possibly related PRs
Sequence Diagram(s)sequenceDiagram
participant SetupOrConsole
participant ClientEntryImporter
participant MiftahConfig
SetupOrConsole->>ClientEntryImporter: submit selected MCP entry
ClientEntryImporter->>ClientEntryImporter: validate local or HTTPS remote shape
ClientEntryImporter->>MiftahConfig: build read-only default configuration
MiftahConfig-->>SetupOrConsole: write configuration and return import action
Poem
Caution Pre-merge checks failedPlease resolve all errors before merging. Addressing warnings is optional.
❌ Failed checks (1 error)
✅ Passed checks (4 passed)
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Comment |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@src/setup/client-entry-import.ts`:
- Around line 390-411: Update safeImportedConfig to derive serializedUpstream
from baseline.upstream instead of reconstructing the stdio/streamable-http
shapes independently. Use a narrow type assertion if required, then pass that
derived value through the existing validation flow so the builder remains the
single source of truth.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: ASSERTIVE
Plan: Pro Plus
Run ID: dabad845-a7f6-4067-a3e4-6fd98d0a238e
📒 Files selected for processing (12)
README.mddocs/cli.mddocs/console-api.mdsrc/cli/setup-client-entry-import.tssrc/console/console-application-service.tssrc/console/console-assets.tssrc/setup/client-entry-import.tstests/client-entry-import.test.tstests/console-application-service.test.tstests/console-server.test.tstests/readme-product-contract.test.tstests/setup-command.test.ts
Summary
Refs #204
Security impact
env,headers, or trusted tool annotations introduced by a future preset change, while keeping the preset builder as the transport-shape source of truth.Validation