Big News: Socket raises $60M Series C at a $1B valuation to secure software supply chains for AI-driven development.Announcement
Sign In

@frontmcp/utils

Package Overview
Dependencies
Maintainers
1
Versions
42
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.1.1
Version published
Weekly downloads
3.4K
-10.57%
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 { matchUriTemplate, sha256Hex, fileExists } 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 03 May 2026

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts