---
title: "listWorkspaceMCPServers"
---

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

# listWorkspaceMCPServers

Path: agenthold API › tools

`GET /workspaces/{workspaceId}/mcp-servers`

URL: `/api/v1/workspaces/{workspaceId}/mcp-servers`

## Authentication

Requires one of the following:

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

## Path parameters

- `workspaceId` (`listWorkspaceMCPServers.path.workspaceId`; string, required)

## Code samples

### cURL

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

### TypeScript

```typescript
const url = '<base-url>/api/v1/workspaces/<workspaceId>/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/workspaces/<workspaceId>/mcp-servers"

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

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

print(response.text)
```

## Responses

### 200

Workspace-level MCP servers (attachable to agents).

#### 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` (`listWorkspaceMCPServers.response.200.name`; string, required) — Letters, digits, dashes and underscores.
- `transport` (`listWorkspaceMCPServers.response.200.transport`; string, required)
  - one of `"stdio"`, `"http"`
- `command` (`listWorkspaceMCPServers.response.200.command`; string, required) — stdio only; runs inside the sandbox.
- `args` (`listWorkspaceMCPServers.response.200.args`; array of string, required)
- `env` (`listWorkspaceMCPServers.response.200.env`; map of string, required) — stdio only. Values may reference secrets as {{secret:NAME}}.
- `url` (`listWorkspaceMCPServers.response.200.url`; string, required) — http only.
- `headers` (`listWorkspaceMCPServers.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` (`listWorkspaceMCPServers.response.200.id`; string, required)
- `workspaceId` (`listWorkspaceMCPServers.response.200.workspaceId`; string, required)
- `scope` (`listWorkspaceMCPServers.response.200.scope`; string, required)
  - one of `"workspace"`, `"agent"`
- `secretRefs` (`listWorkspaceMCPServers.response.200.secretRefs`; array of string, required)
- `createdAt` (`listWorkspaceMCPServers.response.200.createdAt`; string, required)
  - format: `date-time`
- `updatedAt` (`listWorkspaceMCPServers.response.200.updatedAt`; string, required)
  - format: `date-time`
- `agentId` (`listWorkspaceMCPServers.response.200.agentId`; string, optional)

### 404

Error.

#### Example

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

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


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