Use Lean docs with AI and MCP
Connect your AI development tool to Lean's documentation to find integration guidance, explore API references and generate code informed by the UAE V3 guides.
The Model Context Protocol (MCP) lets AI tools access external sources. Lean's documentation MCP gives your tool a way to retrieve documentation while helping you build.
1. Select the UAE V3 documentation
Use this server URL:
https://docs.leantech.me/mcp?branch=v3.0-UAEThe branch parameter selects the UAE V3 documentation. Keep it in the URL so your tool uses the relevant guides and API references.
The documentation version does not determine the version in every API path. Use each endpoint's documented path.
2. Connect your AI tool
Cursor
Add the following entry to ~/.cursor/mcp.json. If the file already contains other servers, add lean-documentation to the existing mcpServers object.
{
"mcpServers": {
"lean-documentation": {
"url": "https://docs.leantech.me/mcp?branch=v3.0-UAE"
}
}
}Claude Code
Run:
claude mcp add --transport http lean-documentation \
"https://docs.leantech.me/mcp?branch=v3.0-UAE"Other MCP-compatible tools
If your tool supports remote HTTP MCP servers, add a server with these settings:
| Setting | Value |
|---|---|
| Name | lean-documentation |
| Server URL | https://docs.leantech.me/mcp?branch=v3.0-UAE |
Follow your tool's instructions to enable the connection.
3. Verify the connection
Check that your tool shows the server as connected, then start a conversation and ask:
Use the Lean documentation MCP to find the UAE V3 authentication
guide and token API reference. Explain the difference between
API-scoped and customer-scoped tokens, and link to the sources.Confirm that the tool retrieves documentation through the MCP connection and provides relevant source links. A general answer about Lean alone does not confirm that the connection works.
If it cannot retrieve documentation, check that the server is enabled and the URL includes ?branch=v3.0-UAE.
4. Use integration prompts
Give your tool the product, market, documentation version and programming language or framework. Ask it to retrieve the relevant documentation before writing code.
Build a one-time payment journey
Using Lean's UAE V3 documentation, help me implement a one-time
payment in [language/framework].
Find the relevant guides and API references first. Cover the
prerequisites, Payment Intent, Link SDK journey, redirects and
webhook handling.
Use Sandbox endpoints and placeholders for credentials. Link
to the sources and flag any missing or conflicting details.Connect a bank and retrieve insights
Using Lean's UAE V3 documentation, explain how to connect a
customer's bank and retrieve income insights.
Cover customer creation, token scopes, consent permissions,
connection events and when insights are ready to retrieve.
Focus on Insights rather than raw-data retrieval.Implement a webhook handler
Using Lean's UAE V3 webhook documentation, help me implement
a handler in [language/framework].
Cover signature verification against the raw request body,
acknowledgement, duplicate handling and recovery from failures.
Check that the documentation specifies every detail needed
for the signature implementation before generating code.Review an integration
Review the following code against Lean's UAE V3 documentation.
Check endpoint paths, authentication, SDK parameters, redirect
handling and interpretation of API responses and webhooks.
Check retry behaviour against each endpoint's documented
idempotency support.
Explain each recommended change and link to its source.
Flag uncertainties instead of assuming behaviour.5. Check generated code before using it
Treat generated code as a starting point for your implementation.
Check that it:
- Uses UAE V3 resources and endpoint contracts.
- Uses the correct environment and token scope.
- Includes the required fields for your product flow.
- Handles asynchronous outcomes through APIs and webhooks.
- Follows the endpoint's retry and idempotency rules.
If the tool finds conflicting documentation, ask it to identify the conflicting sources rather than combine their examples.
Keep credentials and customer information out of prompts. Use placeholders for client secrets, access tokens and webhook secrets.
Test generated code in Sandbox before using it in Production.
Troubleshoot the connection
| Issue | What to check |
|---|---|
| The server does not connect | Check the URL, your tool's remote HTTP MCP support and any network restrictions. |
| The tool answers without retrieving documentation | Explicitly ask it to use the Lean documentation MCP and provide source links. Check whether your tool requires you to approve access to MCP tools. |
| The answer uses another market or version | Check the branch parameter and state “UAE V3” in your prompt. |
| A field, endpoint or behaviour cannot be verified | Ask the tool to flag the gap. Confirm it against the API reference or with Lean Support before using it. |
Next steps
Updated 44 minutes ago
