Skip to content

[Nitro CLI] Add MCP commands#9040

Merged
glen-84 merged 15 commits intomainfrom
gai/nitro-cli-mcp
Feb 6, 2026
Merged

[Nitro CLI] Add MCP commands#9040
glen-84 merged 15 commits intomainfrom
gai/nitro-cli-mcp

Conversation

@glen-84
Copy link
Copy Markdown
Member

@glen-84 glen-84 commented Jan 12, 2026

Summary of the changes (Less than 80 chars)

  • [Nitro CLI] Add MCP commands.

@glen-84 glen-84 marked this pull request as ready for review February 5, 2026 10:57
Copilot AI review requested due to automatic review settings February 5, 2026 10:57
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR adds comprehensive MCP (Model Context Protocol) Feature Collection support to the Nitro CLI, following the same pattern as the existing OpenAPI collection commands.

Changes:

  • Added MCP command infrastructure with create, delete, list, upload, publish, and validate subcommands
  • Updated GraphQL schema with MCP-related types, mutations, and subscriptions
  • Added validation error handling and display logic for MCP feature collections

Reviewed changes

Copilot reviewed 29 out of 31 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
schema.graphql Added MCP types and updated existing types to support MCP validation errors
operations.json Added persisted GraphQL operations for all new MCP commands
fragments.graphql Added validation error fragments for MCP feature collections
ThrowHelper.cs Added error helper for MCP selection
JsonSourceGenerationContext.cs Added JSON serialization support for MCP types
Nitro.CommandLine.csproj Added project references for MCP adapters
ConsoleHelpers.cs Added error display logic for MCP validation errors
NitroCloudCommandExtensions.cs Registered new MCP command
Commands/Mcp/*.cs Implemented all MCP command handlers (create, delete, list, upload, publish, validate)
Commands/Mcp/Options/*.cs Defined command-line options for MCP commands
Commands/Mcp/Component/*.cs Created reusable components for MCP prompts and helpers

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread src/Nitro/CommandLine/src/CommandLine/Commands/Mcp/McpFeatureCollectionHelpers.cs Outdated
@glen-84 glen-84 marked this pull request as draft February 5, 2026 11:13
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 29 out of 31 changed files in this pull request and generated 8 comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread src/Nitro/CommandLine/src/CommandLine/Helpers/ConsoleHelpers.cs Outdated
Comment thread src/Nitro/CommandLine/src/CommandLine/Commands/Mcp/McpFeatureCollectionHelpers.cs Outdated
@glen-84 glen-84 marked this pull request as ready for review February 5, 2026 13:57
@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Feb 5, 2026

🚀 Fusion Gateway Performance Results

Simple Composite Query

Constant Load (50 VUs)

Requests/sec Error Rate
5825.60 req/s 0.00%
📊 Response Time Metrics
Min Med Max Avg P90 P95
0.82ms 7.15ms 164.40ms 8.43ms 12.96ms 18.77ms

Ramping Load (0→50→500→50 VUs)

Requests/sec Error Rate
4628.93 req/s 0.00%
📊 Response Time Metrics
Min Med Max Avg P90 P95
0.75ms 37.62ms 266.52ms 47.99ms 107.69ms 124.18ms

Executed Query

fragment User on User {
  id
  username
  name
}

fragment Review on Review {
  id
  body
}

fragment Product on Product {
  inStock
  name
  price
  shippingEstimate
  upc
  weight
}

query TestQuery {
  topProducts(first: 5) {
    ...Product
    reviews {
      ...Review
      author {
        ...User
      }
    }
  }
}

Deep Recursion Query

Constant Load (50 VUs)

Requests/sec Error Rate
270.68 req/s 0.00%
📊 Response Time Metrics
Min Med Max Avg P90 P95
12.51ms 173.83ms 575.79ms 179.12ms 225.32ms 248.62ms

Ramping Load (0→50→500→50 VUs)

Requests/sec Error Rate
306.25 req/s 0.00%
📊 Response Time Metrics
Min Med Max Avg P90 P95
3.12ms 672.57ms 1724.99ms 692.18ms 1381.65ms 1475.69ms

Executed Query

fragment User on User {
  id
  username
  name
}

fragment Review on Review {
  id
  body
}

fragment Product on Product {
  inStock
  name
  price
  shippingEstimate
  upc
  weight
}

query TestQuery {
  users {
    ...User
    reviews {
      ...Review
      product {
        ...Product
        reviews {
          ...Review
          author {
            ...User
            reviews {
              ...Review
              product {
                ...Product
              }
            }
          }
        }
      }
    }
  }
  topProducts(first: 5) {
    ...Product
    reviews {
      ...Review
      author {
        ...User
        reviews {
          ...Review
          product {
            ...Product
          }
        }
      }
    }
  }
}

Variable Batching Throughput

Constant Load (50 VUs)

Requests/sec Error Rate
23752.82 req/s 0.00%
📊 Response Time Metrics
Min Med Max Avg P90 P95
0.09ms 1.69ms 40.94ms 2.06ms 3.90ms 4.79ms

Ramping Load (0→50→500→50 VUs)

Requests/sec Error Rate
18820.08 req/s 0.00%
📊 Response Time Metrics
Min Med Max Avg P90 P95
0.09ms 9.11ms 110.48ms 11.20ms 23.26ms 28.01ms

Executed Query

query TestQuery_8f7a46ce_2(
  $__fusion_1_upc: ID!
  $__fusion_2_price: Long!
  $__fusion_2_weight: Long!
) {
  productByUpc(upc: $__fusion_1_upc) {
    inStock
    shippingEstimate(weight: $__fusion_2_weight, price: $__fusion_2_price)
  }
}

Variables (5 sets batched in single request)

[
  { "__fusion_1_upc": "1", "__fusion_2_price": 899, "__fusion_2_weight": 100 },
  { "__fusion_1_upc": "2", "__fusion_2_price": 1299, "__fusion_2_weight": 1000 },
  { "__fusion_1_upc": "3", "__fusion_2_price": 15, "__fusion_2_weight": 20 },
  { "__fusion_1_upc": "4", "__fusion_2_price": 499, "__fusion_2_weight": 100 },
  { "__fusion_1_upc": "5", "__fusion_2_price": 1299, "__fusion_2_weight": 1000 }
]

No baseline data available for comparison.


Run 21714276287 • Commit e4d44f2 • Thu, 05 Feb 2026 14:39:03 GMT

@glen-84 glen-84 merged commit 4548faf into main Feb 6, 2026
116 checks passed
@glen-84 glen-84 deleted the gai/nitro-cli-mcp branch February 6, 2026 09:48
@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Feb 6, 2026

🚀 Fusion Gateway Performance Results

Simple Composite Query

Constant Load (50 VUs)

Requests/sec Error Rate
5766.60 req/s 0.00%
📊 Response Time Metrics
Min Med Max Avg P90 P95
0.84ms 7.19ms 161.86ms 8.52ms 13.08ms 18.72ms

Ramping Load (0→50→500→50 VUs)

Requests/sec Error Rate
4606.95 req/s 0.00%
📊 Response Time Metrics
Min Med Max Avg P90 P95
0.80ms 39.78ms 240.87ms 48.13ms 105.55ms 123.68ms

Executed Query

fragment User on User {
  id
  username
  name
}

fragment Review on Review {
  id
  body
}

fragment Product on Product {
  inStock
  name
  price
  shippingEstimate
  upc
  weight
}

query TestQuery {
  topProducts(first: 5) {
    ...Product
    reviews {
      ...Review
      author {
        ...User
      }
    }
  }
}

Deep Recursion Query

Constant Load (50 VUs)

Requests/sec Error Rate
271.04 req/s 0.00%
📊 Response Time Metrics
Min Med Max Avg P90 P95
12.81ms 174.07ms 766.12ms 178.77ms 223.69ms 243.78ms

Ramping Load (0→50→500→50 VUs)

Requests/sec Error Rate
304.10 req/s 0.00%
📊 Response Time Metrics
Min Med Max Avg P90 P95
2.98ms 688.27ms 1715.63ms 695.69ms 1388.06ms 1501.01ms

Executed Query

fragment User on User {
  id
  username
  name
}

fragment Review on Review {
  id
  body
}

fragment Product on Product {
  inStock
  name
  price
  shippingEstimate
  upc
  weight
}

query TestQuery {
  users {
    ...User
    reviews {
      ...Review
      product {
        ...Product
        reviews {
          ...Review
          author {
            ...User
            reviews {
              ...Review
              product {
                ...Product
              }
            }
          }
        }
      }
    }
  }
  topProducts(first: 5) {
    ...Product
    reviews {
      ...Review
      author {
        ...User
        reviews {
          ...Review
          product {
            ...Product
          }
        }
      }
    }
  }
}

Variable Batching Throughput

Constant Load (50 VUs)

Requests/sec Error Rate
24086.27 req/s 0.00%
📊 Response Time Metrics
Min Med Max Avg P90 P95
0.09ms 1.67ms 40.40ms 2.03ms 3.86ms 4.73ms

Ramping Load (0→50→500→50 VUs)

Requests/sec Error Rate
18809.04 req/s 0.00%
📊 Response Time Metrics
Min Med Max Avg P90 P95
0.09ms 9.20ms 104.34ms 11.24ms 23.18ms 27.85ms

Executed Query

query TestQuery_8f7a46ce_2(
  $__fusion_1_upc: ID!
  $__fusion_2_price: Long!
  $__fusion_2_weight: Long!
) {
  productByUpc(upc: $__fusion_1_upc) {
    inStock
    shippingEstimate(weight: $__fusion_2_weight, price: $__fusion_2_price)
  }
}

Variables (5 sets batched in single request)

[
  { "__fusion_1_upc": "1", "__fusion_2_price": 899, "__fusion_2_weight": 100 },
  { "__fusion_1_upc": "2", "__fusion_2_price": 1299, "__fusion_2_weight": 1000 },
  { "__fusion_1_upc": "3", "__fusion_2_price": 15, "__fusion_2_weight": 20 },
  { "__fusion_1_upc": "4", "__fusion_2_price": 499, "__fusion_2_weight": 100 },
  { "__fusion_1_upc": "5", "__fusion_2_price": 1299, "__fusion_2_weight": 1000 }
]

No baseline data available for comparison.


Run 21745958263 • Commit 7ff93de • Fri, 06 Feb 2026 10:00:24 GMT

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants