New:Socket for Asana Is Now Available.Learn more
Get Started

@frontmcp/utils

Package Overview
Dependencies
Maintainers
1
Versions
56
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@frontmcp/utils

Shared utility functions for FrontMCP - string manipulation, URI handling, path utilities, and more

Source
npmnpm
Version
1.6.0
Version published
Weekly downloads
728
-33.46%
Maintainers
1
Weekly downloads
 
Created
Source

@frontmcp/utils

Shared utility functions for the FrontMCP ecosystem.

NPM

Internal package. Used by @frontmcp/sdk and other @frontmcp/* libraries — most users do not need to install this directly.

Install

npm install @frontmcp/utils

Features

NamingsplitWords, toCase, shortHash, ensureMaxLen, idFromString for string manipulation and case conversion

URIisValidMcpUri, extractUriScheme, parseUriTemplate, matchUriTemplate, expandUriTemplate (RFC 3986 / RFC 6570)

PathtrimSlashes, joinPath for URL path operations

ContentsanitizeToJson, inferMimeType for safe serialization and MIME detection

HTTPvalidateBaseUrl for URL validation and normalization

Cryptosha256, sha256Hex, sha256Base64url, hkdfSha256, encryptAesGcm, decryptAesGcm, randomBytes, randomUUID, generateCodeVerifier, generateCodeChallenge, generatePkcePair, base64urlEncode, base64urlDecode for cross-platform cryptography

File systemreadFile, writeFile, mkdir, stat, fileExists, readJSON, writeJSON, ensureDir, isDirEmpty, runCmd and more — lazy-loaded for Node.js environments

Quick Example

import { fileExists, matchUriTemplate, sha256Hex } from '@frontmcp/utils';

const params = matchUriTemplate('users/{id}/posts/{postId}', 'users/123/posts/456');
// { id: '123', postId: '456' }

const hash = sha256Hex('hello world');

const exists = await fileExists('/path/to/file');
  • @frontmcp/sdk — core framework
  • @frontmcp/auth — uses crypto utilities for PKCE, encryption

License

Apache-2.0 — see LICENSE.

Keywords

utils

FAQs

Package last updated on 02 Aug 2026

Related posts