Custom Directories

Customize where xmcp looks for tools, prompts, and resources.

For the complete documentation index, see llms.txt. Markdown variants of every page are available by appending .md to the URL.

Customize where xmcp looks for tools, prompts, and resources by configuring the paths option. If not specified, these are the defaults:

xmcp.config.ts
const config: XmcpConfig = {
  paths: {
    tools: "src/tools",
    prompts: "src/prompts",
    resources: "src/resources",
  },
};

export default config;

Disabling directories

To disable a specific directory, set it to false:

xmcp.config.ts
const config: XmcpConfig = {
  paths: {
    tools: "src/tools",
    prompts: false, // Prompts directory disabled
    resources: "src/resources",
  },
};

export default config;

Troubleshooting

If you delete a directory without updating the config, xmcp will throw an error and prompt you to update it.