Skip to main content
Generates an @Adapter class that dynamically provides tools, resources, and prompts from external sources.

Usage

nx g @frontmcp/nx:adapter github --project crm

Options

OptionTypeDefaultDescription
namestringRequired. The name of the adapter
projectstringRequired. The project to add the adapter to
directorystringSubdirectory within src/adapters/

Generated Code

import { Adapter, DynamicAdapter, type AdapterFetchResult } from '@frontmcp/sdk';

export interface GithubAdapterOptions {
  // TODO: define adapter options
}

@Adapter({
  name: 'github',
  description: 'TODO: describe what this adapter does',
})
export class GithubAdapter extends DynamicAdapter<GithubAdapterOptions> {
  async fetch(): Promise<AdapterFetchResult> {
    // TODO: implement — return tools, resources, and/or prompts
    return {
      tools: [],
      resources: [],
      prompts: [],
    };
  }
}
The fetch() method is called at startup. Return arrays of tools, resources, and prompts to dynamically register capabilities.