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

# MCP integrations

> How to install and use MCP (Model Context Protocol) integrations with the Guild Agents SDK, including package naming and export conventions.

MCP integrations extend the Guild Agents SDK with tools from external services that expose a [Model Context Protocol](https://modelcontextprotocol.io) server. They are distributed as separate packages and follow different naming conventions from first-party integrations.

## Installation

MCP integration packages are scoped under `@guildai-services` and use the format `<owner>~<name>`:

```bash theme={null}
npm install --save @guildai-services/<owner>~<name>
```

For example, to install the Attio MCP integration:

```bash theme={null}
npm install --save @guildai-services/attio~attio-mcp
```

## Naming conventions

First-party integrations export tools using camelCase (e.g., `gitHubTools`). MCP integrations use PascalCase exports derived from the integration name.

The derivation rules are:

1. Start with the integration name: `attio-mcp`
2. Replace hyphens with underscores: `attio_mcp`
3. Capitalize each word: `AttioMcp`
4. Append `Tools`: `AttioMcpTools`

The underscore form from step 2 is also the tool prefix used in individual tool names (e.g., `attio_mcp_search_records`, `attio_mcp_get_record`).

<Warning>
  MCP integration exports are PascalCase (`AttioMcpTools`), not camelCase (`attioMcpTools`). Using the wrong casing causes an import error at runtime.
</Warning>

## Using an MCP integration

Import the PascalCase export from the package and pass the tools you need to your agent:

```typescript theme={null}
'use agent';
import { agent, pick } from '@guildai/agents-sdk';
import { AttioMcpTools } from '@guildai-services/attio~attio-mcp';

const tools = {
  ...pick(AttioMcpTools, ['attio_mcp_search_records', 'attio_mcp_get_record']),
};

export default agent({
  tools,
  // ...
});
```

Use `pick` to select only the tools your agent requires rather than spreading the full `AttioMcpTools` object. This keeps the tool list minimal and reduces unnecessary permissions.
