# 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
# MySQL MCP Server
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.
## Features
- Execute SQL queries against a MySQL database:
- Read data (SELECT statements)
- Create tables (CREATE TABLE statements)
- Insert data (INSERT INTO statements)
- Update data (UPDATE statements)
- Delete data (DELETE FROM statements)
- Returns query results in JSON format
- Configurable database connection settings
- Transaction logging with unique IDs
## Prerequisites
- Node.js (v14 or higher)
- MySQL server
- MCP SDK
## Installation
1. Clone or download this repository
2. Install dependencies:
```bash
cd mysql-mcp-server
npm install
```
3. Build the server:
```bash
npm run build
```
## Configuration
The MySQL MCP server uses the following environment variables for configuration:
- `MYSQL_HOST`: MySQL server hostname (default: 'localhost')
- `MYSQL_PORT`: MySQL server port (default: 3306)
- `MYSQL_USER`: MySQL username (default: 'mcp101')
- `MYSQL_PASSWORD`: MySQL password (default: '123qwe')
- `MYSQL_DATABASE`: MySQL database name (default: 'mcpdb')
## Database Setup
1. Create a MySQL database:
```sql
CREATE DATABASE mcpdb;
```
2. Create a MySQL user with access to the database:
```sql
CREATE USER 'mcp101'@'localhost' IDENTIFIED BY '123qwe';
GRANT ALL PRIVILEGES ON mcpdb.* TO 'mcp101'@'localhost';
FLUSH PRIVILEGES;
```
3. Create a test table with sample data:
```sql
USE mcpdb;
CREATE TABLE test_users (
id INT AUTO_INCREMENT PRIMARY KEY,
name VARCHAR(100),
email VARCHAR(100),
created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP
);
INSERT INTO test_users (name, email) VALUES
('John Doe', '[email protected]'),
('Jane Smith', '[email protected]'),
('Bob Johnson', '[email protected]');
```
## MCP Configuration
Add the MySQL MCP server to your MCP settings file:
### VSCode (Claude Extension)
File: `~/Library/Application Support/Code/User/globalStorage/saoudrizwan.claude-dev/settings/cline_mcp_settings.json`
Change the args according your MySQL configuruation
```json
{
"mcpServers": {
"mysql-mcp-server": {
"autoApprove": [],
"disabled": false,
"timeout": 60,
"command": "node",
"args": [
"/path/to/mysql-mcp-server/build/index.js"
],
"env": {
"MYSQL_HOST": "localhost",
"MYSQL_PORT": "3306",
"MYSQL_USER": "mcp101",
"MYSQL_PASSWORD": "123qwe",
"MYSQL_DATABASE": "mcpdb"
},
"transportType": "stdio"
}
}
}
```
### Claude Desktop App
File: `~/Library/Application Support/Claude/claude_desktop_config.json`
```json
{
"mcpServers": {
"mysql-mcp-server": {
"autoApprove": [],
"disabled": false,
"timeout": 60,
"command": "node",
"args": [
"/path/to/mysql-mcp-server/build/index.js"
],
"env": {
"MYSQL_HOST": "localhost",
"MYSQL_PORT": "3306",
"MYSQL_USER": "mcp101",
"MYSQL_PASSWORD": "123qwe",
"MYSQL_DATABASE": "mcpdb"
},
"transportType": "stdio"
}
}
}
```
## Usage
Once configured, you can use the MySQL MCP server in your conversations with Claude. For example:
"Can you show me all the users in the test_users table?"
Claude will use the `run_sql_query` tool to execute:
```sql
SELECT * FROM test_users
```
## Available Tools
### run_sql_query
Executes a read-only SQL query (SELECT statements only) against the MySQL database.
Parameters:
- `query`: The SQL SELECT query to execute.
Example:
```json
{
"query": "SELECT * FROM test_users"
}
```
### create_table
Creates a new table in the MySQL database.
Parameters:
- `query`: The SQL CREATE TABLE query to execute.
Example:
```json
{
"query": "CREATE TABLE products (id INT AUTO_INCREMENT PRIMARY KEY, name VARCHAR(100), price DECIMAL(10,2))"
}
```
### insert_data
Inserts data into a table in the MySQL database.
Parameters:
- `query`: The SQL INSERT INTO query to execute.
Example:
```json
{
"query": "INSERT INTO products (name, price) VALUES ('Laptop', 999.99), ('Smartphone', 499.99)"
}
```
### update_data
Updates data in a table in the MySQL database.
Parameters:
- `query`: The SQL UPDATE query to execute.
Example:
```json
{
"query": "UPDATE products SET price = 899.99 WHERE name = 'Laptop'"
}
```
### delete_data
Deletes data from a table in the MySQL database.
Parameters:
- `query`: The SQL DELETE FROM query to execute.
Example:
```json
{
"query": "DELETE FROM products WHERE name = 'Smartphone'"
}
```
## Security Considerations
- Use a dedicated MySQL user with appropriate privileges for the MCP server
- Consider using read-only privileges if you only need to query data
- Store sensitive information like database credentials securely
- All operations are logged with unique transaction IDs for auditing
```
--------------------------------------------------------------------------------
/tsconfig.json:
--------------------------------------------------------------------------------
```json
{
"compilerOptions": {
"target": "ES2020",
"module": "NodeNext",
"moduleResolution": "NodeNext",
"esModuleInterop": true,
"outDir": "build",
"strict": true,
"skipLibCheck": true,
"forceConsistentCasingInFileNames": true
},
"include": ["src/**/*"],
"exclude": ["node_modules"]
}
```
--------------------------------------------------------------------------------
/package.json:
--------------------------------------------------------------------------------
```json
{
"name": "mysql-mcp-server",
"version": "1.0.0",
"type": "module",
"main": "build/index.js",
"scripts": {
"build": "npx tsc && chmod +x build/index.js",
"test": "echo \"Error: no test specified\" && exit 1"
},
"keywords": [],
"author": "",
"license": "ISC",
"description": "",
"dependencies": {
"@modelcontextprotocol/sdk": "^1.8.0",
"@types/node": "^22.13.16",
"mysql2": "^3.14.0",
"typescript": "^5.8.2"
}
}
```
--------------------------------------------------------------------------------
/src/index.ts:
--------------------------------------------------------------------------------
```typescript
#!/usr/bin/env node
import { Server } from '@modelcontextprotocol/sdk/server/index.js';
import { StdioServerTransport } from '@modelcontextprotocol/sdk/server/stdio.js';
import {
CallToolRequestSchema,
ErrorCode,
ListToolsRequestSchema,
McpError,
} from '@modelcontextprotocol/sdk/types.js';
import { randomUUID } from 'crypto';
import mysql from 'mysql2/promise';
const MYSQL_HOST = process.env.MYSQL_HOST || 'localhost';
const MYSQL_PORT = parseInt(process.env.MYSQL_PORT || '3306', 10);
const MYSQL_USER = process.env.MYSQL_USER || 'mcp101';
const MYSQL_PASSWORD = process.env.MYSQL_PASSWORD || '123qwe';
const MYSQL_DATABASE = process.env.MYSQL_DATABASE || 'mcpdb';
interface SqlQueryArgs {
query: string;
}
// Validate SQL query arguments
const isValidSqlQueryArgs = (args: any): args is SqlQueryArgs =>
typeof args === 'object' &&
args !== null &&
typeof args.query === 'string';
// Check if query is read-only (SELECT)
const isReadOnlyQuery = (query: string): boolean =>
query.trim().toLowerCase().startsWith('select');
// Check if query is for creating a table
const isCreateTableQuery = (query: string): boolean =>
query.trim().toLowerCase().startsWith('create table');
// Check if query is for inserting data
const isInsertQuery = (query: string): boolean =>
query.trim().toLowerCase().startsWith('insert into');
// Check if query is for updating data
const isUpdateQuery = (query: string): boolean =>
query.trim().toLowerCase().startsWith('update');
// Check if query is for deleting data
const isDeleteQuery = (query: string): boolean =>
query.trim().toLowerCase().startsWith('delete from');
// Generate a unique transaction ID for logging
const generateTransactionId = (): string => randomUUID();
class MySqlServer {
private server: Server;
private pool: mysql.Pool;
constructor() {
this.server = new Server(
{
name: 'mysql-mcp-server',
version: '1.0.0',
},
{
capabilities: {
tools: {},
},
}
);
this.pool = mysql.createPool({
host: MYSQL_HOST,
port: MYSQL_PORT,
user: MYSQL_USER,
password: MYSQL_PASSWORD,
database: MYSQL_DATABASE,
waitForConnections: true,
connectionLimit: 10,
queueLimit: 0,
});
this.setupToolHandlers();
// Error handling
this.server.onerror = (error) => console.error('[MCP Error]', error);
process.on('SIGINT', async () => {
await this.pool.end();
await this.server.close();
process.exit(0);
});
}
private setupToolHandlers() {
this.server.setRequestHandler(ListToolsRequestSchema, async () => ({
tools: [
{
name: 'run_sql_query',
description: 'Executes a read-only SQL query (SELECT statements only) against the MySQL database.',
inputSchema: {
type: 'object',
properties: {
query: {
type: 'string',
description: 'The SQL SELECT query to execute.',
},
},
required: ['query'],
},
},
{
name: 'create_table',
description: 'Creates a new table in the MySQL database.',
inputSchema: {
type: 'object',
properties: {
query: {
type: 'string',
description: 'The SQL CREATE TABLE query to execute.',
},
},
required: ['query'],
},
},
{
name: 'insert_data',
description: 'Inserts data into a table in the MySQL database.',
inputSchema: {
type: 'object',
properties: {
query: {
type: 'string',
description: 'The SQL INSERT INTO query to execute.',
},
},
required: ['query'],
},
},
{
name: 'update_data',
description: 'Updates data in a table in the MySQL database.',
inputSchema: {
type: 'object',
properties: {
query: {
type: 'string',
description: 'The SQL UPDATE query to execute.',
},
},
required: ['query'],
},
},
{
name: 'delete_data',
description: 'Deletes data from a table in the MySQL database.',
inputSchema: {
type: 'object',
properties: {
query: {
type: 'string',
description: 'The SQL DELETE FROM query to execute.',
},
},
required: ['query'],
},
},
{
name: 'execute_sql',
description: 'Executes any non-SELECT SQL statement (e.g., ALTER TABLE, DROP, etc.)',
inputSchema: {
type: 'object',
properties: {
query: {
type: 'string',
description: 'The SQL statement to execute.',
},
},
required: ['query'],
},
},
],
}));
this.server.setRequestHandler(CallToolRequestSchema, async (request) => {
const transactionId = generateTransactionId();
console.error(`[${transactionId}] Processing request: ${request.params.name}`);
// Handle different tool types
switch (request.params.name) {
case 'run_sql_query':
return this.handleReadQuery(request, transactionId);
case 'create_table':
return this.handleCreateTable(request, transactionId);
case 'insert_data':
return this.handleInsertData(request, transactionId);
case 'update_data':
return this.handleUpdateData(request, transactionId);
case 'delete_data':
return this.handleDeleteData(request, transactionId);
case 'execute_sql':
return this.handleExecuteSql(request, transactionId);
default:
throw new McpError(
ErrorCode.MethodNotFound,
`Unknown tool: ${request.params.name}`
);
}
});
}
// Handle read-only queries (SELECT)
private async handleReadQuery(request: any, transactionId: string) {
if (!isValidSqlQueryArgs(request.params.arguments)) {
throw new McpError(
ErrorCode.InvalidParams,
'Invalid SQL query arguments.'
);
}
const query = request.params.arguments.query;
if (!isReadOnlyQuery(query)) {
throw new McpError(
ErrorCode.InvalidParams,
'Only SELECT queries are allowed with run_sql_query tool.'
);
}
console.error(`[${transactionId}] Executing SELECT query: ${query}`);
try {
const [rows] = await this.pool.query(query);
console.error(`[${transactionId}] Query executed successfully`);
return {
content: [
{
type: 'text',
text: JSON.stringify(rows, null, 2),
},
],
};
} catch (error) {
console.error(`[${transactionId}] Query error:`, error);
if (error instanceof Error) {
return {
content: [
{
type: 'text',
text: `MySQL error: ${error.message}`,
},
],
isError: true,
};
}
throw error;
}
}
// Handle CREATE TABLE queries
private async handleCreateTable(request: any, transactionId: string) {
if (!isValidSqlQueryArgs(request.params.arguments)) {
throw new McpError(
ErrorCode.InvalidParams,
'Invalid SQL query arguments.'
);
}
const query = request.params.arguments.query;
if (!isCreateTableQuery(query)) {
throw new McpError(
ErrorCode.InvalidParams,
'Only CREATE TABLE queries are allowed with create_table tool.'
);
}
console.error(`[${transactionId}] Executing CREATE TABLE query: ${query}`);
try {
const [result] = await this.pool.query(query);
console.error(`[${transactionId}] Table created successfully`);
return {
content: [
{
type: 'text',
text: JSON.stringify({
success: true,
message: 'Table created successfully',
result
}, null, 2),
},
],
};
} catch (error) {
console.error(`[${transactionId}] Query error:`, error);
if (error instanceof Error) {
return {
content: [
{
type: 'text',
text: `MySQL error: ${error.message}`,
},
],
isError: true,
};
}
throw error;
}
}
// Handle INSERT INTO queries
private async handleInsertData(request: any, transactionId: string) {
if (!isValidSqlQueryArgs(request.params.arguments)) {
throw new McpError(
ErrorCode.InvalidParams,
'Invalid SQL query arguments.'
);
}
const query = request.params.arguments.query;
if (!isInsertQuery(query)) {
throw new McpError(
ErrorCode.InvalidParams,
'Only INSERT INTO queries are allowed with insert_data tool.'
);
}
console.error(`[${transactionId}] Executing INSERT query: ${query}`);
try {
const [result] = await this.pool.query(query);
console.error(`[${transactionId}] Data inserted successfully`);
return {
content: [
{
type: 'text',
text: JSON.stringify({
success: true,
message: 'Data inserted successfully',
result
}, null, 2),
},
],
};
} catch (error) {
console.error(`[${transactionId}] Query error:`, error);
if (error instanceof Error) {
return {
content: [
{
type: 'text',
text: `MySQL error: ${error.message}`,
},
],
isError: true,
};
}
throw error;
}
}
// Handle UPDATE queries
private async handleUpdateData(request: any, transactionId: string) {
if (!isValidSqlQueryArgs(request.params.arguments)) {
throw new McpError(
ErrorCode.InvalidParams,
'Invalid SQL query arguments.'
);
}
const query = request.params.arguments.query;
if (!isUpdateQuery(query)) {
throw new McpError(
ErrorCode.InvalidParams,
'Only UPDATE queries are allowed with update_data tool.'
);
}
console.error(`[${transactionId}] Executing UPDATE query: ${query}`);
try {
const [result] = await this.pool.query(query);
console.error(`[${transactionId}] Data updated successfully`);
return {
content: [
{
type: 'text',
text: JSON.stringify({
success: true,
message: 'Data updated successfully',
result
}, null, 2),
},
],
};
} catch (error) {
console.error(`[${transactionId}] Query error:`, error);
if (error instanceof Error) {
return {
content: [
{
type: 'text',
text: `MySQL error: ${error.message}`,
},
],
isError: true,
};
}
throw error;
}
}
// Handle DELETE FROM queries
private async handleDeleteData(request: any, transactionId: string) {
if (!isValidSqlQueryArgs(request.params.arguments)) {
throw new McpError(
ErrorCode.InvalidParams,
'Invalid SQL query arguments.'
);
}
const query = request.params.arguments.query;
if (!isDeleteQuery(query)) {
throw new McpError(
ErrorCode.InvalidParams,
'Only DELETE FROM queries are allowed with delete_data tool.'
);
}
console.error(`[${transactionId}] Executing DELETE query: ${query}`);
try {
const [result] = await this.pool.query(query);
console.error(`[${transactionId}] Data deleted successfully`);
return {
content: [
{
type: 'text',
text: JSON.stringify({
success: true,
message: 'Data deleted successfully',
result
}, null, 2),
},
],
};
} catch (error) {
console.error(`[${transactionId}] Query error:`, error);
if (error instanceof Error) {
return {
content: [
{
type: 'text',
text: `MySQL error: ${error.message}`,
},
],
isError: true,
};
}
throw error;
}
}
async run() {
const transport = new StdioServerTransport();
await this.server.connect(transport);
console.error('MySQL MCP server running on stdio');
}
// Handle general SQL execution (non-SELECT)
private async handleExecuteSql(request: any, transactionId: string) {
if (!isValidSqlQueryArgs(request.params.arguments)) {
throw new McpError(
ErrorCode.InvalidParams,
'Invalid SQL query arguments.'
);
}
const query = request.params.arguments.query;
if (isReadOnlyQuery(query)) {
throw new McpError(
ErrorCode.InvalidParams,
'SELECT queries are not allowed with execute_sql tool.'
);
}
console.error(`[${transactionId}] Executing general SQL: ${query}`);
try {
const [result] = await this.pool.query(query);
console.error(`[${transactionId}] SQL executed successfully`);
return {
content: [
{
type: 'text',
text: JSON.stringify({
success: true,
message: 'SQL executed successfully',
result
}, null, 2),
},
],
};
} catch (error) {
console.error(`[${transactionId}] SQL error:`, error);
if (error instanceof Error) {
return {
content: [
{
type: 'text',
text: `MySQL error: ${error.message}`,
},
],
isError: true,
};
}
throw error;
}
}
}
const server = new MySqlServer();
server.run().catch(console.error);
```