Skip to content

The filesystem server stopped working with the OpenAI Agent SDK. #3051

@buehler

Description

@buehler

Describe the bug
It has been working with an old version of the filesystem server. However, after upgrading the server, openAI (and also the model context protocol inspector) throw errors when trying to list the tools.

To Reproduce
Either:

  1. use npx -y @modelcontextprotocol/inspector npx @modelcontextprotocol/server-filesystem ./
  2. try to "list tools"
  3. get the following error:
[
  {
    "code": "invalid_literal",
    "expected": "object",
    "path": [
      "tools",
      0,
      "inputSchema",
      "type"
    ],
    "message": "Invalid literal value, expected \"object\""
  },
  {
    "code": "invalid_literal",
    "expected": "object",
    "path": [
      "tools",
      1,
      "inputSchema",
      "type"
    ],
    "message": "Invalid literal value, expected \"object\""
  },
  {
    "code": "invalid_literal",
    "expected": "object",
    "path": [
      "tools",
      2,
      "inputSchema",
      "type"
    ],
    "message": "Invalid literal value, expected \"object\""
  },
  {
    "code": "invalid_literal",
    "expected": "object",
    "path": [
      "tools",
      3,
      "inputSchema",
      "type"
    ],
    "message": "Invalid literal value, expected \"object\""
  },
  {
    "code": "invalid_literal",
    "expected": "object",
    "path": [
      "tools",
      4,
      "inputSchema",
      "type"
    ],
    "message": "Invalid literal value, expected \"object\""
  },
  {
    "code": "invalid_literal",
    "expected": "object",
    "path": [
      "tools",
      5,
      "inputSchema",
      "type"
    ],
    "message": "Invalid literal value, expected \"object\""
  },
  {
    "code": "invalid_literal",
    "expected": "object",
    "path": [
      "tools",
      6,
      "inputSchema",
      "type"
    ],
    "message": "Invalid literal value, expected \"object\""
  },
  {
    "code": "invalid_literal",
    "expected": "object",
    "path": [
      "tools",
      7,
      "inputSchema",
      "type"
    ],
    "message": "Invalid literal value, expected \"object\""
  },
  {
    "code": "invalid_literal",
    "expected": "object",
    "path": [
      "tools",
      8,
      "inputSchema",
      "type"
    ],
    "message": "Invalid literal value, expected \"object\""
  },
  {
    "code": "invalid_literal",
    "expected": "object",
    "path": [
      "tools",
      9,
      "inputSchema",
      "type"
    ],
    "message": "Invalid literal value, expected \"object\""
  },
  {
    "code": "invalid_literal",
    "expected": "object",
    "path": [
      "tools",
      10,
      "inputSchema",
      "type"
    ],
    "message": "Invalid literal value, expected \"object\""
  },
  {
    "code": "invalid_literal",
    "expected": "object",
    "path": [
      "tools",
      11,
      "inputSchema",
      "type"
    ],
    "message": "Invalid literal value, expected \"object\""
  },
  {
    "code": "invalid_literal",
    "expected": "object",
    "path": [
      "tools",
      12,
      "inputSchema",
      "type"
    ],
    "message": "Invalid literal value, expected \"object\""
  }
]

Or:

  1. use openai sdk to start the MCP server
  2. when trying to interact with it
  3. get the following error:
openai.BadRequestError: Error code: 400 - {'error': {'message': 'Invalid schema for function \'read_file\': schema must be a JSON Schema of \'type: "object"\', got \'type: "None"\'.', 'type': 'invalid_request_error', 'param': 'tools[0].parameters', 'code': 'invalid_function_parameters'}}

Expected behavior
The MCP server should work :)

Logs
Provided in the steps to reproduce

Additional context
Currently uses:
node 24
openai sdk 0.6.1
filesystem server latest

Metadata

Metadata

Assignees

Labels

bugSomething isn't workingserver-filesystemReference implementation for the Filesystem MCP server - src/filesystem

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions