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

@frontmcp/di

Package Overview
Dependencies
Maintainers
1
Versions
55
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@frontmcp/di

Generic dependency injection container and registry utilities for TypeScript applications

Source
npmnpm
Version
0.10.0
Version published
Maintainers
1
Created
Source

@frontmcp/di

Dependency injection container and registry utilities for FrontMCP.

NPM

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

Install

npm install @frontmcp/di reflect-metadata zod

Features

  • Type-safe DI — class tokens with configurable prefixes (docs)
  • Scoped providers — GLOBAL and CONTEXT scopes
  • Hierarchical registries — parent/child container adoption
  • Indexed lookups — O(1) registry queries via IndexedRegistry
  • Change events — subscribe to registry mutations
  • Token factorycreateTokenFactory({ prefix }) for Symbol-based tokens

Quick Example

import 'reflect-metadata';
import { DiContainer, createTokenFactory, ProviderScope } from '@frontmcp/di';

const tokens = createTokenFactory({ prefix: 'MyApp' });

class DatabaseService {
  static metadata = { name: 'Database', scope: ProviderScope.GLOBAL };
}

const container = new DiContainer([DatabaseService]);
await container.ready;
const db = container.get(DatabaseService);

Docs

TopicLink
Providers & DIProviders

License

Apache-2.0 — see LICENSE.

Keywords

dependency-injection

FAQs

Package last updated on 13 Feb 2026

Related posts