Skip to content

Openai models 4 and above don't work with the current 0.24.0 version #1548

Description

@afmjoaa

For openai models remote mcp server is not working.

Getting the following error:
Error code: 400 - {'error': {'message': "Invalid schema for function 'get_me': In context=(), object schema missing properties.", 'type': 'invalid_request_error', 'param': 'tools[13].function.parameters', 'code': 'invalid_function_parameters'}}

previous issue: #376

The error "Invalid schema for function 'get_me'" indicates that the JSON schema provided for the function named 'get_me' does not conform to the expected format. This typically occurs when interacting with APIs, particularly those involving function calling or structured output, like OpenAI's API.

We are using the MCP server like following:
"github": {
"url": "https://api.githubcopilot.com/mcp/",
"transport": "streamable_http",
"headers": {"Authorization": f"Bearer {os.environ.get('GITHUB_PAT', '')}"},
},

Activity

  1. LevanArabuli commented on Dec 8, 2025

    @LevanArabuli

    +1, we're facing the same issue and had to disable Github MCP for some time before the issue gets resolved

  2. added a commit that references this issue on Dec 8, 2025
    289eb8c
  3. SamMorrowDrums commented on Dec 8, 2025

    @SamMorrowDrums
    Collaborator

    Hi @afmjoaa! 👋

    I've opened a fix for this issue in #1553. The problem is that the get_me tool's JSON schema was {"type": "object"} without a properties field, and OpenAI strict mode requires properties to be present even when empty.

    The fix ensures the schema is {"type":"object","properties":{}}.

    To test the fix:

    Unfortunately, Docker images aren't automatically built for PR branches. You can test by building from source:

    # Clone and checkout the fix branch
    git clone https://github.com/github/github-mcp-server.git
    cd github-mcp-server
    git checkout fix-openai-get-me-schema
    
    # Build the binary
    go build -v ./cmd/github-mcp-server
    
    # Run it
    ./github-mcp-server stdio

    Or if you're using Docker, build locally:

    git clone https://github.com/github/github-mcp-server.git
    cd github-mcp-server
    git checkout fix-openai-get-me-schema
    docker build -t github-mcp-server:fix-openai .

    Then use github-mcp-server:fix-openai as your image.

    Would you be able to test this and confirm if it resolves the issue for your OpenAI setup? Thanks!

    CC @LevanArabuli

  4. SamMorrowDrums commented on Dec 8, 2025

    @SamMorrowDrums
    Collaborator

    Root Cause Analysis

    The regression was introduced by the go-SDK migration (PR #1428). Here's the toolsnap comparison:

    Before go-SDK migration (commit ada4bc0)

    "inputSchema": {
      "properties": {},
      "type": "object"
    }

    Current main (after go-SDK migration)

    "inputSchema": {
      "type": "object"
    }

    With fix (PR #1553)

    "inputSchema": {
      "type": "object",
      "properties": {}
    }

    The jsonschema library used by the go-SDK has omitempty tags on struct fields, which causes empty maps like Properties to be omitted during JSON serialization. The fix uses json.RawMessage to explicitly include the properties field.

  5. added a commit that references this issue on Dec 8, 2025
    82c4930
  6. SamMorrowDrums commented on Dec 8, 2025

    @SamMorrowDrums
    Collaborator

    https://github.com/github/github-mcp-server/releases/tag/v0.24.1 the latest docker image is now released with the change. Updating the remote server shortly.

  7. SamMorrowDrums commented on Dec 8, 2025

    @SamMorrowDrums
    Collaborator

    Remote server now also fixed.

  8. LevanArabuli commented on Dec 8, 2025

    @LevanArabuli

    Thanks @SamMorrowDrums 🙏 ,
    I can confirm it works as expected now!

  9. praveenkumarlodhi979-tech commented on Dec 11, 2025

    @praveenkumarlodhi979-tech

    For openai models remote mcp server is not working.

    Getting the following error:
    Error code: 400 - {'error': {'message': "Invalid schema for function 'get_me': In context=(), object schema missing properties.", 'type': 'invalid_request_error', 'param': 'tools[13].function.parameters', 'code': 'invalid_function_parameters'}}

    previous issue: #376

    The error "Invalid schema for function 'get_me'" indicates that the JSON schema provided for the function named 'get_me' does not conform to the expected format. This typically occurs when interacting with APIs, particularly those involving function calling or structured output, like OpenAI's API.

    We are using the MCP server like following:
    "github": {
    "url": "https://api.githubcopilot.com/mcp/",
    "transport": "streamable_http",
    "headers": {"Authorization": f"Bearer {os.environ.get('GITHUB_PAT', '')}"},
    },

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions