> ## Documentation Index
> Fetch the complete documentation index at: https://docs.agentfront.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# Adapter Generator

> Generate an @Adapter class extending DynamicAdapter

Generates an `@Adapter` class that dynamically provides tools, resources, and prompts from external sources.

## Usage

```bash theme={"theme":{"light":"snazzy-light","dark":"dark-plus"}}
nx g @frontmcp/nx:adapter github --project crm
```

## Options

| 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/` |

## Generated Code

```ts theme={"theme":{"light":"snazzy-light","dark":"dark-plus"}}
import { Adapter, DynamicAdapter, type FrontMcpAdapterResponse } 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> {
  options: { name: string } & GithubAdapterOptions;

  constructor(options: { name: string } & GithubAdapterOptions) {
    super();
    this.options = options;
  }

  async fetch(): Promise<FrontMcpAdapterResponse> {
    // 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.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.