# Directory Structure
```
├── build
│ └── index.js
├── node_modules
│ ├── .bin
│ │ ├── node-which
│ │ ├── tsc
│ │ └── tsserver
│ ├── .package-lock.json
│ ├── @modelcontextprotocol
│ │ └── sdk
│ │ ├── dist
│ │ │ ├── cjs
│ │ │ │ ├── cli.d.ts
│ │ │ │ ├── cli.d.ts.map
│ │ │ │ ├── cli.js
│ │ │ │ ├── cli.js.map
│ │ │ │ ├── client
│ │ │ │ │ ├── auth.d.ts
│ │ │ │ │ ├── auth.d.ts.map
│ │ │ │ │ ├── auth.js
│ │ │ │ │ ├── auth.js.map
│ │ │ │ │ ├── index.d.ts
│ │ │ │ │ ├── index.d.ts.map
│ │ │ │ │ ├── index.js
│ │ │ │ │ ├── index.js.map
│ │ │ │ │ ├── sse.d.ts
│ │ │ │ │ ├── sse.d.ts.map
│ │ │ │ │ ├── sse.js
│ │ │ │ │ ├── sse.js.map
│ │ │ │ │ ├── stdio.d.ts
│ │ │ │ │ ├── stdio.d.ts.map
│ │ │ │ │ ├── stdio.js
│ │ │ │ │ ├── stdio.js.map
│ │ │ │ │ ├── websocket.d.ts
│ │ │ │ │ ├── websocket.d.ts.map
│ │ │ │ │ ├── websocket.js
│ │ │ │ │ └── websocket.js.map
│ │ │ │ ├── inMemory.d.ts
│ │ │ │ ├── inMemory.d.ts.map
│ │ │ │ ├── inMemory.js
│ │ │ │ ├── inMemory.js.map
│ │ │ │ ├── package.json
│ │ │ │ ├── server
│ │ │ │ │ ├── auth
│ │ │ │ │ │ ├── clients.d.ts
│ │ │ │ │ │ ├── clients.d.ts.map
│ │ │ │ │ │ ├── clients.js
│ │ │ │ │ │ ├── clients.js.map
│ │ │ │ │ │ ├── errors.d.ts
│ │ │ │ │ │ ├── errors.d.ts.map
│ │ │ │ │ │ ├── errors.js
│ │ │ │ │ │ ├── errors.js.map
│ │ │ │ │ │ ├── handlers
│ │ │ │ │ │ │ ├── authorize.d.ts
│ │ │ │ │ │ │ ├── authorize.d.ts.map
│ │ │ │ │ │ │ ├── authorize.js
│ │ │ │ │ │ │ ├── authorize.js.map
│ │ │ │ │ │ │ ├── metadata.d.ts
│ │ │ │ │ │ │ ├── metadata.d.ts.map
│ │ │ │ │ │ │ ├── metadata.js
│ │ │ │ │ │ │ ├── metadata.js.map
│ │ │ │ │ │ │ ├── register.d.ts
│ │ │ │ │ │ │ ├── register.d.ts.map
│ │ │ │ │ │ │ ├── register.js
│ │ │ │ │ │ │ ├── register.js.map
│ │ │ │ │ │ │ ├── revoke.d.ts
│ │ │ │ │ │ │ ├── revoke.d.ts.map
│ │ │ │ │ │ │ ├── revoke.js
│ │ │ │ │ │ │ ├── revoke.js.map
│ │ │ │ │ │ │ ├── token.d.ts
│ │ │ │ │ │ │ ├── token.d.ts.map
│ │ │ │ │ │ │ ├── token.js
│ │ │ │ │ │ │ └── token.js.map
│ │ │ │ │ │ ├── middleware
│ │ │ │ │ │ │ ├── allowedMethods.d.ts
│ │ │ │ │ │ │ ├── allowedMethods.d.ts.map
│ │ │ │ │ │ │ ├── allowedMethods.js
│ │ │ │ │ │ │ ├── allowedMethods.js.map
│ │ │ │ │ │ │ ├── bearerAuth.d.ts
│ │ │ │ │ │ │ ├── bearerAuth.d.ts.map
│ │ │ │ │ │ │ ├── bearerAuth.js
│ │ │ │ │ │ │ ├── bearerAuth.js.map
│ │ │ │ │ │ │ ├── clientAuth.d.ts
│ │ │ │ │ │ │ ├── clientAuth.d.ts.map
│ │ │ │ │ │ │ ├── clientAuth.js
│ │ │ │ │ │ │ └── clientAuth.js.map
│ │ │ │ │ │ ├── provider.d.ts
│ │ │ │ │ │ ├── provider.d.ts.map
│ │ │ │ │ │ ├── provider.js
│ │ │ │ │ │ ├── provider.js.map
│ │ │ │ │ │ ├── router.d.ts
│ │ │ │ │ │ ├── router.d.ts.map
│ │ │ │ │ │ ├── router.js
│ │ │ │ │ │ ├── router.js.map
│ │ │ │ │ │ ├── types.d.ts
│ │ │ │ │ │ ├── types.d.ts.map
│ │ │ │ │ │ ├── types.js
│ │ │ │ │ │ └── types.js.map
│ │ │ │ │ ├── completable.d.ts
│ │ │ │ │ ├── completable.d.ts.map
│ │ │ │ │ ├── completable.js
│ │ │ │ │ ├── completable.js.map
│ │ │ │ │ ├── index.d.ts
│ │ │ │ │ ├── index.d.ts.map
│ │ │ │ │ ├── index.js
│ │ │ │ │ ├── index.js.map
│ │ │ │ │ ├── mcp.d.ts
│ │ │ │ │ ├── mcp.d.ts.map
│ │ │ │ │ ├── mcp.js
│ │ │ │ │ ├── mcp.js.map
│ │ │ │ │ ├── sse.d.ts
│ │ │ │ │ ├── sse.d.ts.map
│ │ │ │ │ ├── sse.js
│ │ │ │ │ ├── sse.js.map
│ │ │ │ │ ├── stdio.d.ts
│ │ │ │ │ ├── stdio.d.ts.map
│ │ │ │ │ ├── stdio.js
│ │ │ │ │ └── stdio.js.map
│ │ │ │ ├── shared
│ │ │ │ │ ├── auth.d.ts
│ │ │ │ │ ├── auth.d.ts.map
│ │ │ │ │ ├── auth.js
│ │ │ │ │ ├── auth.js.map
│ │ │ │ │ ├── protocol.d.ts
│ │ │ │ │ ├── protocol.d.ts.map
│ │ │ │ │ ├── protocol.js
│ │ │ │ │ ├── protocol.js.map
│ │ │ │ │ ├── stdio.d.ts
│ │ │ │ │ ├── stdio.d.ts.map
│ │ │ │ │ ├── stdio.js
│ │ │ │ │ ├── stdio.js.map
│ │ │ │ │ ├── transport.d.ts
│ │ │ │ │ ├── transport.d.ts.map
│ │ │ │ │ ├── transport.js
│ │ │ │ │ ├── transport.js.map
│ │ │ │ │ ├── uriTemplate.d.ts
│ │ │ │ │ ├── uriTemplate.d.ts.map
│ │ │ │ │ ├── uriTemplate.js
│ │ │ │ │ └── uriTemplate.js.map
│ │ │ │ ├── types.d.ts
│ │ │ │ ├── types.d.ts.map
│ │ │ │ ├── types.js
│ │ │ │ └── types.js.map
│ │ │ └── esm
│ │ │ ├── cli.d.ts
│ │ │ ├── cli.d.ts.map
│ │ │ ├── cli.js
│ │ │ ├── cli.js.map
│ │ │ ├── client
│ │ │ │ ├── auth.d.ts
│ │ │ │ ├── auth.d.ts.map
│ │ │ │ ├── auth.js
│ │ │ │ ├── auth.js.map
│ │ │ │ ├── index.d.ts
│ │ │ │ ├── index.d.ts.map
│ │ │ │ ├── index.js
│ │ │ │ ├── index.js.map
│ │ │ │ ├── sse.d.ts
│ │ │ │ ├── sse.d.ts.map
│ │ │ │ ├── sse.js
│ │ │ │ ├── sse.js.map
│ │ │ │ ├── stdio.d.ts
│ │ │ │ ├── stdio.d.ts.map
│ │ │ │ ├── stdio.js
│ │ │ │ ├── stdio.js.map
│ │ │ │ ├── websocket.d.ts
│ │ │ │ ├── websocket.d.ts.map
│ │ │ │ ├── websocket.js
│ │ │ │ └── websocket.js.map
│ │ │ ├── inMemory.d.ts
│ │ │ ├── inMemory.d.ts.map
│ │ │ ├── inMemory.js
│ │ │ ├── inMemory.js.map
│ │ │ ├── package.json
│ │ │ ├── server
│ │ │ │ ├── auth
│ │ │ │ │ ├── clients.d.ts
│ │ │ │ │ ├── clients.d.ts.map
│ │ │ │ │ ├── clients.js
│ │ │ │ │ ├── clients.js.map
│ │ │ │ │ ├── errors.d.ts
│ │ │ │ │ ├── errors.d.ts.map
│ │ │ │ │ ├── errors.js
│ │ │ │ │ ├── errors.js.map
│ │ │ │ │ ├── handlers
│ │ │ │ │ │ ├── authorize.d.ts
│ │ │ │ │ │ ├── authorize.d.ts.map
│ │ │ │ │ │ ├── authorize.js
│ │ │ │ │ │ ├── authorize.js.map
│ │ │ │ │ │ ├── metadata.d.ts
│ │ │ │ │ │ ├── metadata.d.ts.map
│ │ │ │ │ │ ├── metadata.js
│ │ │ │ │ │ ├── metadata.js.map
│ │ │ │ │ │ ├── register.d.ts
│ │ │ │ │ │ ├── register.d.ts.map
│ │ │ │ │ │ ├── register.js
│ │ │ │ │ │ ├── register.js.map
│ │ │ │ │ │ ├── revoke.d.ts
│ │ │ │ │ │ ├── revoke.d.ts.map
│ │ │ │ │ │ ├── revoke.js
│ │ │ │ │ │ ├── revoke.js.map
│ │ │ │ │ │ ├── token.d.ts
│ │ │ │ │ │ ├── token.d.ts.map
│ │ │ │ │ │ ├── token.js
│ │ │ │ │ │ └── token.js.map
│ │ │ │ │ ├── middleware
│ │ │ │ │ │ ├── allowedMethods.d.ts
│ │ │ │ │ │ ├── allowedMethods.d.ts.map
│ │ │ │ │ │ ├── allowedMethods.js
│ │ │ │ │ │ ├── allowedMethods.js.map
│ │ │ │ │ │ ├── bearerAuth.d.ts
│ │ │ │ │ │ ├── bearerAuth.d.ts.map
│ │ │ │ │ │ ├── bearerAuth.js
│ │ │ │ │ │ ├── bearerAuth.js.map
│ │ │ │ │ │ ├── clientAuth.d.ts
│ │ │ │ │ │ ├── clientAuth.d.ts.map
│ │ │ │ │ │ ├── clientAuth.js
│ │ │ │ │ │ └── clientAuth.js.map
│ │ │ │ │ ├── provider.d.ts
│ │ │ │ │ ├── provider.d.ts.map
│ │ │ │ │ ├── provider.js
│ │ │ │ │ ├── provider.js.map
│ │ │ │ │ ├── router.d.ts
│ │ │ │ │ ├── router.d.ts.map
│ │ │ │ │ ├── router.js
│ │ │ │ │ ├── router.js.map
│ │ │ │ │ ├── types.d.ts
│ │ │ │ │ ├── types.d.ts.map
│ │ │ │ │ ├── types.js
│ │ │ │ │ └── types.js.map
│ │ │ │ ├── completable.d.ts
│ │ │ │ ├── completable.d.ts.map
│ │ │ │ ├── completable.js
│ │ │ │ ├── completable.js.map
│ │ │ │ ├── index.d.ts
│ │ │ │ ├── index.d.ts.map
│ │ │ │ ├── index.js
│ │ │ │ ├── index.js.map
│ │ │ │ ├── mcp.d.ts
│ │ │ │ ├── mcp.d.ts.map
│ │ │ │ ├── mcp.js
│ │ │ │ ├── mcp.js.map
│ │ │ │ ├── sse.d.ts
│ │ │ │ ├── sse.d.ts.map
│ │ │ │ ├── sse.js
│ │ │ │ ├── sse.js.map
│ │ │ │ ├── stdio.d.ts
│ │ │ │ ├── stdio.d.ts.map
│ │ │ │ ├── stdio.js
│ │ │ │ └── stdio.js.map
│ │ │ ├── shared
│ │ │ │ ├── auth.d.ts
│ │ │ │ ├── auth.d.ts.map
│ │ │ │ ├── auth.js
│ │ │ │ ├── auth.js.map
│ │ │ │ ├── protocol.d.ts
│ │ │ │ ├── protocol.d.ts.map
│ │ │ │ ├── protocol.js
│ │ │ │ ├── protocol.js.map
│ │ │ │ ├── stdio.d.ts
│ │ │ │ ├── stdio.d.ts.map
│ │ │ │ ├── stdio.js
│ │ │ │ ├── stdio.js.map
│ │ │ │ ├── transport.d.ts
│ │ │ │ ├── transport.d.ts.map
│ │ │ │ ├── transport.js
│ │ │ │ ├── transport.js.map
│ │ │ │ ├── uriTemplate.d.ts
│ │ │ │ ├── uriTemplate.d.ts.map
│ │ │ │ ├── uriTemplate.js
│ │ │ │ └── uriTemplate.js.map
│ │ │ ├── types.d.ts
│ │ │ ├── types.d.ts.map
│ │ │ ├── types.js
│ │ │ └── types.js.map
│ │ ├── LICENSE
│ │ ├── package.json
│ │ └── README.md
│ ├── @types
│ │ └── node
│ │ ├── assert
│ │ │ └── strict.d.ts
│ │ ├── assert.d.ts
│ │ ├── async_hooks.d.ts
│ │ ├── buffer.buffer.d.ts
│ │ ├── buffer.d.ts
│ │ ├── child_process.d.ts
│ │ ├── cluster.d.ts
│ │ ├── compatibility
│ │ │ ├── disposable.d.ts
│ │ │ ├── index.d.ts
│ │ │ ├── indexable.d.ts
│ │ │ └── iterators.d.ts
│ │ ├── console.d.ts
│ │ ├── constants.d.ts
│ │ ├── crypto.d.ts
│ │ ├── dgram.d.ts
│ │ ├── diagnostics_channel.d.ts
│ │ ├── dns
│ │ │ └── promises.d.ts
│ │ ├── dns.d.ts
│ │ ├── dom-events.d.ts
│ │ ├── domain.d.ts
│ │ ├── events.d.ts
│ │ ├── fs
│ │ │ └── promises.d.ts
│ │ ├── fs.d.ts
│ │ ├── globals.d.ts
│ │ ├── globals.typedarray.d.ts
│ │ ├── http.d.ts
│ │ ├── http2.d.ts
│ │ ├── https.d.ts
│ │ ├── index.d.ts
│ │ ├── inspector.d.ts
│ │ ├── LICENSE
│ │ ├── module.d.ts
│ │ ├── net.d.ts
│ │ ├── os.d.ts
│ │ ├── package.json
│ │ ├── path.d.ts
│ │ ├── perf_hooks.d.ts
│ │ ├── process.d.ts
│ │ ├── punycode.d.ts
│ │ ├── querystring.d.ts
│ │ ├── readline
│ │ │ └── promises.d.ts
│ │ ├── readline.d.ts
│ │ ├── README.md
│ │ ├── repl.d.ts
│ │ ├── sea.d.ts
│ │ ├── sqlite.d.ts
│ │ ├── stream
│ │ │ ├── consumers.d.ts
│ │ │ ├── promises.d.ts
│ │ │ └── web.d.ts
│ │ ├── stream.d.ts
│ │ ├── string_decoder.d.ts
│ │ ├── test.d.ts
│ │ ├── timers
│ │ │ └── promises.d.ts
│ │ ├── timers.d.ts
│ │ ├── tls.d.ts
│ │ ├── trace_events.d.ts
│ │ ├── ts5.6
│ │ │ ├── buffer.buffer.d.ts
│ │ │ ├── globals.typedarray.d.ts
│ │ │ └── index.d.ts
│ │ ├── tty.d.ts
│ │ ├── url.d.ts
│ │ ├── util.d.ts
│ │ ├── v8.d.ts
│ │ ├── vm.d.ts
│ │ ├── wasi.d.ts
│ │ ├── worker_threads.d.ts
│ │ └── zlib.d.ts
│ ├── accepts
│ │ ├── HISTORY.md
│ │ ├── index.js
│ │ ├── LICENSE
│ │ ├── package.json
│ │ └── README.md
│ ├── aws-ssl-profiles
│ │ ├── lib
│ │ │ ├── @types
│ │ │ │ ├── profiles.d.ts
│ │ │ │ └── profiles.js
│ │ │ ├── index.d.ts
│ │ │ ├── index.js
│ │ │ └── profiles
│ │ │ └── ca
│ │ │ ├── defaults.d.ts
│ │ │ ├── defaults.js
│ │ │ ├── proxies.d.ts
│ │ │ └── proxies.js
│ │ ├── LICENSE
│ │ ├── package.json
│ │ └── README.md
│ ├── body-parser
│ │ ├── HISTORY.md
│ │ ├── index.js
│ │ ├── lib
│ │ │ ├── read.js
│ │ │ ├── types
│ │ │ │ ├── json.js
│ │ │ │ ├── raw.js
│ │ │ │ ├── text.js
│ │ │ │ └── urlencoded.js
│ │ │ └── utils.js
│ │ ├── LICENSE
│ │ ├── package.json
│ │ └── README.md
│ ├── bytes
│ │ ├── History.md
│ │ ├── index.js
│ │ ├── LICENSE
│ │ ├── package.json
│ │ └── Readme.md
│ ├── call-bind-apply-helpers
│ │ ├── .eslintrc
│ │ ├── .github
│ │ │ └── FUNDING.yml
│ │ ├── .nycrc
│ │ ├── actualApply.d.ts
│ │ ├── actualApply.js
│ │ ├── applyBind.d.ts
│ │ ├── applyBind.js
│ │ ├── CHANGELOG.md
│ │ ├── functionApply.d.ts
│ │ ├── functionApply.js
│ │ ├── functionCall.d.ts
│ │ ├── functionCall.js
│ │ ├── index.d.ts
│ │ ├── index.js
│ │ ├── LICENSE
│ │ ├── package.json
│ │ ├── README.md
│ │ ├── reflectApply.d.ts
│ │ ├── reflectApply.js
│ │ ├── test
│ │ │ └── index.js
│ │ └── tsconfig.json
│ ├── call-bound
│ │ ├── .eslintrc
│ │ ├── .github
│ │ │ └── FUNDING.yml
│ │ ├── .nycrc
│ │ ├── CHANGELOG.md
│ │ ├── index.d.ts
│ │ ├── index.js
│ │ ├── LICENSE
│ │ ├── package.json
│ │ ├── README.md
│ │ ├── test
│ │ │ └── index.js
│ │ └── tsconfig.json
│ ├── content-disposition
│ │ ├── HISTORY.md
│ │ ├── index.js
│ │ ├── LICENSE
│ │ ├── package.json
│ │ └── README.md
│ ├── content-type
│ │ ├── HISTORY.md
│ │ ├── index.js
│ │ ├── LICENSE
│ │ ├── package.json
│ │ └── README.md
│ ├── cookie
│ │ ├── index.js
│ │ ├── LICENSE
│ │ ├── package.json
│ │ ├── README.md
│ │ └── SECURITY.md
│ ├── cookie-signature
│ │ ├── History.md
│ │ ├── index.js
│ │ ├── LICENSE
│ │ ├── package.json
│ │ └── Readme.md
│ ├── cors
│ │ ├── CONTRIBUTING.md
│ │ ├── HISTORY.md
│ │ ├── lib
│ │ │ └── index.js
│ │ ├── LICENSE
│ │ ├── package.json
│ │ └── README.md
│ ├── cross-spawn
│ │ ├── index.js
│ │ ├── lib
│ │ │ ├── enoent.js
│ │ │ ├── parse.js
│ │ │ └── util
│ │ │ ├── escape.js
│ │ │ ├── readShebang.js
│ │ │ └── resolveCommand.js
│ │ ├── LICENSE
│ │ ├── package.json
│ │ └── README.md
│ ├── debug
│ │ ├── LICENSE
│ │ ├── package.json
│ │ ├── README.md
│ │ └── src
│ │ ├── browser.js
│ │ ├── common.js
│ │ ├── index.js
│ │ └── node.js
│ ├── denque
│ │ ├── CHANGELOG.md
│ │ ├── index.d.ts
│ │ ├── index.js
│ │ ├── LICENSE
│ │ ├── package.json
│ │ └── README.md
│ ├── depd
│ │ ├── History.md
│ │ ├── index.js
│ │ ├── lib
│ │ │ └── browser
│ │ │ └── index.js
│ │ ├── LICENSE
│ │ ├── package.json
│ │ └── Readme.md
│ ├── dunder-proto
│ │ ├── .eslintrc
│ │ ├── .github
│ │ │ └── FUNDING.yml
│ │ ├── .nycrc
│ │ ├── CHANGELOG.md
│ │ ├── get.d.ts
│ │ ├── get.js
│ │ ├── LICENSE
│ │ ├── package.json
│ │ ├── README.md
│ │ ├── set.d.ts
│ │ ├── set.js
│ │ ├── test
│ │ │ ├── get.js
│ │ │ ├── index.js
│ │ │ └── set.js
│ │ └── tsconfig.json
│ ├── ee-first
│ │ ├── index.js
│ │ ├── LICENSE
│ │ ├── package.json
│ │ └── README.md
│ ├── encodeurl
│ │ ├── index.js
│ │ ├── LICENSE
│ │ ├── package.json
│ │ └── README.md
│ ├── es-define-property
│ │ ├── .eslintrc
│ │ ├── .github
│ │ │ └── FUNDING.yml
│ │ ├── .nycrc
│ │ ├── CHANGELOG.md
│ │ ├── index.d.ts
│ │ ├── index.js
│ │ ├── LICENSE
│ │ ├── package.json
│ │ ├── README.md
│ │ ├── test
│ │ │ └── index.js
│ │ └── tsconfig.json
│ ├── es-errors
│ │ ├── .eslintrc
│ │ ├── .github
│ │ │ └── FUNDING.yml
│ │ ├── CHANGELOG.md
│ │ ├── eval.d.ts
│ │ ├── eval.js
│ │ ├── index.d.ts
│ │ ├── index.js
│ │ ├── LICENSE
│ │ ├── package.json
│ │ ├── range.d.ts
│ │ ├── range.js
│ │ ├── README.md
│ │ ├── ref.d.ts
│ │ ├── ref.js
│ │ ├── syntax.d.ts
│ │ ├── syntax.js
│ │ ├── test
│ │ │ └── index.js
│ │ ├── tsconfig.json
│ │ ├── type.d.ts
│ │ ├── type.js
│ │ ├── uri.d.ts
│ │ └── uri.js
│ ├── es-object-atoms
│ │ ├── .eslintrc
│ │ ├── .github
│ │ │ └── FUNDING.yml
│ │ ├── CHANGELOG.md
│ │ ├── index.d.ts
│ │ ├── index.js
│ │ ├── isObject.d.ts
│ │ ├── isObject.js
│ │ ├── LICENSE
│ │ ├── package.json
│ │ ├── README.md
│ │ ├── RequireObjectCoercible.d.ts
│ │ ├── RequireObjectCoercible.js
│ │ ├── test
│ │ │ └── index.js
│ │ ├── ToObject.d.ts
│ │ ├── ToObject.js
│ │ └── tsconfig.json
│ ├── escape-html
│ │ ├── index.js
│ │ ├── LICENSE
│ │ ├── package.json
│ │ └── Readme.md
│ ├── etag
│ │ ├── HISTORY.md
│ │ ├── index.js
│ │ ├── LICENSE
│ │ ├── package.json
│ │ └── README.md
│ ├── eventsource
│ │ ├── dist
│ │ │ ├── index.cjs
│ │ │ ├── index.cjs.map
│ │ │ ├── index.d.cts
│ │ │ ├── index.d.ts
│ │ │ ├── index.js
│ │ │ └── index.js.map
│ │ ├── LICENSE
│ │ ├── package.json
│ │ ├── README.md
│ │ └── src
│ │ ├── errors.ts
│ │ ├── EventSource.ts
│ │ ├── index.ts
│ │ └── types.ts
│ ├── eventsource-parser
│ │ ├── dist
│ │ │ ├── index.cjs
│ │ │ ├── index.cjs.map
│ │ │ ├── index.d.cts
│ │ │ ├── index.d.ts
│ │ │ ├── index.esm.js
│ │ │ ├── index.esm.js.map
│ │ │ ├── index.js
│ │ │ ├── index.js.map
│ │ │ ├── stats.html
│ │ │ ├── stream.cjs
│ │ │ ├── stream.cjs.map
│ │ │ ├── stream.d.cts
│ │ │ ├── stream.d.ts
│ │ │ ├── stream.esm.js
│ │ │ ├── stream.esm.js.map
│ │ │ ├── stream.js
│ │ │ └── stream.js.map
│ │ ├── LICENSE
│ │ ├── package.json
│ │ ├── README.md
│ │ ├── src
│ │ │ ├── errors.ts
│ │ │ ├── index.ts
│ │ │ ├── parse.ts
│ │ │ ├── stream.ts
│ │ │ └── types.ts
│ │ └── stream.js
│ ├── express
│ │ ├── History.md
│ │ ├── index.js
│ │ ├── lib
│ │ │ ├── application.js
│ │ │ ├── express.js
│ │ │ ├── request.js
│ │ │ ├── response.js
│ │ │ ├── utils.js
│ │ │ └── view.js
│ │ ├── LICENSE
│ │ ├── package.json
│ │ └── Readme.md
│ ├── express-rate-limit
│ │ ├── dist
│ │ │ ├── index.cjs
│ │ │ ├── index.d.cts
│ │ │ ├── index.d.mts
│ │ │ ├── index.d.ts
│ │ │ └── index.mjs
│ │ ├── license.md
│ │ ├── package.json
│ │ ├── readme.md
│ │ └── tsconfig.json
│ ├── finalhandler
│ │ ├── HISTORY.md
│ │ ├── index.js
│ │ ├── LICENSE
│ │ ├── package.json
│ │ └── README.md
│ ├── forwarded
│ │ ├── HISTORY.md
│ │ ├── index.js
│ │ ├── LICENSE
│ │ ├── package.json
│ │ └── README.md
│ ├── fresh
│ │ ├── HISTORY.md
│ │ ├── index.js
│ │ ├── LICENSE
│ │ ├── package.json
│ │ └── README.md
│ ├── function-bind
│ │ ├── .eslintrc
│ │ ├── .github
│ │ │ ├── FUNDING.yml
│ │ │ └── SECURITY.md
│ │ ├── .nycrc
│ │ ├── CHANGELOG.md
│ │ ├── implementation.js
│ │ ├── index.js
│ │ ├── LICENSE
│ │ ├── package.json
│ │ ├── README.md
│ │ └── test
│ │ ├── .eslintrc
│ │ └── index.js
│ ├── generate-function
│ │ ├── .travis.yml
│ │ ├── example.js
│ │ ├── index.js
│ │ ├── LICENSE
│ │ ├── package.json
│ │ ├── README.md
│ │ └── test.js
│ ├── get-intrinsic
│ │ ├── .eslintrc
│ │ ├── .github
│ │ │ └── FUNDING.yml
│ │ ├── .nycrc
│ │ ├── CHANGELOG.md
│ │ ├── index.js
│ │ ├── LICENSE
│ │ ├── package.json
│ │ ├── README.md
│ │ └── test
│ │ └── GetIntrinsic.js
│ ├── get-proto
│ │ ├── .eslintrc
│ │ ├── .github
│ │ │ └── FUNDING.yml
│ │ ├── .nycrc
│ │ ├── CHANGELOG.md
│ │ ├── index.d.ts
│ │ ├── index.js
│ │ ├── LICENSE
│ │ ├── Object.getPrototypeOf.d.ts
│ │ ├── Object.getPrototypeOf.js
│ │ ├── package.json
│ │ ├── README.md
│ │ ├── Reflect.getPrototypeOf.d.ts
│ │ ├── Reflect.getPrototypeOf.js
│ │ ├── test
│ │ │ └── index.js
│ │ └── tsconfig.json
│ ├── gopd
│ │ ├── .eslintrc
│ │ ├── .github
│ │ │ └── FUNDING.yml
│ │ ├── CHANGELOG.md
│ │ ├── gOPD.d.ts
│ │ ├── gOPD.js
│ │ ├── index.d.ts
│ │ ├── index.js
│ │ ├── LICENSE
│ │ ├── package.json
│ │ ├── README.md
│ │ ├── test
│ │ │ └── index.js
│ │ └── tsconfig.json
│ ├── has-symbols
│ │ ├── .eslintrc
│ │ ├── .github
│ │ │ └── FUNDING.yml
│ │ ├── .nycrc
│ │ ├── CHANGELOG.md
│ │ ├── index.d.ts
│ │ ├── index.js
│ │ ├── LICENSE
│ │ ├── package.json
│ │ ├── README.md
│ │ ├── shams.d.ts
│ │ ├── shams.js
│ │ ├── test
│ │ │ ├── index.js
│ │ │ ├── shams
│ │ │ │ ├── core-js.js
│ │ │ │ └── get-own-property-symbols.js
│ │ │ └── tests.js
│ │ └── tsconfig.json
│ ├── hasown
│ │ ├── .eslintrc
│ │ ├── .github
│ │ │ └── FUNDING.yml
│ │ ├── .nycrc
│ │ ├── CHANGELOG.md
│ │ ├── index.d.ts
│ │ ├── index.js
│ │ ├── LICENSE
│ │ ├── package.json
│ │ ├── README.md
│ │ └── tsconfig.json
│ ├── http-errors
│ │ ├── HISTORY.md
│ │ ├── index.js
│ │ ├── LICENSE
│ │ ├── package.json
│ │ └── README.md
│ ├── iconv-lite
│ │ ├── .github
│ │ │ └── dependabot.yml
│ │ ├── .idea
│ │ │ ├── codeStyles
│ │ │ │ ├── codeStyleConfig.xml
│ │ │ │ └── Project.xml
│ │ │ ├── iconv-lite.iml
│ │ │ ├── inspectionProfiles
│ │ │ │ └── Project_Default.xml
│ │ │ ├── modules.xml
│ │ │ └── vcs.xml
│ │ ├── Changelog.md
│ │ ├── encodings
│ │ │ ├── dbcs-codec.js
│ │ │ ├── dbcs-data.js
│ │ │ ├── index.js
│ │ │ ├── internal.js
│ │ │ ├── sbcs-codec.js
│ │ │ ├── sbcs-data-generated.js
│ │ │ ├── sbcs-data.js
│ │ │ ├── tables
│ │ │ │ ├── big5-added.json
│ │ │ │ ├── cp936.json
│ │ │ │ ├── cp949.json
│ │ │ │ ├── cp950.json
│ │ │ │ ├── eucjp.json
│ │ │ │ ├── gb18030-ranges.json
│ │ │ │ ├── gbk-added.json
│ │ │ │ └── shiftjis.json
│ │ │ ├── utf16.js
│ │ │ ├── utf32.js
│ │ │ └── utf7.js
│ │ ├── lib
│ │ │ ├── bom-handling.js
│ │ │ ├── index.d.ts
│ │ │ ├── index.js
│ │ │ └── streams.js
│ │ ├── LICENSE
│ │ ├── package.json
│ │ └── README.md
│ ├── inherits
│ │ ├── inherits_browser.js
│ │ ├── inherits.js
│ │ ├── LICENSE
│ │ ├── package.json
│ │ └── README.md
│ ├── ipaddr.js
│ │ ├── ipaddr.min.js
│ │ ├── lib
│ │ │ ├── ipaddr.js
│ │ │ └── ipaddr.js.d.ts
│ │ ├── LICENSE
│ │ ├── package.json
│ │ └── README.md
│ ├── is-promise
│ │ ├── index.d.ts
│ │ ├── index.js
│ │ ├── index.mjs
│ │ ├── LICENSE
│ │ ├── package.json
│ │ └── readme.md
│ ├── is-property
│ │ ├── .npmignore
│ │ ├── is-property.js
│ │ ├── LICENSE
│ │ ├── package.json
│ │ └── README.md
│ ├── isexe
│ │ ├── .npmignore
│ │ ├── index.js
│ │ ├── LICENSE
│ │ ├── mode.js
│ │ ├── package.json
│ │ ├── README.md
│ │ ├── test
│ │ │ └── basic.js
│ │ └── windows.js
│ ├── long
│ │ ├── index.d.ts
│ │ ├── index.js
│ │ ├── LICENSE
│ │ ├── package.json
│ │ ├── README.md
│ │ ├── types.d.ts
│ │ └── umd
│ │ ├── index.d.ts
│ │ ├── index.js
│ │ ├── package.json
│ │ └── types.d.ts
│ ├── lru-cache
│ │ ├── index.d.ts
│ │ ├── index.js
│ │ ├── index.mjs
│ │ ├── LICENSE
│ │ ├── package.json
│ │ └── README.md
│ ├── lru.min
│ │ ├── browser
│ │ │ └── lru.min.js
│ │ ├── lib
│ │ │ ├── index.d.ts
│ │ │ ├── index.js
│ │ │ └── index.mjs
│ │ ├── LICENSE
│ │ ├── package.json
│ │ └── README.md
│ ├── math-intrinsics
│ │ ├── .eslintrc
│ │ ├── .github
│ │ │ └── FUNDING.yml
│ │ ├── abs.d.ts
│ │ ├── abs.js
│ │ ├── CHANGELOG.md
│ │ ├── constants
│ │ │ ├── maxArrayLength.d.ts
│ │ │ ├── maxArrayLength.js
│ │ │ ├── maxSafeInteger.d.ts
│ │ │ ├── maxSafeInteger.js
│ │ │ ├── maxValue.d.ts
│ │ │ └── maxValue.js
│ │ ├── floor.d.ts
│ │ ├── floor.js
│ │ ├── isFinite.d.ts
│ │ ├── isFinite.js
│ │ ├── isInteger.d.ts
│ │ ├── isInteger.js
│ │ ├── isNaN.d.ts
│ │ ├── isNaN.js
│ │ ├── isNegativeZero.d.ts
│ │ ├── isNegativeZero.js
│ │ ├── LICENSE
│ │ ├── max.d.ts
│ │ ├── max.js
│ │ ├── min.d.ts
│ │ ├── min.js
│ │ ├── mod.d.ts
│ │ ├── mod.js
│ │ ├── package.json
│ │ ├── pow.d.ts
│ │ ├── pow.js
│ │ ├── README.md
│ │ ├── round.d.ts
│ │ ├── round.js
│ │ ├── sign.d.ts
│ │ ├── sign.js
│ │ ├── test
│ │ │ └── index.js
│ │ └── tsconfig.json
│ ├── media-typer
│ │ ├── HISTORY.md
│ │ ├── index.js
│ │ ├── LICENSE
│ │ ├── package.json
│ │ └── README.md
│ ├── merge-descriptors
│ │ ├── index.d.ts
│ │ ├── index.js
│ │ ├── license
│ │ ├── package.json
│ │ └── readme.md
│ ├── mime-db
│ │ ├── db.json
│ │ ├── HISTORY.md
│ │ ├── index.js
│ │ ├── LICENSE
│ │ ├── package.json
│ │ └── README.md
│ ├── mime-types
│ │ ├── HISTORY.md
│ │ ├── index.js
│ │ ├── LICENSE
│ │ ├── mimeScore.js
│ │ ├── package.json
│ │ └── README.md
│ ├── ms
│ │ ├── index.js
│ │ ├── license.md
│ │ ├── package.json
│ │ └── readme.md
│ ├── mysql2
│ │ ├── index.d.ts
│ │ ├── index.js
│ │ ├── lib
│ │ │ ├── auth_41.js
│ │ │ ├── auth_plugins
│ │ │ │ ├── caching_sha2_password.js
│ │ │ │ ├── caching_sha2_password.md
│ │ │ │ ├── index.js
│ │ │ │ ├── mysql_clear_password.js
│ │ │ │ ├── mysql_native_password.js
│ │ │ │ └── sha256_password.js
│ │ │ ├── base
│ │ │ │ ├── connection.js
│ │ │ │ ├── pool_connection.js
│ │ │ │ └── pool.js
│ │ │ ├── commands
│ │ │ │ ├── auth_switch.js
│ │ │ │ ├── binlog_dump.js
│ │ │ │ ├── change_user.js
│ │ │ │ ├── client_handshake.js
│ │ │ │ ├── close_statement.js
│ │ │ │ ├── command.js
│ │ │ │ ├── execute.js
│ │ │ │ ├── index.js
│ │ │ │ ├── ping.js
│ │ │ │ ├── prepare.js
│ │ │ │ ├── query.js
│ │ │ │ ├── quit.js
│ │ │ │ ├── register_slave.js
│ │ │ │ └── server_handshake.js
│ │ │ ├── compressed_protocol.js
│ │ │ ├── connection_config.js
│ │ │ ├── connection.js
│ │ │ ├── constants
│ │ │ │ ├── charset_encodings.js
│ │ │ │ ├── charsets.js
│ │ │ │ ├── client.js
│ │ │ │ ├── commands.js
│ │ │ │ ├── cursor.js
│ │ │ │ ├── encoding_charset.js
│ │ │ │ ├── errors.js
│ │ │ │ ├── field_flags.js
│ │ │ │ ├── server_status.js
│ │ │ │ ├── session_track.js
│ │ │ │ ├── ssl_profiles.js
│ │ │ │ └── types.js
│ │ │ ├── create_connection.js
│ │ │ ├── create_pool_cluster.js
│ │ │ ├── create_pool.js
│ │ │ ├── helpers.js
│ │ │ ├── packet_parser.js
│ │ │ ├── packets
│ │ │ │ ├── auth_next_factor.js
│ │ │ │ ├── auth_switch_request_more_data.js
│ │ │ │ ├── auth_switch_request.js
│ │ │ │ ├── auth_switch_response.js
│ │ │ │ ├── binary_row.js
│ │ │ │ ├── binlog_dump.js
│ │ │ │ ├── binlog_query_statusvars.js
│ │ │ │ ├── change_user.js
│ │ │ │ ├── close_statement.js
│ │ │ │ ├── column_definition.js
│ │ │ │ ├── execute.js
│ │ │ │ ├── handshake_response.js
│ │ │ │ ├── handshake.js
│ │ │ │ ├── index.js
│ │ │ │ ├── packet.js
│ │ │ │ ├── prepare_statement.js
│ │ │ │ ├── prepared_statement_header.js
│ │ │ │ ├── query.js
│ │ │ │ ├── register_slave.js
│ │ │ │ ├── resultset_header.js
│ │ │ │ ├── ssl_request.js
│ │ │ │ └── text_row.js
│ │ │ ├── parsers
│ │ │ │ ├── binary_parser.js
│ │ │ │ ├── parser_cache.js
│ │ │ │ ├── static_binary_parser.js
│ │ │ │ ├── static_text_parser.js
│ │ │ │ ├── string.js
│ │ │ │ └── text_parser.js
│ │ │ ├── pool_cluster.js
│ │ │ ├── pool_config.js
│ │ │ ├── pool_connection.js
│ │ │ ├── pool.js
│ │ │ ├── promise
│ │ │ │ ├── connection.js
│ │ │ │ ├── inherit_events.js
│ │ │ │ ├── make_done_cb.js
│ │ │ │ ├── pool_cluster.js
│ │ │ │ ├── pool_connection.js
│ │ │ │ ├── pool.js
│ │ │ │ └── prepared_statement_info.js
│ │ │ ├── results_stream.js
│ │ │ └── server.js
│ │ ├── License
│ │ ├── package.json
│ │ ├── promise.d.ts
│ │ ├── promise.js
│ │ ├── README.md
│ │ └── typings
│ │ └── mysql
│ │ ├── index.d.ts
│ │ ├── info.txt
│ │ ├── lib
│ │ │ ├── Auth.d.ts
│ │ │ ├── Connection.d.ts
│ │ │ ├── constants
│ │ │ │ ├── Charsets.d.ts
│ │ │ │ ├── CharsetToEncoding.d.ts
│ │ │ │ ├── index.d.ts
│ │ │ │ └── Types.d.ts
│ │ │ ├── parsers
│ │ │ │ ├── index.d.ts
│ │ │ │ ├── ParserCache.d.ts
│ │ │ │ └── typeCast.d.ts
│ │ │ ├── Pool.d.ts
│ │ │ ├── PoolCluster.d.ts
│ │ │ ├── PoolConnection.d.ts
│ │ │ ├── protocol
│ │ │ │ ├── packets
│ │ │ │ │ ├── Field.d.ts
│ │ │ │ │ ├── FieldPacket.d.ts
│ │ │ │ │ ├── index.d.ts
│ │ │ │ │ ├── OkPacket.d.ts
│ │ │ │ │ ├── params
│ │ │ │ │ │ ├── ErrorPacketParams.d.ts
│ │ │ │ │ │ └── OkPacketParams.d.ts
│ │ │ │ │ ├── ProcedurePacket.d.ts
│ │ │ │ │ ├── ResultSetHeader.d.ts
│ │ │ │ │ └── RowDataPacket.d.ts
│ │ │ │ └── sequences
│ │ │ │ ├── ExecutableBase.d.ts
│ │ │ │ ├── Prepare.d.ts
│ │ │ │ ├── promise
│ │ │ │ │ ├── ExecutableBase.d.ts
│ │ │ │ │ └── QueryableBase.d.ts
│ │ │ │ ├── Query.d.ts
│ │ │ │ ├── QueryableBase.d.ts
│ │ │ │ └── Sequence.d.ts
│ │ │ └── Server.d.ts
│ │ └── LICENSE.txt
│ ├── named-placeholders
│ │ ├── index.js
│ │ ├── LICENSE
│ │ ├── package.json
│ │ └── README.md
│ ├── negotiator
│ │ ├── HISTORY.md
│ │ ├── index.js
│ │ ├── lib
│ │ │ ├── charset.js
│ │ │ ├── encoding.js
│ │ │ ├── language.js
│ │ │ └── mediaType.js
│ │ ├── LICENSE
│ │ ├── package.json
│ │ └── README.md
│ ├── object-assign
│ │ ├── index.js
│ │ ├── license
│ │ ├── package.json
│ │ └── readme.md
│ ├── object-inspect
│ │ ├── .eslintrc
│ │ ├── .github
│ │ │ └── FUNDING.yml
│ │ ├── .nycrc
│ │ ├── CHANGELOG.md
│ │ ├── example
│ │ │ ├── all.js
│ │ │ ├── circular.js
│ │ │ ├── fn.js
│ │ │ └── inspect.js
│ │ ├── index.js
│ │ ├── LICENSE
│ │ ├── package-support.json
│ │ ├── package.json
│ │ ├── readme.markdown
│ │ ├── test
│ │ │ ├── bigint.js
│ │ │ ├── browser
│ │ │ │ └── dom.js
│ │ │ ├── circular.js
│ │ │ ├── deep.js
│ │ │ ├── element.js
│ │ │ ├── err.js
│ │ │ ├── fakes.js
│ │ │ ├── fn.js
│ │ │ ├── global.js
│ │ │ ├── has.js
│ │ │ ├── holes.js
│ │ │ ├── indent-option.js
│ │ │ ├── inspect.js
│ │ │ ├── lowbyte.js
│ │ │ ├── number.js
│ │ │ ├── quoteStyle.js
│ │ │ ├── toStringTag.js
│ │ │ ├── undef.js
│ │ │ └── values.js
│ │ ├── test-core-js.js
│ │ └── util.inspect.js
│ ├── on-finished
│ │ ├── HISTORY.md
│ │ ├── index.js
│ │ ├── LICENSE
│ │ ├── package.json
│ │ └── README.md
│ ├── once
│ │ ├── LICENSE
│ │ ├── once.js
│ │ ├── package.json
│ │ └── README.md
│ ├── parseurl
│ │ ├── HISTORY.md
│ │ ├── index.js
│ │ ├── LICENSE
│ │ ├── package.json
│ │ └── README.md
│ ├── path-key
│ │ ├── index.d.ts
│ │ ├── index.js
│ │ ├── license
│ │ ├── package.json
│ │ └── readme.md
│ ├── path-to-regexp
│ │ ├── dist
│ │ │ ├── index.d.ts
│ │ │ ├── index.js
│ │ │ └── index.js.map
│ │ ├── LICENSE
│ │ ├── package.json
│ │ └── Readme.md
│ ├── pkce-challenge
│ │ ├── dist
│ │ │ ├── index.browser.d.ts
│ │ │ ├── index.browser.js
│ │ │ ├── index.node.d.ts
│ │ │ └── index.node.js
│ │ ├── LICENSE
│ │ ├── package.json
│ │ └── README.md
│ ├── proxy-addr
│ │ ├── HISTORY.md
│ │ ├── index.js
│ │ ├── LICENSE
│ │ ├── package.json
│ │ └── README.md
│ ├── qs
│ │ ├── .editorconfig
│ │ ├── .eslintrc
│ │ ├── .github
│ │ │ └── FUNDING.yml
│ │ ├── .nycrc
│ │ ├── CHANGELOG.md
│ │ ├── dist
│ │ │ └── qs.js
│ │ ├── lib
│ │ │ ├── formats.js
│ │ │ ├── index.js
│ │ │ ├── parse.js
│ │ │ ├── stringify.js
│ │ │ └── utils.js
│ │ ├── LICENSE.md
│ │ ├── package.json
│ │ ├── README.md
│ │ └── test
│ │ ├── empty-keys-cases.js
│ │ ├── parse.js
│ │ ├── stringify.js
│ │ └── utils.js
│ ├── range-parser
│ │ ├── HISTORY.md
│ │ ├── index.js
│ │ ├── LICENSE
│ │ ├── package.json
│ │ └── README.md
│ ├── raw-body
│ │ ├── HISTORY.md
│ │ ├── index.d.ts
│ │ ├── index.js
│ │ ├── LICENSE
│ │ ├── package.json
│ │ ├── README.md
│ │ └── SECURITY.md
│ ├── router
│ │ ├── HISTORY.md
│ │ ├── index.js
│ │ ├── lib
│ │ │ ├── layer.js
│ │ │ └── route.js
│ │ ├── LICENSE
│ │ ├── package.json
│ │ └── README.md
│ ├── safe-buffer
│ │ ├── index.d.ts
│ │ ├── index.js
│ │ ├── LICENSE
│ │ ├── package.json
│ │ └── README.md
│ ├── safer-buffer
│ │ ├── dangerous.js
│ │ ├── LICENSE
│ │ ├── package.json
│ │ ├── Porting-Buffer.md
│ │ ├── Readme.md
│ │ ├── safer.js
│ │ └── tests.js
│ ├── send
│ │ ├── HISTORY.md
│ │ ├── index.js
│ │ ├── LICENSE
│ │ ├── package.json
│ │ └── README.md
│ ├── seq-queue
│ │ ├── .jshintrc
│ │ ├── .npmignore
│ │ ├── AUTHORS
│ │ ├── index.js
│ │ ├── lib
│ │ │ ├── .npmignore
│ │ │ └── seq-queue.js
│ │ ├── LICENSE
│ │ ├── Makefile
│ │ ├── package.json
│ │ ├── README.md
│ │ └── test
│ │ └── seq-queue-test.js
│ ├── serve-static
│ │ ├── HISTORY.md
│ │ ├── index.js
│ │ ├── LICENSE
│ │ ├── package.json
│ │ └── README.md
│ ├── setprototypeof
│ │ ├── index.d.ts
│ │ ├── index.js
│ │ ├── LICENSE
│ │ ├── package.json
│ │ ├── README.md
│ │ └── test
│ │ └── index.js
│ ├── shebang-command
│ │ ├── index.js
│ │ ├── license
│ │ ├── package.json
│ │ └── readme.md
│ ├── shebang-regex
│ │ ├── index.d.ts
│ │ ├── index.js
│ │ ├── license
│ │ ├── package.json
│ │ └── readme.md
│ ├── side-channel
│ │ ├── .editorconfig
│ │ ├── .eslintrc
│ │ ├── .github
│ │ │ └── FUNDING.yml
│ │ ├── .nycrc
│ │ ├── CHANGELOG.md
│ │ ├── index.d.ts
│ │ ├── index.js
│ │ ├── LICENSE
│ │ ├── package.json
│ │ ├── README.md
│ │ ├── test
│ │ │ └── index.js
│ │ └── tsconfig.json
│ ├── side-channel-list
│ │ ├── .editorconfig
│ │ ├── .eslintrc
│ │ ├── .github
│ │ │ └── FUNDING.yml
│ │ ├── .nycrc
│ │ ├── CHANGELOG.md
│ │ ├── index.d.ts
│ │ ├── index.js
│ │ ├── LICENSE
│ │ ├── list.d.ts
│ │ ├── package.json
│ │ ├── README.md
│ │ ├── test
│ │ │ └── index.js
│ │ └── tsconfig.json
│ ├── side-channel-map
│ │ ├── .editorconfig
│ │ ├── .eslintrc
│ │ ├── .github
│ │ │ └── FUNDING.yml
│ │ ├── .nycrc
│ │ ├── CHANGELOG.md
│ │ ├── index.d.ts
│ │ ├── index.js
│ │ ├── LICENSE
│ │ ├── package.json
│ │ ├── README.md
│ │ ├── test
│ │ │ └── index.js
│ │ └── tsconfig.json
│ ├── side-channel-weakmap
│ │ ├── .editorconfig
│ │ ├── .eslintrc
│ │ ├── .github
│ │ │ └── FUNDING.yml
│ │ ├── .nycrc
│ │ ├── CHANGELOG.md
│ │ ├── index.d.ts
│ │ ├── index.js
│ │ ├── LICENSE
│ │ ├── package.json
│ │ ├── README.md
│ │ ├── test
│ │ │ └── index.js
│ │ └── tsconfig.json
│ ├── sqlstring
│ │ ├── HISTORY.md
│ │ ├── index.js
│ │ ├── lib
│ │ │ └── SqlString.js
│ │ ├── LICENSE
│ │ ├── package.json
│ │ └── README.md
│ ├── statuses
│ │ ├── codes.json
│ │ ├── HISTORY.md
│ │ ├── index.js
│ │ ├── LICENSE
│ │ ├── package.json
│ │ └── README.md
│ ├── toidentifier
│ │ ├── HISTORY.md
│ │ ├── index.js
│ │ ├── LICENSE
│ │ ├── package.json
│ │ └── README.md
│ ├── type-is
│ │ ├── HISTORY.md
│ │ ├── index.js
│ │ ├── LICENSE
│ │ ├── package.json
│ │ └── README.md
│ ├── typescript
│ │ ├── bin
│ │ │ ├── tsc
│ │ │ └── tsserver
│ │ ├── lib
│ │ │ ├── _tsc.js
│ │ │ ├── _tsserver.js
│ │ │ ├── _typingsInstaller.js
│ │ │ ├── cs
│ │ │ │ └── diagnosticMessages.generated.json
│ │ │ ├── de
│ │ │ │ └── diagnosticMessages.generated.json
│ │ │ ├── es
│ │ │ │ └── diagnosticMessages.generated.json
│ │ │ ├── fr
│ │ │ │ └── diagnosticMessages.generated.json
│ │ │ ├── it
│ │ │ │ └── diagnosticMessages.generated.json
│ │ │ ├── ja
│ │ │ │ └── diagnosticMessages.generated.json
│ │ │ ├── ko
│ │ │ │ └── diagnosticMessages.generated.json
│ │ │ ├── lib.d.ts
│ │ │ ├── lib.decorators.d.ts
│ │ │ ├── lib.decorators.legacy.d.ts
│ │ │ ├── lib.dom.asynciterable.d.ts
│ │ │ ├── lib.dom.d.ts
│ │ │ ├── lib.dom.iterable.d.ts
│ │ │ ├── lib.es2015.collection.d.ts
│ │ │ ├── lib.es2015.core.d.ts
│ │ │ ├── lib.es2015.d.ts
│ │ │ ├── lib.es2015.generator.d.ts
│ │ │ ├── lib.es2015.iterable.d.ts
│ │ │ ├── lib.es2015.promise.d.ts
│ │ │ ├── lib.es2015.proxy.d.ts
│ │ │ ├── lib.es2015.reflect.d.ts
│ │ │ ├── lib.es2015.symbol.d.ts
│ │ │ ├── lib.es2015.symbol.wellknown.d.ts
│ │ │ ├── lib.es2016.array.include.d.ts
│ │ │ ├── lib.es2016.d.ts
│ │ │ ├── lib.es2016.full.d.ts
│ │ │ ├── lib.es2016.intl.d.ts
│ │ │ ├── lib.es2017.arraybuffer.d.ts
│ │ │ ├── lib.es2017.d.ts
│ │ │ ├── lib.es2017.date.d.ts
│ │ │ ├── lib.es2017.full.d.ts
│ │ │ ├── lib.es2017.intl.d.ts
│ │ │ ├── lib.es2017.object.d.ts
│ │ │ ├── lib.es2017.sharedmemory.d.ts
│ │ │ ├── lib.es2017.string.d.ts
│ │ │ ├── lib.es2017.typedarrays.d.ts
│ │ │ ├── lib.es2018.asyncgenerator.d.ts
│ │ │ ├── lib.es2018.asynciterable.d.ts
│ │ │ ├── lib.es2018.d.ts
│ │ │ ├── lib.es2018.full.d.ts
│ │ │ ├── lib.es2018.intl.d.ts
│ │ │ ├── lib.es2018.promise.d.ts
│ │ │ ├── lib.es2018.regexp.d.ts
│ │ │ ├── lib.es2019.array.d.ts
│ │ │ ├── lib.es2019.d.ts
│ │ │ ├── lib.es2019.full.d.ts
│ │ │ ├── lib.es2019.intl.d.ts
│ │ │ ├── lib.es2019.object.d.ts
│ │ │ ├── lib.es2019.string.d.ts
│ │ │ ├── lib.es2019.symbol.d.ts
│ │ │ ├── lib.es2020.bigint.d.ts
│ │ │ ├── lib.es2020.d.ts
│ │ │ ├── lib.es2020.date.d.ts
│ │ │ ├── lib.es2020.full.d.ts
│ │ │ ├── lib.es2020.intl.d.ts
│ │ │ ├── lib.es2020.number.d.ts
│ │ │ ├── lib.es2020.promise.d.ts
│ │ │ ├── lib.es2020.sharedmemory.d.ts
│ │ │ ├── lib.es2020.string.d.ts
│ │ │ ├── lib.es2020.symbol.wellknown.d.ts
│ │ │ ├── lib.es2021.d.ts
│ │ │ ├── lib.es2021.full.d.ts
│ │ │ ├── lib.es2021.intl.d.ts
│ │ │ ├── lib.es2021.promise.d.ts
│ │ │ ├── lib.es2021.string.d.ts
│ │ │ ├── lib.es2021.weakref.d.ts
│ │ │ ├── lib.es2022.array.d.ts
│ │ │ ├── lib.es2022.d.ts
│ │ │ ├── lib.es2022.error.d.ts
│ │ │ ├── lib.es2022.full.d.ts
│ │ │ ├── lib.es2022.intl.d.ts
│ │ │ ├── lib.es2022.object.d.ts
│ │ │ ├── lib.es2022.regexp.d.ts
│ │ │ ├── lib.es2022.string.d.ts
│ │ │ ├── lib.es2023.array.d.ts
│ │ │ ├── lib.es2023.collection.d.ts
│ │ │ ├── lib.es2023.d.ts
│ │ │ ├── lib.es2023.full.d.ts
│ │ │ ├── lib.es2023.intl.d.ts
│ │ │ ├── lib.es2024.arraybuffer.d.ts
│ │ │ ├── lib.es2024.collection.d.ts
│ │ │ ├── lib.es2024.d.ts
│ │ │ ├── lib.es2024.full.d.ts
│ │ │ ├── lib.es2024.object.d.ts
│ │ │ ├── lib.es2024.promise.d.ts
│ │ │ ├── lib.es2024.regexp.d.ts
│ │ │ ├── lib.es2024.sharedmemory.d.ts
│ │ │ ├── lib.es2024.string.d.ts
│ │ │ ├── lib.es5.d.ts
│ │ │ ├── lib.es6.d.ts
│ │ │ ├── lib.esnext.array.d.ts
│ │ │ ├── lib.esnext.collection.d.ts
│ │ │ ├── lib.esnext.d.ts
│ │ │ ├── lib.esnext.decorators.d.ts
│ │ │ ├── lib.esnext.disposable.d.ts
│ │ │ ├── lib.esnext.float16.d.ts
│ │ │ ├── lib.esnext.full.d.ts
│ │ │ ├── lib.esnext.intl.d.ts
│ │ │ ├── lib.esnext.iterator.d.ts
│ │ │ ├── lib.esnext.promise.d.ts
│ │ │ ├── lib.scripthost.d.ts
│ │ │ ├── lib.webworker.asynciterable.d.ts
│ │ │ ├── lib.webworker.d.ts
│ │ │ ├── lib.webworker.importscripts.d.ts
│ │ │ ├── lib.webworker.iterable.d.ts
│ │ │ ├── pl
│ │ │ │ └── diagnosticMessages.generated.json
│ │ │ ├── pt-br
│ │ │ │ └── diagnosticMessages.generated.json
│ │ │ ├── ru
│ │ │ │ └── diagnosticMessages.generated.json
│ │ │ ├── tr
│ │ │ │ └── diagnosticMessages.generated.json
│ │ │ ├── tsc.js
│ │ │ ├── tsserver.js
│ │ │ ├── tsserverlibrary.d.ts
│ │ │ ├── tsserverlibrary.js
│ │ │ ├── typescript.d.ts
│ │ │ ├── typescript.js
│ │ │ ├── typesMap.json
│ │ │ ├── typingsInstaller.js
│ │ │ ├── watchGuard.js
│ │ │ ├── zh-cn
│ │ │ │ └── diagnosticMessages.generated.json
│ │ │ └── zh-tw
│ │ │ └── diagnosticMessages.generated.json
│ │ ├── LICENSE.txt
│ │ ├── package.json
│ │ ├── README.md
│ │ ├── SECURITY.md
│ │ └── ThirdPartyNoticeText.txt
│ ├── undici-types
│ │ ├── agent.d.ts
│ │ ├── api.d.ts
│ │ ├── balanced-pool.d.ts
│ │ ├── cache.d.ts
│ │ ├── client.d.ts
│ │ ├── connector.d.ts
│ │ ├── content-type.d.ts
│ │ ├── cookies.d.ts
│ │ ├── diagnostics-channel.d.ts
│ │ ├── dispatcher.d.ts
│ │ ├── env-http-proxy-agent.d.ts
│ │ ├── errors.d.ts
│ │ ├── eventsource.d.ts
│ │ ├── fetch.d.ts
│ │ ├── file.d.ts
│ │ ├── filereader.d.ts
│ │ ├── formdata.d.ts
│ │ ├── global-dispatcher.d.ts
│ │ ├── global-origin.d.ts
│ │ ├── handlers.d.ts
│ │ ├── header.d.ts
│ │ ├── index.d.ts
│ │ ├── interceptors.d.ts
│ │ ├── LICENSE
│ │ ├── mock-agent.d.ts
│ │ ├── mock-client.d.ts
│ │ ├── mock-errors.d.ts
│ │ ├── mock-interceptor.d.ts
│ │ ├── mock-pool.d.ts
│ │ ├── package.json
│ │ ├── patch.d.ts
│ │ ├── pool-stats.d.ts
│ │ ├── pool.d.ts
│ │ ├── proxy-agent.d.ts
│ │ ├── readable.d.ts
│ │ ├── README.md
│ │ ├── retry-agent.d.ts
│ │ ├── retry-handler.d.ts
│ │ ├── util.d.ts
│ │ ├── webidl.d.ts
│ │ └── websocket.d.ts
│ ├── unpipe
│ │ ├── HISTORY.md
│ │ ├── index.js
│ │ ├── LICENSE
│ │ ├── package.json
│ │ └── README.md
│ ├── vary
│ │ ├── HISTORY.md
│ │ ├── index.js
│ │ ├── LICENSE
│ │ ├── package.json
│ │ └── README.md
│ ├── which
│ │ ├── bin
│ │ │ └── node-which
│ │ ├── CHANGELOG.md
│ │ ├── LICENSE
│ │ ├── package.json
│ │ ├── README.md
│ │ └── which.js
│ ├── wrappy
│ │ ├── LICENSE
│ │ ├── package.json
│ │ ├── README.md
│ │ └── wrappy.js
│ ├── zod
│ │ ├── index.d.ts
│ │ ├── lib
│ │ │ ├── __tests__
│ │ │ │ ├── Mocker.d.ts
│ │ │ │ └── Mocker.js
│ │ │ ├── benchmarks
│ │ │ │ ├── datetime.d.ts
│ │ │ │ ├── datetime.js
│ │ │ │ ├── discriminatedUnion.d.ts
│ │ │ │ ├── discriminatedUnion.js
│ │ │ │ ├── index.d.ts
│ │ │ │ ├── index.js
│ │ │ │ ├── ipv4.d.ts
│ │ │ │ ├── ipv4.js
│ │ │ │ ├── object.d.ts
│ │ │ │ ├── object.js
│ │ │ │ ├── primitives.d.ts
│ │ │ │ ├── primitives.js
│ │ │ │ ├── realworld.d.ts
│ │ │ │ ├── realworld.js
│ │ │ │ ├── string.d.ts
│ │ │ │ ├── string.js
│ │ │ │ ├── union.d.ts
│ │ │ │ └── union.js
│ │ │ ├── errors.d.ts
│ │ │ ├── errors.js
│ │ │ ├── external.d.ts
│ │ │ ├── external.js
│ │ │ ├── helpers
│ │ │ │ ├── enumUtil.d.ts
│ │ │ │ ├── enumUtil.js
│ │ │ │ ├── errorUtil.d.ts
│ │ │ │ ├── errorUtil.js
│ │ │ │ ├── parseUtil.d.ts
│ │ │ │ ├── parseUtil.js
│ │ │ │ ├── partialUtil.d.ts
│ │ │ │ ├── partialUtil.js
│ │ │ │ ├── typeAliases.d.ts
│ │ │ │ ├── typeAliases.js
│ │ │ │ ├── util.d.ts
│ │ │ │ └── util.js
│ │ │ ├── index.d.ts
│ │ │ ├── index.js
│ │ │ ├── index.mjs
│ │ │ ├── index.umd.js
│ │ │ ├── locales
│ │ │ │ ├── en.d.ts
│ │ │ │ └── en.js
│ │ │ ├── standard-schema.d.ts
│ │ │ ├── standard-schema.js
│ │ │ ├── types.d.ts
│ │ │ ├── types.js
│ │ │ ├── ZodError.d.ts
│ │ │ └── ZodError.js
│ │ ├── LICENSE
│ │ ├── package.json
│ │ └── README.md
│ └── zod-to-json-schema
│ ├── .github
│ │ ├── CR_logotype-full-color.png
│ │ └── FUNDING.yml
│ ├── .prettierrc.json
│ ├── changelog.md
│ ├── contributing.md
│ ├── createIndex.ts
│ ├── dist
│ │ ├── cjs
│ │ │ ├── errorMessages.js
│ │ │ ├── index.js
│ │ │ ├── Options.js
│ │ │ ├── package.json
│ │ │ ├── parseDef.js
│ │ │ ├── parsers
│ │ │ │ ├── any.js
│ │ │ │ ├── array.js
│ │ │ │ ├── bigint.js
│ │ │ │ ├── boolean.js
│ │ │ │ ├── branded.js
│ │ │ │ ├── catch.js
│ │ │ │ ├── date.js
│ │ │ │ ├── default.js
│ │ │ │ ├── effects.js
│ │ │ │ ├── enum.js
│ │ │ │ ├── intersection.js
│ │ │ │ ├── literal.js
│ │ │ │ ├── map.js
│ │ │ │ ├── nativeEnum.js
│ │ │ │ ├── never.js
│ │ │ │ ├── null.js
│ │ │ │ ├── nullable.js
│ │ │ │ ├── number.js
│ │ │ │ ├── object.js
│ │ │ │ ├── optional.js
│ │ │ │ ├── pipeline.js
│ │ │ │ ├── promise.js
│ │ │ │ ├── readonly.js
│ │ │ │ ├── record.js
│ │ │ │ ├── set.js
│ │ │ │ ├── string.js
│ │ │ │ ├── tuple.js
│ │ │ │ ├── undefined.js
│ │ │ │ ├── union.js
│ │ │ │ └── unknown.js
│ │ │ ├── parseTypes.js
│ │ │ ├── Refs.js
│ │ │ ├── selectParser.js
│ │ │ └── zodToJsonSchema.js
│ │ ├── esm
│ │ │ ├── errorMessages.js
│ │ │ ├── index.js
│ │ │ ├── Options.js
│ │ │ ├── package.json
│ │ │ ├── parseDef.js
│ │ │ ├── parsers
│ │ │ │ ├── any.js
│ │ │ │ ├── array.js
│ │ │ │ ├── bigint.js
│ │ │ │ ├── boolean.js
│ │ │ │ ├── branded.js
│ │ │ │ ├── catch.js
│ │ │ │ ├── date.js
│ │ │ │ ├── default.js
│ │ │ │ ├── effects.js
│ │ │ │ ├── enum.js
│ │ │ │ ├── intersection.js
│ │ │ │ ├── literal.js
│ │ │ │ ├── map.js
│ │ │ │ ├── nativeEnum.js
│ │ │ │ ├── never.js
│ │ │ │ ├── null.js
│ │ │ │ ├── nullable.js
│ │ │ │ ├── number.js
│ │ │ │ ├── object.js
│ │ │ │ ├── optional.js
│ │ │ │ ├── pipeline.js
│ │ │ │ ├── promise.js
│ │ │ │ ├── readonly.js
│ │ │ │ ├── record.js
│ │ │ │ ├── set.js
│ │ │ │ ├── string.js
│ │ │ │ ├── tuple.js
│ │ │ │ ├── undefined.js
│ │ │ │ ├── union.js
│ │ │ │ └── unknown.js
│ │ │ ├── parseTypes.js
│ │ │ ├── Refs.js
│ │ │ ├── selectParser.js
│ │ │ └── zodToJsonSchema.js
│ │ └── types
│ │ ├── errorMessages.d.ts
│ │ ├── index.d.ts
│ │ ├── Options.d.ts
│ │ ├── parseDef.d.ts
│ │ ├── parsers
│ │ │ ├── any.d.ts
│ │ │ ├── array.d.ts
│ │ │ ├── bigint.d.ts
│ │ │ ├── boolean.d.ts
│ │ │ ├── branded.d.ts
│ │ │ ├── catch.d.ts
│ │ │ ├── date.d.ts
│ │ │ ├── default.d.ts
│ │ │ ├── effects.d.ts
│ │ │ ├── enum.d.ts
│ │ │ ├── intersection.d.ts
│ │ │ ├── literal.d.ts
│ │ │ ├── map.d.ts
│ │ │ ├── nativeEnum.d.ts
│ │ │ ├── never.d.ts
│ │ │ ├── null.d.ts
│ │ │ ├── nullable.d.ts
│ │ │ ├── number.d.ts
│ │ │ ├── object.d.ts
│ │ │ ├── optional.d.ts
│ │ │ ├── pipeline.d.ts
│ │ │ ├── promise.d.ts
│ │ │ ├── readonly.d.ts
│ │ │ ├── record.d.ts
│ │ │ ├── set.d.ts
│ │ │ ├── string.d.ts
│ │ │ ├── tuple.d.ts
│ │ │ ├── undefined.d.ts
│ │ │ ├── union.d.ts
│ │ │ └── unknown.d.ts
│ │ ├── parseTypes.d.ts
│ │ ├── Refs.d.ts
│ │ ├── selectParser.d.ts
│ │ └── zodToJsonSchema.d.ts
│ ├── LICENSE
│ ├── package.json
│ ├── postcjs.ts
│ ├── postesm.ts
│ ├── README.md
│ └── SECURITY.md
├── package-lock.json
├── package.json
├── README.md
├── src
│ └── index.ts
└── tsconfig.json
```
# Files
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
```markdown
1 | # MySQL MCP Server
2 |
3 | This is a Model Context Protocol (MCP) server that provides access to a MySQL database. It allows agent to execute SQL queries against a MySQL database.
4 |
5 | ## Features
6 |
7 | - Execute SQL queries against a MySQL database:
8 | - Read data (SELECT statements)
9 | - Create tables (CREATE TABLE statements)
10 | - Insert data (INSERT INTO statements)
11 | - Update data (UPDATE statements)
12 | - Delete data (DELETE FROM statements)
13 | - Returns query results in JSON format
14 | - Configurable database connection settings
15 | - Transaction logging with unique IDs
16 |
17 | ## Prerequisites
18 |
19 | - Node.js (v14 or higher)
20 | - MySQL server
21 | - MCP SDK
22 |
23 | ## Installation
24 |
25 | 1. Clone or download this repository
26 | 2. Install dependencies:
27 |
28 | ```bash
29 | cd mysql-mcp-server
30 | npm install
31 | ```
32 |
33 | 3. Build the server:
34 |
35 | ```bash
36 | npm run build
37 | ```
38 |
39 | ## Configuration
40 |
41 | The MySQL MCP server uses the following environment variables for configuration:
42 |
43 | - `MYSQL_HOST`: MySQL server hostname (default: 'localhost')
44 | - `MYSQL_PORT`: MySQL server port (default: 3306)
45 | - `MYSQL_USER`: MySQL username (default: 'mcp101')
46 | - `MYSQL_PASSWORD`: MySQL password (default: '123qwe')
47 | - `MYSQL_DATABASE`: MySQL database name (default: 'mcpdb')
48 |
49 | ## Database Setup
50 |
51 | 1. Create a MySQL database:
52 |
53 | ```sql
54 | CREATE DATABASE mcpdb;
55 | ```
56 |
57 | 2. Create a MySQL user with access to the database:
58 |
59 | ```sql
60 | CREATE USER 'mcp101'@'localhost' IDENTIFIED BY '123qwe';
61 | GRANT ALL PRIVILEGES ON mcpdb.* TO 'mcp101'@'localhost';
62 | FLUSH PRIVILEGES;
63 | ```
64 |
65 | 3. Create a test table with sample data:
66 |
67 | ```sql
68 | USE mcpdb;
69 | CREATE TABLE test_users (
70 | id INT AUTO_INCREMENT PRIMARY KEY,
71 | name VARCHAR(100),
72 | email VARCHAR(100),
73 | created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP
74 | );
75 |
76 | INSERT INTO test_users (name, email) VALUES
77 | ('John Doe', '[email protected]'),
78 | ('Jane Smith', '[email protected]'),
79 | ('Bob Johnson', '[email protected]');
80 | ```
81 |
82 | ## MCP Configuration
83 |
84 | Add the MySQL MCP server to your MCP settings file:
85 |
86 | ### VSCode (Claude Extension)
87 |
88 | File: `~/Library/Application Support/Code/User/globalStorage/saoudrizwan.claude-dev/settings/cline_mcp_settings.json`
89 |
90 | Change the args according your MySQL configuruation
91 |
92 | ```json
93 | {
94 | "mcpServers": {
95 | "mysql-mcp-server": {
96 | "autoApprove": [],
97 | "disabled": false,
98 | "timeout": 60,
99 | "command": "node",
100 | "args": [
101 | "/path/to/mysql-mcp-server/build/index.js"
102 | ],
103 | "env": {
104 | "MYSQL_HOST": "localhost",
105 | "MYSQL_PORT": "3306",
106 | "MYSQL_USER": "mcp101",
107 | "MYSQL_PASSWORD": "123qwe",
108 | "MYSQL_DATABASE": "mcpdb"
109 | },
110 | "transportType": "stdio"
111 | }
112 | }
113 | }
114 | ```
115 |
116 | ### Claude Desktop App
117 |
118 | File: `~/Library/Application Support/Claude/claude_desktop_config.json`
119 |
120 | ```json
121 | {
122 | "mcpServers": {
123 | "mysql-mcp-server": {
124 | "autoApprove": [],
125 | "disabled": false,
126 | "timeout": 60,
127 | "command": "node",
128 | "args": [
129 | "/path/to/mysql-mcp-server/build/index.js"
130 | ],
131 | "env": {
132 | "MYSQL_HOST": "localhost",
133 | "MYSQL_PORT": "3306",
134 | "MYSQL_USER": "mcp101",
135 | "MYSQL_PASSWORD": "123qwe",
136 | "MYSQL_DATABASE": "mcpdb"
137 | },
138 | "transportType": "stdio"
139 | }
140 | }
141 | }
142 | ```
143 |
144 | ## Usage
145 |
146 | Once configured, you can use the MySQL MCP server in your conversations with Claude. For example:
147 |
148 | "Can you show me all the users in the test_users table?"
149 |
150 | Claude will use the `run_sql_query` tool to execute:
151 |
152 | ```sql
153 | SELECT * FROM test_users
154 | ```
155 |
156 | ## Available Tools
157 |
158 | ### run_sql_query
159 |
160 | Executes a read-only SQL query (SELECT statements only) against the MySQL database.
161 |
162 | Parameters:
163 | - `query`: The SQL SELECT query to execute.
164 |
165 | Example:
166 | ```json
167 | {
168 | "query": "SELECT * FROM test_users"
169 | }
170 | ```
171 |
172 | ### create_table
173 |
174 | Creates a new table in the MySQL database.
175 |
176 | Parameters:
177 | - `query`: The SQL CREATE TABLE query to execute.
178 |
179 | Example:
180 | ```json
181 | {
182 | "query": "CREATE TABLE products (id INT AUTO_INCREMENT PRIMARY KEY, name VARCHAR(100), price DECIMAL(10,2))"
183 | }
184 | ```
185 |
186 | ### insert_data
187 |
188 | Inserts data into a table in the MySQL database.
189 |
190 | Parameters:
191 | - `query`: The SQL INSERT INTO query to execute.
192 |
193 | Example:
194 | ```json
195 | {
196 | "query": "INSERT INTO products (name, price) VALUES ('Laptop', 999.99), ('Smartphone', 499.99)"
197 | }
198 | ```
199 |
200 | ### update_data
201 |
202 | Updates data in a table in the MySQL database.
203 |
204 | Parameters:
205 | - `query`: The SQL UPDATE query to execute.
206 |
207 | Example:
208 | ```json
209 | {
210 | "query": "UPDATE products SET price = 899.99 WHERE name = 'Laptop'"
211 | }
212 | ```
213 |
214 | ### delete_data
215 |
216 | Deletes data from a table in the MySQL database.
217 |
218 | Parameters:
219 | - `query`: The SQL DELETE FROM query to execute.
220 |
221 | Example:
222 | ```json
223 | {
224 | "query": "DELETE FROM products WHERE name = 'Smartphone'"
225 | }
226 | ```
227 |
228 | ## Security Considerations
229 |
230 | - Use a dedicated MySQL user with appropriate privileges for the MCP server
231 | - Consider using read-only privileges if you only need to query data
232 | - Store sensitive information like database credentials securely
233 | - All operations are logged with unique transaction IDs for auditing
234 |
```
--------------------------------------------------------------------------------
/tsconfig.json:
--------------------------------------------------------------------------------
```json
1 | {
2 | "compilerOptions": {
3 | "target": "ES2020",
4 | "module": "NodeNext",
5 | "moduleResolution": "NodeNext",
6 | "esModuleInterop": true,
7 | "outDir": "build",
8 | "strict": true,
9 | "skipLibCheck": true,
10 | "forceConsistentCasingInFileNames": true
11 | },
12 | "include": ["src/**/*"],
13 | "exclude": ["node_modules"]
14 | }
15 |
```
--------------------------------------------------------------------------------
/package.json:
--------------------------------------------------------------------------------
```json
1 | {
2 | "name": "mysql-mcp-server",
3 | "version": "1.0.0",
4 | "type": "module",
5 | "main": "build/index.js",
6 | "scripts": {
7 | "build": "npx tsc && chmod +x build/index.js",
8 | "test": "echo \"Error: no test specified\" && exit 1"
9 | },
10 | "keywords": [],
11 | "author": "",
12 | "license": "ISC",
13 | "description": "",
14 | "dependencies": {
15 | "@modelcontextprotocol/sdk": "^1.8.0",
16 | "@types/node": "^22.13.16",
17 | "mysql2": "^3.14.0",
18 | "typescript": "^5.8.2"
19 | }
20 | }
21 |
```
--------------------------------------------------------------------------------
/src/index.ts:
--------------------------------------------------------------------------------
```typescript
1 | #!/usr/bin/env node
2 | import { Server } from '@modelcontextprotocol/sdk/server/index.js';
3 | import { StdioServerTransport } from '@modelcontextprotocol/sdk/server/stdio.js';
4 | import {
5 | CallToolRequestSchema,
6 | ErrorCode,
7 | ListToolsRequestSchema,
8 | McpError,
9 | } from '@modelcontextprotocol/sdk/types.js';
10 | import { randomUUID } from 'crypto';
11 | import mysql from 'mysql2/promise';
12 |
13 | const MYSQL_HOST = process.env.MYSQL_HOST || 'localhost';
14 | const MYSQL_PORT = parseInt(process.env.MYSQL_PORT || '3306', 10);
15 | const MYSQL_USER = process.env.MYSQL_USER || 'mcp101';
16 | const MYSQL_PASSWORD = process.env.MYSQL_PASSWORD || '123qwe';
17 | const MYSQL_DATABASE = process.env.MYSQL_DATABASE || 'mcpdb';
18 |
19 | interface SqlQueryArgs {
20 | query: string;
21 | }
22 |
23 | // Validate SQL query arguments
24 | const isValidSqlQueryArgs = (args: any): args is SqlQueryArgs =>
25 | typeof args === 'object' &&
26 | args !== null &&
27 | typeof args.query === 'string';
28 |
29 | // Check if query is read-only (SELECT)
30 | const isReadOnlyQuery = (query: string): boolean =>
31 | query.trim().toLowerCase().startsWith('select');
32 |
33 | // Check if query is for creating a table
34 | const isCreateTableQuery = (query: string): boolean =>
35 | query.trim().toLowerCase().startsWith('create table');
36 |
37 | // Check if query is for inserting data
38 | const isInsertQuery = (query: string): boolean =>
39 | query.trim().toLowerCase().startsWith('insert into');
40 |
41 | // Check if query is for updating data
42 | const isUpdateQuery = (query: string): boolean =>
43 | query.trim().toLowerCase().startsWith('update');
44 |
45 | // Check if query is for deleting data
46 | const isDeleteQuery = (query: string): boolean =>
47 | query.trim().toLowerCase().startsWith('delete from');
48 |
49 | // Generate a unique transaction ID for logging
50 | const generateTransactionId = (): string => randomUUID();
51 |
52 | class MySqlServer {
53 | private server: Server;
54 | private pool: mysql.Pool;
55 |
56 | constructor() {
57 | this.server = new Server(
58 | {
59 | name: 'mysql-mcp-server',
60 | version: '1.0.0',
61 | },
62 | {
63 | capabilities: {
64 | tools: {},
65 | },
66 | }
67 | );
68 |
69 | this.pool = mysql.createPool({
70 | host: MYSQL_HOST,
71 | port: MYSQL_PORT,
72 | user: MYSQL_USER,
73 | password: MYSQL_PASSWORD,
74 | database: MYSQL_DATABASE,
75 | waitForConnections: true,
76 | connectionLimit: 10,
77 | queueLimit: 0,
78 | });
79 |
80 | this.setupToolHandlers();
81 |
82 | // Error handling
83 | this.server.onerror = (error) => console.error('[MCP Error]', error);
84 | process.on('SIGINT', async () => {
85 | await this.pool.end();
86 | await this.server.close();
87 | process.exit(0);
88 | });
89 | }
90 |
91 | private setupToolHandlers() {
92 | this.server.setRequestHandler(ListToolsRequestSchema, async () => ({
93 | tools: [
94 | {
95 | name: 'run_sql_query',
96 | description: 'Executes a read-only SQL query (SELECT statements only) against the MySQL database.',
97 | inputSchema: {
98 | type: 'object',
99 | properties: {
100 | query: {
101 | type: 'string',
102 | description: 'The SQL SELECT query to execute.',
103 | },
104 | },
105 | required: ['query'],
106 | },
107 | },
108 | {
109 | name: 'create_table',
110 | description: 'Creates a new table in the MySQL database.',
111 | inputSchema: {
112 | type: 'object',
113 | properties: {
114 | query: {
115 | type: 'string',
116 | description: 'The SQL CREATE TABLE query to execute.',
117 | },
118 | },
119 | required: ['query'],
120 | },
121 | },
122 | {
123 | name: 'insert_data',
124 | description: 'Inserts data into a table in the MySQL database.',
125 | inputSchema: {
126 | type: 'object',
127 | properties: {
128 | query: {
129 | type: 'string',
130 | description: 'The SQL INSERT INTO query to execute.',
131 | },
132 | },
133 | required: ['query'],
134 | },
135 | },
136 | {
137 | name: 'update_data',
138 | description: 'Updates data in a table in the MySQL database.',
139 | inputSchema: {
140 | type: 'object',
141 | properties: {
142 | query: {
143 | type: 'string',
144 | description: 'The SQL UPDATE query to execute.',
145 | },
146 | },
147 | required: ['query'],
148 | },
149 | },
150 | {
151 | name: 'delete_data',
152 | description: 'Deletes data from a table in the MySQL database.',
153 | inputSchema: {
154 | type: 'object',
155 | properties: {
156 | query: {
157 | type: 'string',
158 | description: 'The SQL DELETE FROM query to execute.',
159 | },
160 | },
161 | required: ['query'],
162 | },
163 | },
164 | {
165 | name: 'execute_sql',
166 | description: 'Executes any non-SELECT SQL statement (e.g., ALTER TABLE, DROP, etc.)',
167 | inputSchema: {
168 | type: 'object',
169 | properties: {
170 | query: {
171 | type: 'string',
172 | description: 'The SQL statement to execute.',
173 | },
174 | },
175 | required: ['query'],
176 | },
177 | },
178 | ],
179 | }));
180 |
181 | this.server.setRequestHandler(CallToolRequestSchema, async (request) => {
182 | const transactionId = generateTransactionId();
183 | console.error(`[${transactionId}] Processing request: ${request.params.name}`);
184 |
185 | // Handle different tool types
186 | switch (request.params.name) {
187 | case 'run_sql_query':
188 | return this.handleReadQuery(request, transactionId);
189 | case 'create_table':
190 | return this.handleCreateTable(request, transactionId);
191 | case 'insert_data':
192 | return this.handleInsertData(request, transactionId);
193 | case 'update_data':
194 | return this.handleUpdateData(request, transactionId);
195 | case 'delete_data':
196 | return this.handleDeleteData(request, transactionId);
197 | case 'execute_sql':
198 | return this.handleExecuteSql(request, transactionId);
199 | default:
200 | throw new McpError(
201 | ErrorCode.MethodNotFound,
202 | `Unknown tool: ${request.params.name}`
203 | );
204 | }
205 | });
206 | }
207 |
208 | // Handle read-only queries (SELECT)
209 | private async handleReadQuery(request: any, transactionId: string) {
210 | if (!isValidSqlQueryArgs(request.params.arguments)) {
211 | throw new McpError(
212 | ErrorCode.InvalidParams,
213 | 'Invalid SQL query arguments.'
214 | );
215 | }
216 |
217 | const query = request.params.arguments.query;
218 |
219 | if (!isReadOnlyQuery(query)) {
220 | throw new McpError(
221 | ErrorCode.InvalidParams,
222 | 'Only SELECT queries are allowed with run_sql_query tool.'
223 | );
224 | }
225 |
226 | console.error(`[${transactionId}] Executing SELECT query: ${query}`);
227 |
228 | try {
229 | const [rows] = await this.pool.query(query);
230 | console.error(`[${transactionId}] Query executed successfully`);
231 |
232 | return {
233 | content: [
234 | {
235 | type: 'text',
236 | text: JSON.stringify(rows, null, 2),
237 | },
238 | ],
239 | };
240 | } catch (error) {
241 | console.error(`[${transactionId}] Query error:`, error);
242 | if (error instanceof Error) {
243 | return {
244 | content: [
245 | {
246 | type: 'text',
247 | text: `MySQL error: ${error.message}`,
248 | },
249 | ],
250 | isError: true,
251 | };
252 | }
253 | throw error;
254 | }
255 | }
256 |
257 | // Handle CREATE TABLE queries
258 | private async handleCreateTable(request: any, transactionId: string) {
259 | if (!isValidSqlQueryArgs(request.params.arguments)) {
260 | throw new McpError(
261 | ErrorCode.InvalidParams,
262 | 'Invalid SQL query arguments.'
263 | );
264 | }
265 |
266 | const query = request.params.arguments.query;
267 |
268 | if (!isCreateTableQuery(query)) {
269 | throw new McpError(
270 | ErrorCode.InvalidParams,
271 | 'Only CREATE TABLE queries are allowed with create_table tool.'
272 | );
273 | }
274 |
275 | console.error(`[${transactionId}] Executing CREATE TABLE query: ${query}`);
276 |
277 | try {
278 | const [result] = await this.pool.query(query);
279 | console.error(`[${transactionId}] Table created successfully`);
280 |
281 | return {
282 | content: [
283 | {
284 | type: 'text',
285 | text: JSON.stringify({
286 | success: true,
287 | message: 'Table created successfully',
288 | result
289 | }, null, 2),
290 | },
291 | ],
292 | };
293 | } catch (error) {
294 | console.error(`[${transactionId}] Query error:`, error);
295 | if (error instanceof Error) {
296 | return {
297 | content: [
298 | {
299 | type: 'text',
300 | text: `MySQL error: ${error.message}`,
301 | },
302 | ],
303 | isError: true,
304 | };
305 | }
306 | throw error;
307 | }
308 | }
309 |
310 | // Handle INSERT INTO queries
311 | private async handleInsertData(request: any, transactionId: string) {
312 | if (!isValidSqlQueryArgs(request.params.arguments)) {
313 | throw new McpError(
314 | ErrorCode.InvalidParams,
315 | 'Invalid SQL query arguments.'
316 | );
317 | }
318 |
319 | const query = request.params.arguments.query;
320 |
321 | if (!isInsertQuery(query)) {
322 | throw new McpError(
323 | ErrorCode.InvalidParams,
324 | 'Only INSERT INTO queries are allowed with insert_data tool.'
325 | );
326 | }
327 |
328 | console.error(`[${transactionId}] Executing INSERT query: ${query}`);
329 |
330 | try {
331 | const [result] = await this.pool.query(query);
332 | console.error(`[${transactionId}] Data inserted successfully`);
333 |
334 | return {
335 | content: [
336 | {
337 | type: 'text',
338 | text: JSON.stringify({
339 | success: true,
340 | message: 'Data inserted successfully',
341 | result
342 | }, null, 2),
343 | },
344 | ],
345 | };
346 | } catch (error) {
347 | console.error(`[${transactionId}] Query error:`, error);
348 | if (error instanceof Error) {
349 | return {
350 | content: [
351 | {
352 | type: 'text',
353 | text: `MySQL error: ${error.message}`,
354 | },
355 | ],
356 | isError: true,
357 | };
358 | }
359 | throw error;
360 | }
361 | }
362 |
363 | // Handle UPDATE queries
364 | private async handleUpdateData(request: any, transactionId: string) {
365 | if (!isValidSqlQueryArgs(request.params.arguments)) {
366 | throw new McpError(
367 | ErrorCode.InvalidParams,
368 | 'Invalid SQL query arguments.'
369 | );
370 | }
371 |
372 | const query = request.params.arguments.query;
373 |
374 | if (!isUpdateQuery(query)) {
375 | throw new McpError(
376 | ErrorCode.InvalidParams,
377 | 'Only UPDATE queries are allowed with update_data tool.'
378 | );
379 | }
380 |
381 | console.error(`[${transactionId}] Executing UPDATE query: ${query}`);
382 |
383 | try {
384 | const [result] = await this.pool.query(query);
385 | console.error(`[${transactionId}] Data updated successfully`);
386 |
387 | return {
388 | content: [
389 | {
390 | type: 'text',
391 | text: JSON.stringify({
392 | success: true,
393 | message: 'Data updated successfully',
394 | result
395 | }, null, 2),
396 | },
397 | ],
398 | };
399 | } catch (error) {
400 | console.error(`[${transactionId}] Query error:`, error);
401 | if (error instanceof Error) {
402 | return {
403 | content: [
404 | {
405 | type: 'text',
406 | text: `MySQL error: ${error.message}`,
407 | },
408 | ],
409 | isError: true,
410 | };
411 | }
412 | throw error;
413 | }
414 | }
415 |
416 | // Handle DELETE FROM queries
417 | private async handleDeleteData(request: any, transactionId: string) {
418 | if (!isValidSqlQueryArgs(request.params.arguments)) {
419 | throw new McpError(
420 | ErrorCode.InvalidParams,
421 | 'Invalid SQL query arguments.'
422 | );
423 | }
424 |
425 | const query = request.params.arguments.query;
426 |
427 | if (!isDeleteQuery(query)) {
428 | throw new McpError(
429 | ErrorCode.InvalidParams,
430 | 'Only DELETE FROM queries are allowed with delete_data tool.'
431 | );
432 | }
433 |
434 | console.error(`[${transactionId}] Executing DELETE query: ${query}`);
435 |
436 | try {
437 | const [result] = await this.pool.query(query);
438 | console.error(`[${transactionId}] Data deleted successfully`);
439 |
440 | return {
441 | content: [
442 | {
443 | type: 'text',
444 | text: JSON.stringify({
445 | success: true,
446 | message: 'Data deleted successfully',
447 | result
448 | }, null, 2),
449 | },
450 | ],
451 | };
452 | } catch (error) {
453 | console.error(`[${transactionId}] Query error:`, error);
454 | if (error instanceof Error) {
455 | return {
456 | content: [
457 | {
458 | type: 'text',
459 | text: `MySQL error: ${error.message}`,
460 | },
461 | ],
462 | isError: true,
463 | };
464 | }
465 | throw error;
466 | }
467 | }
468 |
469 | async run() {
470 | const transport = new StdioServerTransport();
471 | await this.server.connect(transport);
472 | console.error('MySQL MCP server running on stdio');
473 | }
474 |
475 | // Handle general SQL execution (non-SELECT)
476 | private async handleExecuteSql(request: any, transactionId: string) {
477 | if (!isValidSqlQueryArgs(request.params.arguments)) {
478 | throw new McpError(
479 | ErrorCode.InvalidParams,
480 | 'Invalid SQL query arguments.'
481 | );
482 | }
483 |
484 | const query = request.params.arguments.query;
485 |
486 | if (isReadOnlyQuery(query)) {
487 | throw new McpError(
488 | ErrorCode.InvalidParams,
489 | 'SELECT queries are not allowed with execute_sql tool.'
490 | );
491 | }
492 |
493 | console.error(`[${transactionId}] Executing general SQL: ${query}`);
494 |
495 | try {
496 | const [result] = await this.pool.query(query);
497 | console.error(`[${transactionId}] SQL executed successfully`);
498 |
499 | return {
500 | content: [
501 | {
502 | type: 'text',
503 | text: JSON.stringify({
504 | success: true,
505 | message: 'SQL executed successfully',
506 | result
507 | }, null, 2),
508 | },
509 | ],
510 | };
511 | } catch (error) {
512 | console.error(`[${transactionId}] SQL error:`, error);
513 | if (error instanceof Error) {
514 | return {
515 | content: [
516 | {
517 | type: 'text',
518 | text: `MySQL error: ${error.message}`,
519 | },
520 | ],
521 | isError: true,
522 | };
523 | }
524 | throw error;
525 | }
526 | }
527 | }
528 |
529 | const server = new MySqlServer();
530 | server.run().catch(console.error);
531 |
```