---
title: "listAgentMCPServers"
---

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

# listAgentMCPServers

Path: agenthold API › tools

`GET /agents/{agentId}/mcp-servers`

URL: `/api/v1/agents/{agentId}/mcp-servers`

The agent's own servers and attached workspace servers.

## Authentication

Requires one of the following:

- `session`, apiKey, in cookie
- `token`, http bearer, header `Authorization`

## Path parameters

- `agentId` (`listAgentMCPServers.path.agentId`; string, required)

## Code samples

### cURL

```bash
curl --request GET \
  --url '<base-url>/api/v1/agents/<agentId>/mcp-servers' \
  --cookie 'agenthold_session=<agenthold_session>'
```

### TypeScript

```typescript
const url = '<base-url>/api/v1/agents/<agentId>/mcp-servers';
const options = {
  method: 'GET',
  headers: {cookie: 'agenthold_session=<agenthold_session>'}
};

fetch(url, options)
  .then(res => res.json())
  .then(json => console.log(json))
  .catch(err => console.error(err));
```

### Python

```python
import requests

url = "<base-url>/api/v1/agents/<agentId>/mcp-servers"

headers = {"cookie": "agenthold_session=<agenthold_session>"}

response = requests.get(url, headers=headers)

print(response.text)
```

## Responses

### 200

MCP servers used by the agent.

#### Example

```json
[
  {
    "name": "string",
    "transport": "stdio",
    "command": "string",
    "args": [
      "string"
    ],
    "env": {
      "property1": "string",
      "property2": "string"
    },
    "url": "string",
    "headers": {
      "property1": "string",
      "property2": "string"
    },
    "id": "string",
    "workspaceId": "string",
    "scope": "workspace",
    "agentId": "string",
    "secretRefs": [
      "string"
    ],
    "createdAt": "2019-08-24T14:15:22Z",
    "updatedAt": "2019-08-24T14:15:22Z"
  }
]
```

- `name` (`listAgentMCPServers.response.200.name`; string, required) — Letters, digits, dashes and underscores.
- `transport` (`listAgentMCPServers.response.200.transport`; string, required)
  - one of `"stdio"`, `"http"`
- `command` (`listAgentMCPServers.response.200.command`; string, required) — stdio only; runs inside the sandbox.
- `args` (`listAgentMCPServers.response.200.args`; array of string, required)
- `env` (`listAgentMCPServers.response.200.env`; map of string, required) — stdio only. Values may reference secrets as {{secret:NAME}}.
- `url` (`listAgentMCPServers.response.200.url`; string, required) — http only.
- `headers` (`listAgentMCPServers.response.200.headers`; map of string, required) — http only. Values may reference secrets as {{secret:NAME}}; the sandbox sees a placeholder and the egress proxy injects the value.
- `id` (`listAgentMCPServers.response.200.id`; string, required)
- `workspaceId` (`listAgentMCPServers.response.200.workspaceId`; string, required)
- `scope` (`listAgentMCPServers.response.200.scope`; string, required)
  - one of `"workspace"`, `"agent"`
- `secretRefs` (`listAgentMCPServers.response.200.secretRefs`; array of string, required)
- `createdAt` (`listAgentMCPServers.response.200.createdAt`; string, required)
  - format: `date-time`
- `updatedAt` (`listAgentMCPServers.response.200.updatedAt`; string, required)
  - format: `date-time`
- `agentId` (`listAgentMCPServers.response.200.agentId`; string, optional)

### 404

Error.

#### Example

```json
{
  "error": "string"
}
```

- `error` (`listAgentMCPServers.response.404.error`; string, required)


Source: https://agenthold.dev/api/list-agent-mcp-servers/index.md
