# SSL issue when connecting MCP with elastic search for ibm cloud

**URL:** https://discuss.elastic.co/t/ssl-issue-when-connecting-mcp-with-elastic-search-for-ibm-cloud/381794
**Category:** Elasticsearch
**Created:** [September 9, 2025, 11:34am UTC](https://discuss.elastic.co/t/ssl-issue-when-connecting-mcp-with-elastic-search-for-ibm-cloud/381794 "2025-09-09T11:34:15Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![ravitejavemula333](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/ravitejavemula333/32/138623_2.png) [@ravitejavemula333](https://discuss.elastic.co/u/ravitejavemula333)
#### Post date: [September 9, 2025, 11:34am UTC](https://discuss.elastic.co/t/ssl-issue-when-connecting-mcp-with-elastic-search-for-ibm-cloud/381794/1 "2025-09-09T11:34:15Z")

</div>

Hi team, I am following below link to setup mcp server for Elasticsearch

> **[How to build an MCP server with Elasticsearch - Elasticsearch Labs](https://www.elastic.co/search-labs/blog/how-to-build-mcp-server)**
>
> Learn learn how to build an MCP server using FastMCP and Elasticsearch to manage and search data.

I use Databases for Elasticsearch from IBm cloud.  
i have given below code :

```auto
client = AsyncElasticsearch(

```

```auto
        [MCP_ELASTIC_URL], 

```

```auto
ca_certs=f"./certificates/elastic_production.pem", # Use the renamed file

```

```auto
basic_auth=("elastic", MCP_ELASTIC_PASSWORD)

```

```auto
    )

```

But getting below error when i check this on mcp dev portal

`[SSLCertVerificationError: (1, '[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: Basic Constraints of CA cert not marked critical`  
In ibm cloud elastic databases we have endpoint lik this :

`https://$USERNAME:$PASSWORD@xxxxxxx.databases.appdomain.cloud``:PORT`

I am able to connect with same code in python code but not using mcp dev portal
