@Adapter class that dynamically provides tools, resources, and prompts from external sources.
Usage
Options
Generated Code
fetch() method is called at startup. Return arrays of tools, resources, and prompts to dynamically register capabilities.Documentation Index
Fetch the complete documentation index at: /llms.txt
Use this file to discover all available pages before exploring further.
Generate an @Adapter class extending DynamicAdapter
@Adapter class that dynamically provides tools, resources, and prompts from external sources.
nx g @frontmcp/nx:adapter github --project crm
| Option | Type | Default | Description |
|---|---|---|---|
name | string | — | Required. The name of the adapter |
project | string | — | Required. The project to add the adapter to |
directory | string | — | Subdirectory within src/adapters/ |
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: [],
};
}
}
fetch() method is called at startup. Return arrays of tools, resources, and prompts to dynamically register capabilities.