> For the complete documentation index, see [llms.txt](https://docs.cheqd.io/product/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.cheqd.io/product/getting-started/ai-agents/trust-registry/setup-mcp/advanced/verify-credential.md).

# Verify a Credential

Tutorial: Verify a Credential using MCP Toolkit

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.

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

<figure><img src="https://3569764573-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FPVAMvpKH7PYzvXA6u6Cn%2Fuploads%2Fgit-blob-58817a271360b3d4d6adf373047f7ee5f654bbe0%2FScreenshot%202025-04-02%20at%2014.08.05.png?alt=media" 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
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

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

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

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

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

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.
