Recipe

Initialize an MCP client against Credicorp

Point a standards MCP client at /public/v1/mcp: fetch the server card, initialize, tools/list, then register the tools with your agent. No token for the public server.

2 min read

Server cardGET first
initializeThen session
tools/listRegister

Discover, then initialize

A well-behaved MCP client first reads the server card (a GET) to learn the server's capabilities and protocol version, then opens a session with an initialize call to POST /public/v1/mcp. For the public server there is no auth step; for the partner server the client reads the protected-resource metadata and obtains a token first.

List and register tools

Call tools/list to enumerate the six public tools with their input schemas, and register them with your agent framework so the model can invoke them. The schemas tell the model exactly what arguments each tool needs — for example get_quote's amount and term.

Invoke and ground answers

From there the model calls tools via tools/call and you feed the results back. Instruct the model to answer only from tool output so figures stay accurate — the pattern in the application-assistant recipe. Raw JSON-RPC walkthrough: calling the MCP server.

Frequently asked questions

Do I read the server card before initializing?

It is good practice — the card advertises capabilities and protocol version so your client configures itself correctly. Then initialize opens the session and tools/list enumerates what is callable.

How does a client authenticate to the partner MCP server?

It reads the /.well-known/oauth-protected-resource metadata, obtains an OAuth token with the right scope, and sends it as a bearer header. The public server needs none of this.

Funding for UK limited companies

Credicorp lends to your company, not to you personally — short-term working capital with no personal guarantee. See what your business could access.