अपने पसंदीदा AI टूल से StampMitra पर बनाएँ।
StampMitra और AI के साथ बनाने के सारे तरीक़े: vibe coding टूल के लिए तैयार prompts, AI agents के लिए MCP server, और मशीन-रीडेबल docs। एक चुनें और कॉपी करें।
Vibe coding टूल के लिए prompts
अपना टूल चुनें और बताएँ कि क्या बना रहे हैं। Prompt को हमारे endpoints, auth और response शेप पहले से पता हैं, इसलिए AI को अंदाज़ा नहीं लगाना पड़ता।
Claude prompt
PAN verify करें · 5,128 अक्षरI'm using Claude to build this.
Integrate the StampMitra API (Indian identity verification and e-Stamp Paper) into my app.
API facts (source of truth: https://developer.stampmitra.in/llms.txt)
- Base URL: https://api-b2b.stampmitra.in
- Auth: send "Authorization: Bearer <key>" (or "x-api-key: <key>") on every request
- Requests and responses are JSON. Send Content-Type: application/json on POST.
- Use a SANDBOX key (sk_test_...) while building. Read it from the environment variable STAMPMITRA_API_KEY.
- Never hard-code the key, never expose it to the browser, never log it.
- Call StampMitra only from server-side code. The UI calls my own backend route.
How to build it
- First inspect my project: language, framework, package manager, HTTP client, test runner and folder conventions. Follow them. If the project is empty, ask which stack I want before writing code.
- The official StampMitra SDKs (Node.js, Python, PHP, Java, Go, .NET, Ruby) are pre-release 0.1.0 and not yet published to npm, PyPI, Packagist, Maven Central, the Go module proxy, NuGet or RubyGems, so do not run an install command for them. Call the REST API over HTTPS with the HTTP client my project already uses. Do not install or invent a StampMitra package.
- Put every StampMitra call in ONE small client module. It adds the auth header, applies a 15 second timeout and turns error responses into a typed error with status, code, message and requestId.
- Add STAMPMITRA_API_KEY to .env.example with a placeholder (sk_test_xxx). Fail fast at startup with a clear message if it is missing. Never commit real keys.
Error handling (every error body is { error: { code, message, requestId } })
- 400 BAD_REQUEST: invalid input. Show a field-level message. Do not retry.
- 401 UNAUTHORIZED: key missing or invalid. This is my configuration problem, not the end user's. Show a generic "service unavailable" message, log the requestId, do not retry.
- 402 PAYMENT_REQUIRED: not enough wallet balance (production). Surface it to me as an operational alert, not to the end user.
- 403 FORBIDDEN: the key lacks the required scope or the service is not enabled. Say which scope the endpoint needs.
- 404 NOT_FOUND: wrong id or path. Do not retry.
- 429 TOO_MANY_REQUESTS: rate limit or quota. Retry at most 3 times with exponential backoff and jitter (honour Retry-After if present), then show a friendly "try again shortly" message.
- 5xx / 502 / network timeout: retry reads (GET) up to 2 times. For POST calls retry at most once, then show a friendly message.
- Log requestId and referenceId with every failure. Never log the API key, a full PAN, bank account number or whole response bodies.
TASK: PAN verification form
- Endpoint: POST /v1/verify/pan (scope: verification.pan.read)
- Body: { "pan": "ABCDE1234F", "name": "Rahul Kumar" } // name is optional, max 256 chars
- Sample response: { "referenceId": "SMV-20260927-8F42K7", "valid": true, "registeredName": "RAHUL KUMAR", "panStatus": "VALID", "nameMatchResult": "MATCH", "message": "PAN is Valid" }
- Response fields to use: referenceId, valid, registeredName, panStatus, nameMatchResult, message
Input rules
- Uppercase the PAN and validate /^[A-Z]{5}[0-9]{4}[A-Z]$/ on client and server. A malformed PAN returns 400.
- Trim the name. Send it only if the user entered one.
UI states
- idle, submitting (disable the button, show a spinner), verified, not valid, name mismatch, error.
- "valid": false is still a completed verification. Show "PAN not valid", not a crash.
- If nameMatchResult is not a match, show "Name does not match PAN records" and let the user correct it.
- Mask the PAN after submit (ABCDE••••F).
Data
- Store referenceId, the valid flag and a timestamp with the user record for audit. Do not store more PAN data than the product needs.
Test in Sandbox
- A valid PAN, an invalid-format PAN (expect 400), a PAN with a wrong name, a missing key (expect 401), and a simulated 429 / 5xx path.
How I want you to work:
1. Before writing code, list the files you will create or change and the plan in 5-8 bullets. Then implement without pausing for approval.
2. If the StampMitra MCP server (@stampmitra/mcp-server) is connected, use it to run real sandbox calls and check the response shape before coding against it.
3. Write tests for the API client module and the validation (mock the HTTP layer).
4. At the end, summarise what you changed, how to run it and what I must do manually (add the key, restart the server).
Acceptance checklist:
- Works end to end in Sandbox with the real response fields (no mocked data in the final path)
- No secrets in client code, logs, URLs or git
- Clear loading, empty and error states, including 400, 401, 402, 403, 429 and 5xx
- referenceId (and requestId on failures) is stored or logged for audit
- Inputs are validated on client and server, and sensitive values are masked in the UI
- Tests cover the API client, validation and at least one error path
- A short note on how to run it and how to switch from Sandbox to production later
- If anything is missing (like my key), ask me. Do not guess endpoints, fields or values.Claude में इसका उपयोग कैसे करें
नई Claude चैट में, या अपने प्रोजेक्ट फ़ोल्डर में Claude Code में पेस्ट करें। लाइव टेस्टिंग के लिए StampMitra MCP server जोड़ें, ताकि Claude खुद API कॉल कर सके।
पेस्ट करने से पहले
- 1मुफ़्त sandbox key पाएँ (
sk_test_…)। - 2Key को
STAMPMITRA_API_KEYनाम के env var में रखें। Key को कभी चैट में पेस्ट न करें। - 3Sandbox में बनाएँ और टेस्ट करें। सब ठीक चलने पर production access के लिए आवेदन करें।
Prompt में क्या-क्या है
- Base URL, auth headers और llms.txt (जानकारी का आधार स्रोत)
- Sandbox key के नियम: STAMPMITRA_API_KEY से पढ़ना, कभी hard-code नहीं, कभी लॉग नहीं
- सिर्फ़ server-side कॉल, ताकि key ब्राउज़र से बाहर रहे
- आपके use case या service का सटीक endpoint, request body, example response और fields
- Input validation के नियम, UI states और Sandbox में चलाने के test cases
- 400, 401, 402, 403, 429 और 5xx की error handling (retry और backoff नियमों के साथ), और audit के लिए referenceId सेव करना
- SDK की ज़रूरत नहीं: आपके प्रोजेक्ट की अपनी भाषा में सीधा REST, एक छोटे client module से
- एक acceptance checklist, और अंदाज़ा लगाने के बजाय पूछने का निर्देश
AI agents के लिए MCP server।
Claude, Cursor और कोई भी MCP client StampMitra को structured tools की तरह सीधे कॉल कर सकता है: 10 verification tools और 10 order और payment tools। HTTP कॉल खुद लिखे बिना असली sandbox responses टेस्ट करें।
- 1अपने dashboard में sandbox key (
sk_test_…) बनाएँ। - 2कॉन्फ़िग को
claude_desktop_config.jsonया.cursor/mcp.jsonमें पेस्ट करें। Key सिर्फ़envब्लॉक में रखें। - 3Client रीस्टार्ट करें और उससे PAN verify करने या अपनी services की सूची देने को कहें।
योजना में: e-Stamp schema, lookup, duty और party tools, उनके backend endpoints आने पर।
{
"mcpServers": {
"stampmitra": {
"command": "npx",
"args": ["-y", "@stampmitra/mcp-server"],
"env": {
"STAMPMITRA_API_KEY": "sk_test_your_key_here"
}
}
}
}STAMPMITRA_API_KEY=sk_test_your_key_here npx -y @stampmitra/mcp-serverऔर AI integrations
- llms.txt और llms-full.txtहर docs पेज का मशीन-रीडेबल इंडेक्स। किसी भी AI टूल को इस पर पॉइंट करें।llms.txt खोलें →
- हर पेज का Markdown रूपकिसी भी docs URL के अंत में .md जोड़ें और AI के पढ़ने लायक साफ़ markdown पाएँ।Docs देखें →
- Postman collectionहर endpoint को example responses के साथ import करें।Postman पेज खोलें →
- REST APIAPI key के साथ किसी भी भाषा में। SDK ज़रूरी नहीं।Docs: authentication →
- Official SDKsNode.js/TypeScript, Python, PHP, Java, Go, .NET और Ruby SDKs (pre-release 0.1.0, registry पर प्रकाशन जारी)।SDKs पेज खोलें →
बनाना शुरू करने के लिए तैयार हैं?
मुफ़्त sandbox key लें और लगभग 5 मिनट में अपनी पहली verification कॉल करें।