Skip to content

Official guidance of parsing stdio package to mcp.json #650

@formulahendry

Description

@formulahendry

I am working on MCP Registry support in GitHub Copilot for JetBrains IDEs.
We wonder whether there is an official guidance about how to parse stdio package to mcp.json?

Using Azure MCP Server as example. The package section would be like this:

// Pattern#1: no runtimeArguments
"packages": [
  {
    "registry_type": "npm",
    "registry_base_url": "https://registry.npmjs.org",
    "identifier": "@azure/mcp",
    "version": "0.6.0",
    "transport": {
      "type": "stdio"
    },
    "package_arguments": [
      {
        "type": "positional",
        "value": "server"
      },
      {
        "type": "positional",
        "value": "start"
      }
    ]
  }
]

The pasring result in mcp.json would be like below:

"azure/azure-mcp": {
  "type": "stdio",
  "command": "npx",
  "args": [
    "-y",
    "@azure/mcp@latest",
    "server",
    "start"
  ]
}

However, the usage of runtimeArguments is not quite clear.
Publisher may have different pattern for the MCP server.

runtime_arguments with -y:

// Pattern#2: partial runtimeArguments
"packages": [
  {
    "registry_type": "npm",
    "registry_base_url": "https://registry.npmjs.org",
    "identifier": "@azure/mcp",
    "version": "0.6.0",
    "transport": {
      "type": "stdio"
    },
    "runtime_arguments": [
      {
        "is_required": true,
        "format": "string",
        "value": "-y",
        "type": "positional",
        "name": "-y",
        "value_hint": "noninteractive_mode"
      }
    ],
    "package_arguments": [
      {
        "type": "positional",
        "value": "server"
      },
      {
        "type": "positional",
        "value": "start"
      }
    ]
  }
]

runtime_arguments with -y + package_name@version:

// Pattern#3: full runtimeArguments
"packages": [
  {
    "registry_type": "npm",
    "registry_base_url": "https://registry.npmjs.org",
    "identifier": "@azure/mcp",
    "version": "0.6.0",
    "transport": {
      "type": "stdio"
    },
    "runtime_arguments": [
      {
        "is_required": true,
        "format": "string",
        "value": "-y",
        "type": "positional",
        "name": "-y",
        "value_hint": "noninteractive_mode"
      },
      {
        "type": "positional",
        "value": "@azure/[email protected]"
      }
    ],
    "package_arguments": [
      {
        "type": "positional",
        "value": "server"
      },
      {
        "type": "positional",
        "value": "start"
      }
    ]
  }
]

For the above 3 patterns, which one or ones are recommended? WIth the clear pattern, we clients of MCP Registry could do the correct pasring.

In addtion, some stdio mcp server (especially oci) may have complicated arguments:

"github": {
    "command": "docker",
    "args": [
        "run",
        "-i",
        "--rm",
        "--port",
        "3001",
        "--name",
        "xyz",
        "-e",
        "GITHUB_PERSONAL_ACCESS_TOKEN",
        "ghcr.io/github/github-mcp-server"
    ]
}

How is the recommended package section in registry, and how is the parsing logic?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions