# Jam

> Connect Jam to FlyMyAI agents - bug-report context, console logs, network requests, screenshots and transcripts via OAuth.

Connects [Jam](https://jam.dev) to FlyMyAI agents through Jam's official hosted
MCP. Connect your Jam account once via OAuth and the agent can pull rich
bug-report context - reproduction details, console logs, network requests,
screenshots and session transcripts - list jams, members and folders, and
read or create comments. No token to paste.

## What it can do

- Read bug-report details and reproduction steps
- Read console logs, network requests and screenshots captured in a Jam
- Read session transcripts
- List jams, members and folders
- Read and create comments

The exact verbs are discovered from Jam's hosted MCP after you connect, so the
list tracks whatever Jam currently exposes for your account and the scopes you grant.

> The agent is granted **read + write** scopes (`mcp:read`, `mcp:write`) but is
> instructed to **confirm with you before any write** (creating comments or
> updating resources).

## How to get credentials

Jam uses OAuth - there's no token to copy.

1. In FlyMyAI, open the Jam MCP and start the setup flow.
2. A Jam consent screen opens in a new tab. Sign in with the Jam account the
   agent should act as.
3. Review the requested scopes and approve.
4. You're redirected back to FlyMyAI; the tool flips to **Configured**.

Scopes requested: `mcp:read`, `mcp:write`.

To revoke access later, open Jam **Settings -> Connected apps** (or your
workspace's integration settings) and remove the FlyMyAI connection.

## Fields to fill in FlyMyAI

No fields - the OAuth flow stores the tokens automatically. To switch Jam
accounts, remove the tool and connect again with the other account.

## Use it from code

Once Jam is connected (above), call it directly from the SDK - no agent
required. The same connection also works when you attach the tool to an agent
(`tools=[jam.id]`) and let it read bug context inside a run.

```python
from flymyai import AgentClient

client = AgentClient(api_key="fly-***")

# Find your connected Jam tool (or client.tools.create(mcp_tool="jam"))
jam = next(t for t in client.tools.list() if t.mcp_tool == "jam")

# Call any Jam MCP action directly
details = client.tools.call(
    jam.id,
    action="get_jam_details",
    arguments={"jamId": "your-jam-id"},
)
print(details)
```

The exact verbs are discovered from Jam after you connect, so they track
whatever your account and scopes expose. See
[Tools & MCP](https://docs.flymy.ai/agents/concepts/tools.md) for the full `client.tools` API.

## Troubleshooting

- **OAuth denied / `403`** - your Jam role lacks access to the team, or an admin
  restricts third-party apps. Connect with an account that has the needed access.
- **Connected, but some actions are missing** - the available actions are limited by
  the scopes granted at connect time and by your Jam plan. Reconnect to refresh.
- **Session expired** - reconnect Jam in MCP settings; FlyMyAI flags the tool for
  re-authorization when the access grant is revoked or rotated out.

## Links

- [Jam](https://jam.dev)
- [Jam MCP](https://jam.dev/docs/mcp)
