2 min read
1. Initialize
curl -s -X POST https://hub.credicorp.co.uk/public/v1/mcp \
-H 'Content-Type: application/json' \
-d '{"jsonrpc":"2.0","id":1,"method":"initialize","params":{}}'The result advertises the server's capabilities — see the endpoint reference.
2. List the tools
curl -s -X POST https://hub.credicorp.co.uk/public/v1/mcp \
-H 'Content-Type: application/json' \
-d '{"jsonrpc":"2.0","id":2,"method":"tools/list","params":{}}'You get the six public tools with their input schemas — the catalogue.
3. Call get_quote
curl -s -X POST https://hub.credicorp.co.uk/public/v1/mcp \
-H 'Content-Type: application/json' \
-d '{"jsonrpc":"2.0","id":3,"method":"tools/call",
"params":{"name":"get_quote",
"arguments":{"product":"business_loan","amount":300,"term":30,"frequency":"weekly"}}}'An out-of-range amount or term comes back as a JSON-RPC -32602 — see get_quote. To wrap this into an assistant, see building an application assistant.
Frequently asked questions
Do I need an MCP SDK?
No. MCP is JSON-RPC 2.0 over HTTP, so plain curl or any HTTP client works. An SDK is convenient for a real agent, but the protocol itself is just POSTing JSON.
What does the -32602 error mean?
It is the JSON-RPC invalid-params code. On get_quote it means your amount or term is out of the £50–£500 / 14–84-day range; the detail carries the bound so you can correct and retry.
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.
