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 and issued a Credential from the same MCP Client.
Step 1: Create Connection between Holder and Claude Desktop.
If the connection was disrupted, create a new connection 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.

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.
Connection identifier
{"value":"3fa85f64-5717-4562-b3fc-2c963f66afa6"}Number of results to return
{"value":50}Offset for pagination
{"value":0}Role assigned in presentation exchange
Presentation exchange state
Thread identifier
{"value":"3fa85f64-5717-4562-b3fc-2c963f66afa6"}Parameters
To narrow down the latest proof request, pass the following parameters
Copy and save the pres_ex_id and the proof request by_format.pres_request.anoncreds from the response.
Presentation exchange identifier
{"value":"3fa85f64-5717-4562-b3fc-2c963f66afa6"}Pattern: [a-fA-F0-9]{8}-[a-fA-F0-9]{4}-4[a-fA-F0-9]{3}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}Maximum number to retrieve
{"value":"1"}Pattern: ^[1-9][0-9]*$(JSON) object mapping referents to extra WQL queries
{"value":"{\"0_drink_uuid\": {\"attr::drink::value\": \"martini\"}}"}Pattern: ^{\s*".*?"\s*:\s*{.*?}\s*(,\s*".*?"\s*:\s*{.*?}\s*)*\s*}$Proof request referents of interest, comma-separated
{"value":"1_name_uuid,2_score_uuid"}Start index
{"value":"0"}Pattern: ^[0-9]*$Fetch the relevant credentials and then create a proof response. Send the proof response by calling the below API.
Presentation exchange identifier
{"value":"3fa85f64-5717-4562-b3fc-2c963f66afa6"}Pattern: [a-fA-F0-9]{8}-[a-fA-F0-9]{4}-4[a-fA-F0-9]{3}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}Whether to remove the presentation exchange record on completion (overrides --preserve-exchange-records configuration setting)
Record trace information, based on agent configuration
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.
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.
Last updated
Was this helpful?