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

@frontmcp/plugin-cache

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

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

Source
npmnpm
Version
1.0.4
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 08 Apr 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