> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://docs.phonic.co/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://docs.phonic.co/_mcp/server.

# List

GET https://api.phonic.ai/v1/mcp_servers

Returns all MCP servers in a project.

Reference: https://docs.phonic.co/api-reference/mcp-servers/list

## Authentication

- `Authorization` header (bearer token, required) — Bearer authentication header of the form `Bearer <PHONIC_API_KEY>`. Manage your API keys [here](https://phonic.co/api-keys).

## Request

### Query parameters

- `project` (string, optional, default: main) — The name of the project to list MCP servers for.

## Response

### 200

Success response

- `mcp_servers` (list of McpServer, required)

## Errors

### 404 Not Found Error

Project not found

- `error` (BasicErrorError, optional)

### 500 Internal Server Error

Internal server error

- `error` (BasicErrorError, optional)

## Types

### McpServer

A customer-hosted MCP server whose tools can be made available to agents.

- `id` (string, required) — The ID of the MCP server.
- `project` (McpServerProject, required)
- `name` (string, required) — The name of the MCP server.
- `url` (string, required) — The URL of the MCP server.
- `header_names` (list of string, required) — Names of the headers sent to the MCP server. Header values are write-only and never returned.
- `tools` (list of McpServerTool, required) — Tools listed by the MCP server when it was created.

### BasicErrorError

- `message` (string, required) — Error message
- `code` (string, optional) — Error code

### McpServerProject

- `id` (string, required) — The ID of the project containing the MCP server.
- `name` (string, required) — The name of the project containing the MCP server.

### McpServerTool

A tool listed by an MCP server.

- `name` (string, required) — The name of the tool on the MCP server.
- `description` (string, required) — The description of the tool.
- `parameters` (McpServerToolParameters, required) — JSON Schema describing the tool's arguments.

### McpServerToolParameters

JSON Schema describing the tool's arguments.

- `type` (enum, required)
  - Allowed values: `object`
- `properties` (map from string to any, required)
- `required` (list of string, required)
- `additionalProperties` (boolean, required)

## Examples

**Response**

```json
{
  "mcp_servers": [
    {
      "id": "mcp_server_3f8b2c1d-6a4e-4b7f-9c2d-1e5a7b9c0d2f",
      "project": {
        "id": "proj_ad0334f1-2487-4155-9df3-abd8129b29ad",
        "name": "main"
      },
      "name": "crm_server",
      "url": "https://mcp.example.com/mcp",
      "header_names": [
        "Authorization"
      ],
      "tools": [
        {
          "name": "lookup_customer",
          "description": "Looks up a customer by phone number.",
          "parameters": {
            "type": "object",
            "properties": {
              "phone_number": {
                "type": "string",
                "description": "The customer's phone number."
              }
            },
            "required": [
              "phone_number"
            ],
            "additionalProperties": false
          }
        }
      ]
    }
  ]
}
```

**SDK Code**

```python List of MCP servers
import requests

url = "https://api.phonic.ai/v1/mcp_servers"

querystring = {"project":"main"}

headers = {"Authorization": "Bearer <apiKey>"}

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

print(response.json())
```

```javascript List of MCP servers
const url = 'https://api.phonic.ai/v1/mcp_servers?project=main';
const options = {method: 'GET', headers: {Authorization: 'Bearer <apiKey>'}};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
```

```go List of MCP servers
package main

import (
	"fmt"
	"net/http"
	"io"
)

func main() {

	url := "https://api.phonic.ai/v1/mcp_servers?project=main"

	req, _ := http.NewRequest("GET", url, nil)

	req.Header.Add("Authorization", "Bearer <apiKey>")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}
```

```ruby List of MCP servers
require 'uri'
require 'net/http'

url = URI("https://api.phonic.ai/v1/mcp_servers?project=main")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <apiKey>'

response = http.request(request)
puts response.read_body
```

```java List of MCP servers
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.get("https://api.phonic.ai/v1/mcp_servers?project=main")
  .header("Authorization", "Bearer <apiKey>")
  .asString();
```

```php List of MCP servers
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('GET', 'https://api.phonic.ai/v1/mcp_servers?project=main', [
  'headers' => [
    'Authorization' => 'Bearer <apiKey>',
  ],
]);

echo $response->getBody();
```

```csharp List of MCP servers
using RestSharp;

var client = new RestClient("https://api.phonic.ai/v1/mcp_servers?project=main");
var request = new RestRequest(Method.GET);
request.AddHeader("Authorization", "Bearer <apiKey>");
IRestResponse response = client.Execute(request);
```

```swift List of MCP servers
import Foundation

let headers = ["Authorization": "Bearer <apiKey>"]

let request = NSMutableURLRequest(url: NSURL(string: "https://api.phonic.ai/v1/mcp_servers?project=main")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "GET"
request.allHTTPHeaderFields = headers

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
  if (error != nil) {
    print(error as Any)
  } else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
  }
})

dataTask.resume()
```