Skip to content

feat: auto-generate mcp.json inputs from collection definition#324

Open
lanzamelissa-sketch wants to merge 1 commit into
AmadeusITGroup:mainfrom
lanzamelissa-sketch:feat/mcp-inputs-auto-generation
Open

feat: auto-generate mcp.json inputs from collection definition#324
lanzamelissa-sketch wants to merge 1 commit into
AmadeusITGroup:mainfrom
lanzamelissa-sketch:feat/mcp-inputs-auto-generation

Conversation

@lanzamelissa-sketch

@lanzamelissa-sketch lanzamelissa-sketch commented Jul 6, 2026

Copy link
Copy Markdown

Description

Add support for automatic inputs generation in mcp.json when a collection defines MCP servers. Collections can now declare mcp.inputs in their .collection.yml to specify secrets and configurable values (e.g., tokens, usernames, passwords). These inputs are automatically merged into VS Code's mcp.json on install and cleaned up on uninstall.

Type of Change

  • 🐛 Bug fix (non-breaking change which fixes an issue)
  • ✨ New feature (non-breaking change which adds functionality)
  • 💥 Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • 📝 Documentation update
  • ♻️ Code refactoring (no functional changes)
  • ⚡ Performance improvement
  • 🧪 Test coverage improvement
  • 🔧 Configuration/build changes

Related Issues

Closes #298 (#298)
Fixes #
Relates to #

Changes Made

  • Add McpInputDefinition type to mcp.ts and replace inputs?: any[] with a strongly-typed array in McpConfiguration
  • Add mcpInputs?: McpInputDefinition[] field to DeploymentManifest in registry.ts
  • Extend CollectionManifest in awesome-copilot-adapter.ts and local-awesome-copilot-adapter.ts to support mcp.inputs; propagate inputs into bundle metadata and deployment manifest
  • Add mergeInputs() to McpConfigService: merges incoming inputs into existing ones, deduplicating by id (existing definition takes priority)
  • Add removeOrphanedInputs() to McpConfigService: scans remaining server configs for ${input:id} references and removes inputs no longer referenced by any server
  • Update mergeServers() in McpConfigService to accept and apply newInputs?: McpInputDefinition[]
  • Update installServers() and installServersToWorkspace() in McpServerManager to accept and pass inputsManifest
  • Call removeOrphanedInputs() in both removeServersForBundle() and uninstallServersFromWorkspace() on bundle removal
  • Pass manifest.mcpInputs through BundleInstaller.installMcpServers() to both install paths
  • Add mcp.inputs array schema to collection.schema.json
  • Update collection-schema.md with mcp.inputs example and reference table
  • Update mcp-integration.md with Input Definitions section, updated installation flow diagram, and updated uninstallation description
  • Update validation.md to mention mcp.inputs

Testing

Test Coverage

  • Unit tests added/updated
  • Integration tests added/updated
  • Manual testing completed
  • All existing tests pass

Manual Testing Steps

  1. Clone the fork and check out the feature branch

git clone https://github.com/lanzamelissa-sketch/ai-primitives-hub.git
cd ai-primitives-hub
git checkout feat/mcp-inputs-auto-generation
npm install && npm run compile

  1. Launch the extension in development mode by pressing F5 in VS Code — a new Extension Development Host window opens
  2. In VS Code settings (settings.json), add a local-awesome-copilot source pointing to a local repository that contains a collections folder with a .collection.yml file defining mcp.inputs and mcp.items referencing ${input:id} variables:

{
"promptregistry.sources": [{
"id": "test-local",
"name": "Test Local",
"url": "C:\path\to\your\repo",
"type": "local-awesome-copilot",
"config": { "collectionsPath": "collections" }
}]
}
4. Open the AI Primitives Hub marketplace, find the collection and install it
5. Install a second collection that shares an input with the same id
6. Uninstall the first collection

Tested On

  • macOS

  • Windows

  • Linux

  • VS Code Stable

  • VS Code Insiders

Screenshots

image image image image image

Checklist

  • My code follows the project's style guidelines
  • I have performed a self-review of my code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings or errors
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes
  • Any dependent changes have been merged and published

Documentation

  • README.md updated
  • JSDoc comments added/updated
  • No documentation changes needed

Additional Notes

Reviewer Guidelines

Please pay special attention to:


By submitting this pull request, I confirm that my contribution is made under the terms of the Apache License 2.0.

@lanzamelissa-sketch lanzamelissa-sketch changed the title feat: auto-generate mcp.json inputs from collection definition NO NOT MERGE feat: auto-generate mcp.json inputs from collection definition Jul 6, 2026
@lanzamelissa-sketch lanzamelissa-sketch force-pushed the feat/mcp-inputs-auto-generation branch from cc38f7a to 5636b6a Compare July 7, 2026 08:51
@mvgadagi

mvgadagi commented Jul 7, 2026

Copy link
Copy Markdown
Contributor

Thank you @lanzamelissa-sketch for the PR and proposal ❤️ , we are looking at this !!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Backlog

Development

Successfully merging this pull request may close these issues.

[Feature]: MCP - add support for inputs

2 participants