# Google ADK

Attach the Gnesi MCP server to a Google ADK agent with a bearer credential.

Google Agent Development Kit loads Gnesi through its MCP toolset. There is no Gnesi package to install.

Install ADK with the MCP extra:

```bash
pip install "google-adk[mcp]"
```

TypeScript:

```bash
npm install @google/adk
```

Set `GNESI_CREDENTIAL` to the agent credential from Settings, Agent access.

## Python

```python
import os

from google.adk.agents import Agent
from google.adk.tools.mcp_tool import McpToolset
from google.adk.tools.mcp_tool.mcp_session_manager import StreamableHTTPConnectionParams

root_agent = Agent(
    model="gemini-2.5-pro",
    name="gnesi_agent",
    instruction="Read and send this person's Gnesi conversations. Wait when a message is in Needs you.",
    tools=[
        McpToolset(
            connection_params=StreamableHTTPConnectionParams(
                url="https://api.gnesi.io/api/mcp",
                headers={"Authorization": f"Bearer {os.environ['GNESI_CREDENTIAL']}"},
            ),
        )
    ],
)
```

## TypeScript

```typescript
import { LlmAgent, MCPToolset } from "@google/adk";

const rootAgent = new LlmAgent({
  model: "gemini-2.5-pro",
  name: "gnesi_agent",
  instruction: "Read and send this person's Gnesi conversations. Wait when a message is in Needs you.",
  tools: [
    new MCPToolset({
      type: "StreamableHTTPConnectionParams",
      url: "https://api.gnesi.io/api/mcp",
      transportOptions: {
        requestInit: {
          headers: { Authorization: `Bearer ${process.env.GNESI_CREDENTIAL}` },
        },
      },
    }),
  ],
});

export { rootAgent };
```

`McpToolset` reads the live tool list from the server. Names and arguments are on [MCP](/api/mcp).
