fastmcp 4.29.1 → 4.30.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -117,8 +117,6 @@ npx fastmcp dev src/examples/addition.ts
117
117
  npx fastmcp inspect src/examples/addition.ts
118
118
  ```
119
119
 
120
- If you are looking for a boilerplate repository to build your own MCP server, check out [fastmcp-boilerplate](https://github.com/punkpeye/fastmcp-boilerplate).
121
-
122
120
  ### Remote Server Options
123
121
 
124
122
  FastMCP supports multiple transport options for remote communication, allowing an MCP hosted on a remote machine to be accessed over the network.
@@ -2856,13 +2854,8 @@ Refer to this [issue](https://github.com/punkpeye/fastmcp/issues/25#issuecomment
2856
2854
  >
2857
2855
  > If you've developed a server using FastMCP, please [submit a PR](https://github.com/punkpeye/fastmcp) to showcase it here!
2858
2856
 
2859
- > [!NOTE]
2860
- >
2861
- > If you are looking for a boilerplate repository to build your own MCP server, check out [fastmcp-boilerplate](https://github.com/punkpeye/fastmcp-boilerplate).
2862
-
2863
2857
  - [apinetwork/piapi-mcp-server](https://github.com/apinetwork/piapi-mcp-server) - generate media using Midjourney/Flux/Kling/LumaLabs/Udio/Chrip/Trellis
2864
2858
  - [domdomegg/computer-use-mcp](https://github.com/domdomegg/computer-use-mcp) - controls your computer
2865
- - [LiterallyBlah/Dradis-MCP](https://github.com/LiterallyBlah/Dradis-MCP) – manages projects and vulnerabilities in Dradis
2866
2859
  - [Meeting-Baas/meeting-mcp](https://github.com/Meeting-Baas/meeting-mcp) - create meeting bots, search transcripts, and manage recording data
2867
2860
  - [drumnation/unsplash-smart-mcp-server](https://github.com/drumnation/unsplash-smart-mcp-server) – enables AI agents to seamlessly search, recommend, and deliver professional stock photos from Unsplash
2868
2861
  - [ssmanji89/halopsa-workflows-mcp](https://github.com/ssmanji89/halopsa-workflows-mcp) - HaloPSA Workflows integration with AI assistants
package/dist/FastMCP.cjs CHANGED
@@ -11,7 +11,7 @@
11
11
 
12
12
 
13
13
 
14
- var _chunk5EEESM57cjs = require('./chunk-5EEESM57.cjs');
14
+ var _chunk4JEDH2ONcjs = require('./chunk-4JEDH2ON.cjs');
15
15
 
16
16
 
17
17
 
@@ -24,7 +24,7 @@ var _chunk5EEESM57cjs = require('./chunk-5EEESM57.cjs');
24
24
 
25
25
 
26
26
 
27
- var _chunkUHJQUSUXcjs = require('./chunk-UHJQUSUX.cjs');
27
+ var _chunkCZGQ2WTQcjs = require('./chunk-CZGQ2WTQ.cjs');
28
28
  require('./chunk-FBDPX4H2.cjs');
29
29
 
30
30
 
@@ -50,5 +50,5 @@ require('./chunk-FBDPX4H2.cjs');
50
50
 
51
51
 
52
52
 
53
- exports.AuthProvider = _chunkUHJQUSUXcjs.AuthProvider; exports.AzureProvider = _chunkUHJQUSUXcjs.AzureProvider; exports.DiscoveryDocumentCache = _chunk5EEESM57cjs.DiscoveryDocumentCache; exports.FastMCP = _chunk5EEESM57cjs.FastMCP; exports.FastMCPError = _chunk5EEESM57cjs.FastMCPError; exports.FastMCPSession = _chunk5EEESM57cjs.FastMCPSession; exports.GitHubProvider = _chunkUHJQUSUXcjs.GitHubProvider; exports.GoogleProvider = _chunkUHJQUSUXcjs.GoogleProvider; exports.MEDIA_FETCH_TIMEOUT_MS = _chunk5EEESM57cjs.MEDIA_FETCH_TIMEOUT_MS; exports.OAuthProvider = _chunkUHJQUSUXcjs.OAuthProvider; exports.ServerState = _chunk5EEESM57cjs.ServerState; exports.SessionError = _chunk5EEESM57cjs.SessionError; exports.UnexpectedStateError = _chunk5EEESM57cjs.UnexpectedStateError; exports.UserError = _chunk5EEESM57cjs.UserError; exports.audioContent = _chunk5EEESM57cjs.audioContent; exports.getAuthSession = _chunkUHJQUSUXcjs.getAuthSession; exports.imageContent = _chunk5EEESM57cjs.imageContent; exports.jsonSchemaAdapter = _chunk5EEESM57cjs.jsonSchemaAdapter; exports.requireAll = _chunkUHJQUSUXcjs.requireAll; exports.requireAny = _chunkUHJQUSUXcjs.requireAny; exports.requireAuth = _chunkUHJQUSUXcjs.requireAuth; exports.requireRole = _chunkUHJQUSUXcjs.requireRole; exports.requireScopes = _chunkUHJQUSUXcjs.requireScopes;
53
+ exports.AuthProvider = _chunkCZGQ2WTQcjs.AuthProvider; exports.AzureProvider = _chunkCZGQ2WTQcjs.AzureProvider; exports.DiscoveryDocumentCache = _chunk4JEDH2ONcjs.DiscoveryDocumentCache; exports.FastMCP = _chunk4JEDH2ONcjs.FastMCP; exports.FastMCPError = _chunk4JEDH2ONcjs.FastMCPError; exports.FastMCPSession = _chunk4JEDH2ONcjs.FastMCPSession; exports.GitHubProvider = _chunkCZGQ2WTQcjs.GitHubProvider; exports.GoogleProvider = _chunkCZGQ2WTQcjs.GoogleProvider; exports.MEDIA_FETCH_TIMEOUT_MS = _chunk4JEDH2ONcjs.MEDIA_FETCH_TIMEOUT_MS; exports.OAuthProvider = _chunkCZGQ2WTQcjs.OAuthProvider; exports.ServerState = _chunk4JEDH2ONcjs.ServerState; exports.SessionError = _chunk4JEDH2ONcjs.SessionError; exports.UnexpectedStateError = _chunk4JEDH2ONcjs.UnexpectedStateError; exports.UserError = _chunk4JEDH2ONcjs.UserError; exports.audioContent = _chunk4JEDH2ONcjs.audioContent; exports.getAuthSession = _chunkCZGQ2WTQcjs.getAuthSession; exports.imageContent = _chunk4JEDH2ONcjs.imageContent; exports.jsonSchemaAdapter = _chunk4JEDH2ONcjs.jsonSchemaAdapter; exports.requireAll = _chunkCZGQ2WTQcjs.requireAll; exports.requireAny = _chunkCZGQ2WTQcjs.requireAny; exports.requireAuth = _chunkCZGQ2WTQcjs.requireAuth; exports.requireRole = _chunkCZGQ2WTQcjs.requireRole; exports.requireScopes = _chunkCZGQ2WTQcjs.requireScopes;
54
54
  //# sourceMappingURL=FastMCP.cjs.map
package/dist/FastMCP.js CHANGED
@@ -11,7 +11,7 @@ import {
11
11
  audioContent,
12
12
  imageContent,
13
13
  jsonSchemaAdapter
14
- } from "./chunk-VN5SZ6IE.js";
14
+ } from "./chunk-5KA6SOWT.js";
15
15
  import {
16
16
  AuthProvider,
17
17
  AzureProvider,
@@ -24,7 +24,7 @@ import {
24
24
  requireAuth,
25
25
  requireRole,
26
26
  requireScopes
27
- } from "./chunk-RWPENEKV.js";
27
+ } from "./chunk-XPTUOWUT.js";
28
28
  import "./chunk-JCKJRUCE.js";
29
29
  export {
30
30
  AuthProvider,
@@ -25,7 +25,7 @@
25
25
 
26
26
 
27
27
 
28
- var _chunkUHJQUSUXcjs = require('../chunk-UHJQUSUX.cjs');
28
+ var _chunkCZGQ2WTQcjs = require('../chunk-CZGQ2WTQ.cjs');
29
29
 
30
30
 
31
31
 
@@ -53,5 +53,5 @@ var _chunkUHJQUSUXcjs = require('../chunk-UHJQUSUX.cjs');
53
53
 
54
54
 
55
55
 
56
- exports.AuthProvider = _chunkUHJQUSUXcjs.AuthProvider; exports.AzureProvider = _chunkUHJQUSUXcjs.AzureProvider; exports.ConsentManager = _chunkUHJQUSUXcjs.ConsentManager; exports.DEFAULT_ACCESS_TOKEN_TTL = _chunkUHJQUSUXcjs.DEFAULT_ACCESS_TOKEN_TTL; exports.DEFAULT_ACCESS_TOKEN_TTL_NO_REFRESH = _chunkUHJQUSUXcjs.DEFAULT_ACCESS_TOKEN_TTL_NO_REFRESH; exports.DEFAULT_AUTHORIZATION_CODE_TTL = _chunkUHJQUSUXcjs.DEFAULT_AUTHORIZATION_CODE_TTL; exports.DEFAULT_REFRESH_TOKEN_TTL = _chunkUHJQUSUXcjs.DEFAULT_REFRESH_TOKEN_TTL; exports.DEFAULT_TRANSACTION_TTL = _chunkUHJQUSUXcjs.DEFAULT_TRANSACTION_TTL; exports.DiskStore = _chunkUHJQUSUXcjs.DiskStore; exports.EncryptedTokenStorage = _chunkUHJQUSUXcjs.EncryptedTokenStorage; exports.GitHubProvider = _chunkUHJQUSUXcjs.GitHubProvider; exports.GoogleProvider = _chunkUHJQUSUXcjs.GoogleProvider; exports.JWKSVerifier = _chunkUHJQUSUXcjs.JWKSVerifier; exports.JWTIssuer = _chunkUHJQUSUXcjs.JWTIssuer; exports.MemoryTokenStorage = _chunkUHJQUSUXcjs.MemoryTokenStorage; exports.OAuthProvider = _chunkUHJQUSUXcjs.OAuthProvider; exports.OAuthProxy = _chunkUHJQUSUXcjs.OAuthProxy; exports.OAuthProxyError = _chunkUHJQUSUXcjs.OAuthProxyError; exports.PKCEUtils = _chunkUHJQUSUXcjs.PKCEUtils; exports.TOKEN_ENDPOINT_AUTH_METHODS = _chunkUHJQUSUXcjs.TOKEN_ENDPOINT_AUTH_METHODS; exports.getAuthSession = _chunkUHJQUSUXcjs.getAuthSession; exports.requireAll = _chunkUHJQUSUXcjs.requireAll; exports.requireAny = _chunkUHJQUSUXcjs.requireAny; exports.requireAuth = _chunkUHJQUSUXcjs.requireAuth; exports.requireRole = _chunkUHJQUSUXcjs.requireRole; exports.requireScopes = _chunkUHJQUSUXcjs.requireScopes;
56
+ exports.AuthProvider = _chunkCZGQ2WTQcjs.AuthProvider; exports.AzureProvider = _chunkCZGQ2WTQcjs.AzureProvider; exports.ConsentManager = _chunkCZGQ2WTQcjs.ConsentManager; exports.DEFAULT_ACCESS_TOKEN_TTL = _chunkCZGQ2WTQcjs.DEFAULT_ACCESS_TOKEN_TTL; exports.DEFAULT_ACCESS_TOKEN_TTL_NO_REFRESH = _chunkCZGQ2WTQcjs.DEFAULT_ACCESS_TOKEN_TTL_NO_REFRESH; exports.DEFAULT_AUTHORIZATION_CODE_TTL = _chunkCZGQ2WTQcjs.DEFAULT_AUTHORIZATION_CODE_TTL; exports.DEFAULT_REFRESH_TOKEN_TTL = _chunkCZGQ2WTQcjs.DEFAULT_REFRESH_TOKEN_TTL; exports.DEFAULT_TRANSACTION_TTL = _chunkCZGQ2WTQcjs.DEFAULT_TRANSACTION_TTL; exports.DiskStore = _chunkCZGQ2WTQcjs.DiskStore; exports.EncryptedTokenStorage = _chunkCZGQ2WTQcjs.EncryptedTokenStorage; exports.GitHubProvider = _chunkCZGQ2WTQcjs.GitHubProvider; exports.GoogleProvider = _chunkCZGQ2WTQcjs.GoogleProvider; exports.JWKSVerifier = _chunkCZGQ2WTQcjs.JWKSVerifier; exports.JWTIssuer = _chunkCZGQ2WTQcjs.JWTIssuer; exports.MemoryTokenStorage = _chunkCZGQ2WTQcjs.MemoryTokenStorage; exports.OAuthProvider = _chunkCZGQ2WTQcjs.OAuthProvider; exports.OAuthProxy = _chunkCZGQ2WTQcjs.OAuthProxy; exports.OAuthProxyError = _chunkCZGQ2WTQcjs.OAuthProxyError; exports.PKCEUtils = _chunkCZGQ2WTQcjs.PKCEUtils; exports.TOKEN_ENDPOINT_AUTH_METHODS = _chunkCZGQ2WTQcjs.TOKEN_ENDPOINT_AUTH_METHODS; exports.getAuthSession = _chunkCZGQ2WTQcjs.getAuthSession; exports.requireAll = _chunkCZGQ2WTQcjs.requireAll; exports.requireAny = _chunkCZGQ2WTQcjs.requireAny; exports.requireAuth = _chunkCZGQ2WTQcjs.requireAuth; exports.requireRole = _chunkCZGQ2WTQcjs.requireRole; exports.requireScopes = _chunkCZGQ2WTQcjs.requireScopes;
57
57
  //# sourceMappingURL=index.cjs.map
@@ -129,9 +129,30 @@ declare class DiskStore implements TokenStorage {
129
129
  */
130
130
  private ensureDirectory;
131
131
  /**
132
- * Get file path for a key
132
+ * Get file path for a key.
133
+ *
134
+ * The file name must not let a key escape the directory, and distinct keys
135
+ * must get distinct files, also on case-insensitive filesystems (the macOS
136
+ * and Windows defaults). Lowercase letters, digits and `-` are kept; every
137
+ * other UTF-8 byte, uppercase letters and `_` included, becomes `_` and two
138
+ * lowercase hex digits, so neither `client:a.b` and `client:a_b` nor
139
+ * `code:A` and `code:a` share a file. Names that would get too long for
140
+ * common filesystems are replaced by a SHA-256 digest, under a prefix the
141
+ * escaping above never produces.
133
142
  */
134
143
  private getFilePath;
144
+ /**
145
+ * The paths a key's entry may be stored at: its current file, then the
146
+ * file name earlier versions used. The earlier scheme replaced every other
147
+ * character with `_`, so distinct keys could share a file; it is still read
148
+ * so that entries persisted before an upgrade survive it.
149
+ */
150
+ private getFilePaths;
151
+ /**
152
+ * The file name earlier versions stored a key under, or `undefined` when
153
+ * that name is too long to have ever been written.
154
+ */
155
+ private getLegacyFilePath;
135
156
  /**
136
157
  * Windows can temporarily deny replacing a file that is being read. Retry
137
158
  * the atomic rename, never deleting the previous entry to make room. Five
@@ -129,9 +129,30 @@ declare class DiskStore implements TokenStorage {
129
129
  */
130
130
  private ensureDirectory;
131
131
  /**
132
- * Get file path for a key
132
+ * Get file path for a key.
133
+ *
134
+ * The file name must not let a key escape the directory, and distinct keys
135
+ * must get distinct files, also on case-insensitive filesystems (the macOS
136
+ * and Windows defaults). Lowercase letters, digits and `-` are kept; every
137
+ * other UTF-8 byte, uppercase letters and `_` included, becomes `_` and two
138
+ * lowercase hex digits, so neither `client:a.b` and `client:a_b` nor
139
+ * `code:A` and `code:a` share a file. Names that would get too long for
140
+ * common filesystems are replaced by a SHA-256 digest, under a prefix the
141
+ * escaping above never produces.
133
142
  */
134
143
  private getFilePath;
144
+ /**
145
+ * The paths a key's entry may be stored at: its current file, then the
146
+ * file name earlier versions used. The earlier scheme replaced every other
147
+ * character with `_`, so distinct keys could share a file; it is still read
148
+ * so that entries persisted before an upgrade survive it.
149
+ */
150
+ private getFilePaths;
151
+ /**
152
+ * The file name earlier versions stored a key under, or `undefined` when
153
+ * that name is too long to have ever been written.
154
+ */
155
+ private getLegacyFilePath;
135
156
  /**
136
157
  * Windows can temporarily deny replacing a file that is being read. Retry
137
158
  * the atomic rename, never deleting the previous entry to make room. Five
@@ -25,7 +25,7 @@ import {
25
25
  requireAuth,
26
26
  requireRole,
27
27
  requireScopes
28
- } from "../chunk-RWPENEKV.js";
28
+ } from "../chunk-XPTUOWUT.js";
29
29
  export {
30
30
  AuthProvider,
31
31
  AzureProvider,
@@ -1,6 +1,6 @@
1
1
  "use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { newObj[key] = obj[key]; } } } newObj.default = obj; return newObj; } } function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } function _nullishCoalesce(lhs, rhsFn) { if (lhs != null) { return lhs; } else { return rhsFn(); } } async function _asyncNullishCoalesce(lhs, rhsFn) { if (lhs != null) { return lhs; } else { return await rhsFn(); } } function _optionalChain(ops) { let lastAccessLHS = undefined; let value = ops[0]; let i = 1; while (i < ops.length) { const op = ops[i]; const fn = ops[i + 1]; i += 2; if ((op === 'optionalAccess' || op === 'optionalCall') && value == null) { return undefined; } if (op === 'access' || op === 'optionalAccess') { lastAccessLHS = value; value = fn(value); } else if (op === 'call' || op === 'optionalCall') { value = fn((...args) => value.call(lastAccessLHS, ...args)); lastAccessLHS = undefined; } } return value; }
2
2
 
3
- var _chunkUHJQUSUXcjs = require('./chunk-UHJQUSUX.cjs');
3
+ var _chunkCZGQ2WTQcjs = require('./chunk-CZGQ2WTQ.cjs');
4
4
 
5
5
 
6
6
 
@@ -141,7 +141,7 @@ var DiscoveryDocumentCache = class {
141
141
  throw error;
142
142
  }
143
143
  if (!res.ok) {
144
- await _chunkUHJQUSUXcjs.cancelResponseBody.call(void 0, res);
144
+ await _chunkCZGQ2WTQcjs.cancelResponseBody.call(void 0, res);
145
145
  throw new Error(
146
146
  `Failed to fetch discovery document from ${url}: ${res.status} ${res.statusText}`
147
147
  );
@@ -258,7 +258,7 @@ var imageContent = async (input) => {
258
258
  signal: AbortSignal.timeout(timeoutMs)
259
259
  });
260
260
  if (!response.ok) {
261
- await _chunkUHJQUSUXcjs.cancelResponseBody.call(void 0, response);
261
+ await _chunkCZGQ2WTQcjs.cancelResponseBody.call(void 0, response);
262
262
  throw new Error(
263
263
  `Server responded with status: ${response.status} - ${response.statusText}`
264
264
  );
@@ -340,7 +340,7 @@ var audioContent = async (input) => {
340
340
  signal: AbortSignal.timeout(timeoutMs)
341
341
  });
342
342
  if (!response.ok) {
343
- await _chunkUHJQUSUXcjs.cancelResponseBody.call(void 0, response);
343
+ await _chunkCZGQ2WTQcjs.cancelResponseBody.call(void 0, response);
344
344
  throw new Error(
345
345
  `Server responded with status: ${response.status} - ${response.statusText}`
346
346
  );
@@ -3699,4 +3699,4 @@ var FastMCP = class extends FastMCPEventEmitter {
3699
3699
 
3700
3700
 
3701
3701
  exports.DiscoveryDocumentCache = DiscoveryDocumentCache; exports.jsonSchemaAdapter = jsonSchemaAdapter; exports.MEDIA_FETCH_TIMEOUT_MS = MEDIA_FETCH_TIMEOUT_MS; exports.imageContent = imageContent; exports.audioContent = audioContent; exports.FastMCPError = FastMCPError; exports.SessionError = SessionError; exports.UnexpectedStateError = UnexpectedStateError; exports.UserError = UserError; exports.ServerState = ServerState; exports.FastMCPSession = FastMCPSession; exports.FastMCP = FastMCP;
3702
- //# sourceMappingURL=chunk-5EEESM57.cjs.map
3702
+ //# sourceMappingURL=chunk-4JEDH2ON.cjs.map