New:Socket for Asana Is Now Available.Learn more
Sign In

@frontmcp/plugin-cache

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/plugin-cache

Cache plugin for FrontMCP - Redis, Vercel KV, and in-memory caching with automatic tool result caching

Source
npmnpm
Version
0.7.2
Version published
Maintainers
1
Created
Source

@frontmcp/plugin-cache

Cache plugin for FrontMCP - provides automatic tool result caching with support for Redis, Vercel KV, and in-memory storage.

Installation

npm install @frontmcp/plugin-cache

Usage

import { CachePlugin } from '@frontmcp/plugin-cache';
import { App } from '@frontmcp/sdk';

@App({
  plugins: [CachePlugin],
})
class MyApp {}

Features

  • Multiple storage backends: Redis, Vercel KV, or in-memory
  • Automatic TTL management: Configure cache expiration
  • Tool result caching: Automatically cache tool execution results
  • Configurable cache keys: Customize how cache keys are generated

Configuration

In-Memory (Default)

import { CachePlugin } from '@frontmcp/plugin-cache';

@App({
  plugins: [
    CachePlugin.init({
      type: 'memory',
      defaultTTL: 300, // TTL in seconds (default: 1 day)
    }),
  ],
})
class MyApp {}

Redis

import { CachePlugin } from '@frontmcp/plugin-cache';

@App({
  plugins: [
    CachePlugin.init({
      type: 'redis',
      defaultTTL: 300,
      config: {
        host: 'localhost',
        port: 6379,
        password: process.env.REDIS_PASSWORD, // optional
        db: 0, // optional
      },
    }),
  ],
})
class MyApp {}

Redis Client (Reuse Existing)

import { CachePlugin } from '@frontmcp/plugin-cache';
import { Redis } from 'ioredis';

const redis = new Redis({ host: 'localhost', port: 6379 });

@App({
  plugins: [
    CachePlugin.init({
      type: 'redis-client',
      client: redis,
      defaultTTL: 300,
    }),
  ],
})
class MyApp {}

Global Store

Use the store configuration from @FrontMcp decorator:

import { CachePlugin } from '@frontmcp/plugin-cache';

@App({
  plugins: [
    CachePlugin.init({
      type: 'global-store', // Uses redis/vercel-kv from FrontMcp config
    }),
  ],
})
class MyApp {}

License

Apache-2.0

Keywords

mcp

FAQs

Package last updated on 09 Jan 2026

Related posts