MCP Resources & Prompts
Expose platform configuration, Prisma data model schemas, and a fintech knowledge base as MCP resources. Pre-built prompts enable structured financial analysis, portfolio summaries, and KYC diagnostics with a single call.
Overview
The Y.A.N.I. MCP Server provides 3 resources and 3 prompts alongside its 37 tools. Resources expose read-only data that LLMs can consume as context, while prompts are pre-built instruction templates that orchestrate multiple tool calls into structured workflows.
3 Resources
Contextual data exposed via MCP resource URIs: platform configuration, Prisma model schemas (15 models), and a fintech knowledge base (4 skills).
3 Prompts
Structured analysis templates that instruct the LLM to call multiple tools and produce formatted reports: financial analysis, portfolio summary, and KYC diagnostic.
Resources
MCP resources are read-only data sources exposed via custom URI schemes. The LLM client can read them to populate context before processing user requests. Resources can be static (fixed URI) or dynamic (URI templates with parameters).
yani://config— Platform Configuration
Static Resource
Returns the full YaniPay platform configuration including version, enabled features, operational limits, supported wallet types, KYC statuses, and blockchain networks.
| Field | Type | Description |
|---|---|---|
| version | string | Server version (semver) |
| features | string[] | Enabled platform features |
| limits | object | Operational limits (wallets, transactions, rate) |
| walletTypes | string[] | Supported wallet types |
| kycStatuses | string[] | Possible KYC status values |
| supportedChains | string[] | Supported blockchain networks |
{
"version": "1.2.0",
"platform": "YaniPay",
"features": [
"multi-wallet",
"loyalty-programs",
"kyc-verification",
"crypto-wallets",
"referral-system",
"tts-summary",
"smart-cards",
"defi-staking"
],
"limits": {
"maxWalletsPerUser": 10,
"maxTransactionsPerQuery": 100,
"maxLoyaltyCardsPerUser": 50,
"rateLimit": "100 req/min/IP"
},
"walletTypes": ["EUROS", "EUROS_SAVINGS", "YANI_COIN", "BITCOIN"],
"kycStatuses": ["PENDING", "IN_REVIEW", "VALIDATED", "REJECTED", "EXPIRED"],
"supportedChains": ["YaniChain", "Ethereum", "Polygon", "BSC"]
}yani://models/{model}— Prisma Data Models
Dynamic Template Resource
Describes YaniPay Prisma data models including their fields and relations. Supports list (returns all 15 model URIs) and complete (autocomplete model names as you type).
15 Available Models
{
"name": "user",
"fields": [
"id",
"email",
"name",
"firstName",
"lastName",
"role",
"kycStatus",
"createdAt"
],
"relations": [
"wallets",
"transactions",
"loyaltyCards",
"kycSubmissions"
]
}{
"name": "wallet",
"fields": [
"id",
"userId",
"type",
"balance",
"lockedBalance",
"pendingBalance",
"reservedBalance",
"isActive",
"assetSymbol"
],
"relations": [
"user",
"transactions"
]
}{
"error": "Model 'unknown' not found",
"available": [
"user", "wallet", "transaction", "store",
"loyaltyProgram", "loyaltyCard", "paymentCard",
"kycSubmission", "kycDocument", "cryptoWallet",
"cryptoAsset", "externalWallet", "referralProgram",
"referralLink", "referralConversion"
]
}yani://knowledge/{skill}— Knowledge Base
Dynamic Template Resource
Returns raw Markdown content from the Y.A.N.I. knowledge base for a given skill domain. Content is loaded from reference files via loadReferences() in knowledge/loader.ts. Each skill aggregates multiple reference documents covering French fintech regulation, DOM fiscal specifics, and competitive analysis.
4 Skill Domains
financial
Fiscalite, epargne, crypto, investissement
loyalty
Programmes fidelite, cashback, gamification
identity
KYC, RGPD, ZKP, biometrie, verification
banking
Neobanques, BaaS, TPE, comparatif PSAN
# fiscalite-dom.md
## Fiscalite dans les DOM-TOM
Les departements d'Outre-mer beneficient de dispositifs fiscaux specifiques:
- Abattement de 30% (Guadeloupe, Martinique, Reunion)
- Abattement de 40% (Guyane, Mayotte)
- Reduction d'impot pour investissements productifs (Girardin)
...
---
# epargne-strategies.md
## Strategies d'epargne pour residents DOM
1. Livret A (plafond 22,950 EUR, exonere)
2. PEL (Plan Epargne Logement) - avantages DOM
3. Assurance-vie en unites de compte
...Prompts
MCP prompts are reusable instruction templates that the client presents to the LLM. Each prompt accepts structured input parameters, instructs the LLM to call specific Y.A.N.I. tools, and specifies the exact format for the output report. This enables complex multi-step analyses with a single prompt invocation.
analyse_financiere_utilisateur
Complete Financial Analysis
Performs a full financial health assessment for a YaniPay user, producing a structured report with a health score out of 100.
Input Schema
email: string (email format, required)
Tool Calls (5 steps)
yani_get_balance— Wallet balances (EUR, YANI, BTC)yani_get_transactions— Last 50 transactions with statsyani_get_payment_cards— Physical and virtual cardsyani_get_crypto_wallets— Internal + external crypto walletsyani_get_loyalty_cards— Loyalty programs and points
Output Format
- Score de sante financiere /100 (based on diversification, savings, cash flow)
- Resume patrimoine: total EUR + crypto + loyalty points
- Analyse des flux: income/expense ratio, regularity, trend
- Diversification: allocation by asset type
- Points d'attention: risks, concentrations, expired cards
- Recommandations: 3 concrete actions to improve financial health
{
"name": "analyse_financiere_utilisateur",
"description": "Analyse financiere complete d'un utilisateur YaniPay avec score de sante /100",
"arguments": [
{
"name": "email",
"type": "string",
"description": "Email de l'utilisateur a analyser",
"required": true
}
]
}resume_portefeuille
Quick Portfolio Summary
Generates a concise 5-line portfolio summary for a user, covering EUR balances, crypto positions, recent activity, and alerts.
Input Schema
email: string (email format, required)
Tool Calls (3 steps)
yani_get_balance— All wallet balancesyani_get_crypto_wallets— Crypto portfolioyani_get_transactions— Last 5 transactions
Output Format (exactly 5 lines)
- Line 1: Total EUR balance (available + savings)
- Line 2: Crypto portfolio (number of assets + total USD value)
- Line 3: Last transaction (date, type, amount)
- Line 4: Trend over last 5 transactions (positive/negative/stable)
- Line 5: Alert if a wallet is inactive or has negative balance
{
"name": "resume_portefeuille",
"description": "Resume rapide du portefeuille d'un utilisateur en 5 lignes",
"arguments": [
{
"name": "email",
"type": "string",
"description": "Email de l'utilisateur",
"required": true
}
]
}diagnostic_kyc
KYC Diagnostic
Performs a complete KYC diagnostic including ACPR/AMF compliance assessment, missing document detection, and corrective action plan with estimated completion time.
Input Schema
email: string (email format, required)
Tool Calls (2 steps)
yani_get_kyc_status— KYC submissions and documentsyani_identity_advice— Regulatory recommendations
Output Format
- Statut global KYC: VERIFIED / PENDING / INCOMPLETE / REJECTED
- Documents soumis: list with individual status
- Conformite: ACPR/AMF compliance (required documents)
- Documents manquants: list of still-required documents
- Actions correctives: precise steps to complete/fix KYC
- Delai estime: estimated validation time if actions are taken
{
"name": "diagnostic_kyc",
"description": "Diagnostic KYC complet avec conformite et actions correctives",
"arguments": [
{
"name": "email",
"type": "string",
"description": "Email de l'utilisateur",
"required": true
}
]
}Using Resources
MCP resources are read using the resources/read method. Dynamic templates require parameter substitution in the URI. Here are examples for each transport.
import { Client } from '@modelcontextprotocol/sdk/client/index.js';
// Read static config resource
const configResult = await client.readResource({
uri: 'yani://config',
});
const config = JSON.parse(configResult.contents[0].text);
console.log('Platform version:', config.version);
console.log('Features:', config.features.join(', '));
// Read a specific model schema
const userModel = await client.readResource({
uri: 'yani://models/user',
});
const schema = JSON.parse(userModel.contents[0].text);
console.log('User fields:', schema.fields);
console.log('User relations:', schema.relations);
// List all available models
const modelList = await client.listResources();
console.log('Available models:', modelList.resources.map(r => r.name));
// Read knowledge base for a skill
const financialKB = await client.readResource({
uri: 'yani://knowledge/financial',
});
console.log('Financial knowledge:', financialKB.contents[0].text);# Read platform config
curl -X POST http://localhost:3101/resources/read \
-H "Content-Type: application/json" \
-H "X-API-Key: your-api-key" \
-d '{"uri": "yani://config"}'
# Read user model schema
curl -X POST http://localhost:3101/resources/read \
-H "Content-Type: application/json" \
-H "X-API-Key: your-api-key" \
-d '{"uri": "yani://models/user"}'
# Read financial knowledge base
curl -X POST http://localhost:3101/resources/read \
-H "Content-Type: application/json" \
-H "X-API-Key: your-api-key" \
-d '{"uri": "yani://knowledge/financial"}'
# List all available resources
curl -X POST http://localhost:3101/resources/list \
-H "Content-Type: application/json" \
-H "X-API-Key: your-api-key"from mcp import ClientSession
import json
async with ClientSession(transport) as session:
# List all resources
resources = await session.list_resources()
for r in resources:
print(f" {r.uri} - {r.name}")
# Read platform config
config_result = await session.read_resource("yani://config")
config = json.loads(config_result.contents[0].text)
print(f"Version: {config['version']}")
print(f"Wallet types: {config['walletTypes']}")
# Read model schema with autocomplete
completions = await session.complete_resource(
"yani://models/",
argument="model",
value="ky" # Returns: ["kycSubmission", "kycDocument"]
)
print(f"Matching models: {completions}")
# Read knowledge base
kb = await session.read_resource("yani://knowledge/banking")
print(kb.contents[0].text[:500]) # First 500 charsUsing Prompts
MCP prompts are invoked using the prompts/get method. The client passes the required arguments, and the server returns a structured message that the LLM processes to produce the analysis. The LLM will then call the specified tools automatically and format the results.
import { Client } from '@modelcontextprotocol/sdk/client/index.js';
// List available prompts
const prompts = await client.listPrompts();
prompts.forEach(p => console.log(` ${p.name}: ${p.description}`));
// Invoke financial analysis prompt
const analysisResult = await client.getPrompt({
name: 'analyse_financiere_utilisateur',
arguments: {
email: 'johan@yanipay.com',
},
});
// The result contains messages to send to the LLM
// The LLM will call the 5 tools and produce the report
console.log('Prompt messages:', analysisResult.messages);
// Invoke portfolio summary
const portfolioResult = await client.getPrompt({
name: 'resume_portefeuille',
arguments: {
email: 'johan@yanipay.com',
},
});
// Invoke KYC diagnostic
const kycResult = await client.getPrompt({
name: 'diagnostic_kyc',
arguments: {
email: 'johan@yanipay.com',
},
});# List available prompts
curl -X POST http://localhost:3101/prompts/list \
-H "Content-Type: application/json" \
-H "X-API-Key: your-api-key"
# Get financial analysis prompt
curl -X POST http://localhost:3101/prompts/get \
-H "Content-Type: application/json" \
-H "X-API-Key: your-api-key" \
-d '{
"name": "analyse_financiere_utilisateur",
"arguments": {
"email": "johan@yanipay.com"
}
}'
# Get portfolio summary prompt
curl -X POST http://localhost:3101/prompts/get \
-H "Content-Type: application/json" \
-H "X-API-Key: your-api-key" \
-d '{
"name": "resume_portefeuille",
"arguments": {
"email": "johan@yanipay.com"
}
}'
# Get KYC diagnostic prompt
curl -X POST http://localhost:3101/prompts/get \
-H "Content-Type: application/json" \
-H "X-API-Key: your-api-key" \
-d '{
"name": "diagnostic_kyc",
"arguments": {
"email": "johan@yanipay.com"
}
}'How Prompts Work
Prompts do not execute tools directly. They return a structured message that instructs the LLM what tools to call and how to format the output. The LLM client is responsible for executing the tool calls and assembling the final report. This means prompts work with any LLM that supports the MCP protocol.
Client MCP Server LLM
| | |
|-- prompts/get -------->| |
| { name, args } | |
| | |
|<-- messages[] ---------| |
| (instructions) | |
| | |
|-- send messages -------------------------------->|
| | |
| |<-- tools/call -------|
| | yani_get_balance |
| |-- result ----------->|
| | |
| |<-- tools/call -------|
| | yani_get_transactions
| |-- result ----------->|
| | |
| | ... (more calls) |
| | |
|<-- formatted report ----------------------------|
| (health score, | |
| recommendations) | |Next Steps
Tools Reference
Complete documentation for all 37 tools with input schemas and examples
Integration Guide
Step-by-step guide for Claude Code, HTTP, REST, and custom clients
Security & Auth
API key authentication, rate limiting, and data sanitization
MCP Overview
Architecture, transports, use cases, and quick start guide