# Verify a Credential

Follow these instructions to Verify a Credential from your MCP Client (e.g. Claude Desktop) using the MCP Toolkit.

> ⚠️ **Before you begin...**
>
> Make sure you have configured the [MCP Client as per the setup instructions](/product/getting-started/ai-agents/trust-registry/setup-mcp.md#getting-started) and [issued a Credential](/product/getting-started/ai-agents/trust-registry/setup-mcp/advanced/issue-credential.md) from the same MCP Client.

## Step 1: Create Connection between Holder and Claude Desktop.

If the connection was disrupted, [create a new connection](/product/getting-started/ai-agents/trust-registry/setup-mcp/advanced/issue-credential.md#step-2-create-connection-between-holder-and-claude-desktop) between the Holder and Claude Desktop.

## Step 2: Ask Claude to issue a Proof Request

Ask Claude to issue a proof request with some conditions based on the attributes of your credential.&#x20;

For this tutorial, we asked Claude to generate a proof request with **score > 50**.

<figure><img src="/files/rcxhoPHzu1lxvYBBL3nv" alt=""><figcaption></figcaption></figure>

## Step 3: Holder checks Request and sends Proof

The next steps are at the Holder Agent side to accept the proof request and send the response. It can be simulated by running the following APIs in sequence from the Holder API at <http://localhost:4001/api/doc> or Postman.

{% openapi src="/files/VIzToYXSCuPwCrpBbLYU" path="/present-proof-2.0/records" method="get" %}
[swagger.json](https://3569764573-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FPVAMvpKH7PYzvXA6u6Cn%2Fuploads%2F6otKdslTxD5vA4zstkSG%2Fswagger.json?alt=media\&token=4be3b6bb-f452-4d59-b61c-c6dc0e597b74)
{% endopenapi %}

**Parameters**

To narrow down the latest proof request, pass the following parameters

<details>

<summary>limit</summary>

Set this to 10.

</details>

<details>

<summary>offset</summary>

set this to 0.

</details>

<details>

<summary>state</summary>

Set this to "request-received"

</details>

Copy and save the `pres_ex_id` and the proof request `by_format.pres_request.anoncreds` from the response.

{% openapi src="/files/VIzToYXSCuPwCrpBbLYU" path="/present-proof-2.0/records/{pres\_ex\_id}/credentials" method="get" %}
[swagger.json](https://3569764573-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FPVAMvpKH7PYzvXA6u6Cn%2Fuploads%2F6otKdslTxD5vA4zstkSG%2Fswagger.json?alt=media\&token=4be3b6bb-f452-4d59-b61c-c6dc0e597b74)
{% endopenapi %}

Fetch the relevant credentials and then create a proof response. Send the proof response by calling the below API.

{% openapi src="/files/VIzToYXSCuPwCrpBbLYU" path="/present-proof-2.0/records/{pres\_ex\_id}/send-presentation" method="post" %}
[swagger.json](https://3569764573-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FPVAMvpKH7PYzvXA6u6Cn%2Fuploads%2F6otKdslTxD5vA4zstkSG%2Fswagger.json?alt=media\&token=4be3b6bb-f452-4d59-b61c-c6dc0e597b74)
{% endopenapi %}

**Request Body**

For this tutorial, as the credential is AnonCreds, we are sending an AnonCreds proof in the body. The values will be based on the presentation request and the credentials retrieved in the previous two steps.

```json
{
    "anoncreds": {
        "requested_attributes": <<requestedAttributes>>,
        "requested_predicates": <<requestedPredicates>>,
        "self_attested_attributes": {}
}
```

## Step 4: Ask Claude to validate the Presentation Response

Finally, you can ask Claude to check the status of the Proof Request with the following prompt.

> "Can you check the status of the proof request?"

Claude should get the latest status and summarise if the verification result was true or false.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.cheqd.io/product/getting-started/ai-agents/trust-registry/setup-mcp/advanced/verify-credential.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
