Everything needed to connect an MCP client to Lawmadi OS and issue a key for tool calls. This guide is readable without signing in; key issuance takes one email verification below.
initialize, tools/list and ping (discovery) answer unauthenticated. A key is required only for tools/call.
Enter these values as-is in your MCP client or registration console.
| MCP endpoint | https://lawmadi.com/mcp |
|---|---|
| Transport | Streamable HTTP — JSON-RPC 2.0 over POST (one JSON response per request) |
| Identifier | lawmadios · server name Lawmadi OS |
| Protocol versions | 2024-11-05 · 2025-03-26 · 2025-06-18 · 2025-11-25 (the requested version is echoed back) |
| Authentication | Key/Token — HTTP header Authorization: Bearer <API key> |
| GET /mcp | No server-initiated SSE channel, so it returns 405 Method Not Allowed — expected per the MCP spec. Use POST for all calls. |
initializetools/listpingget_pricing
askask_expertlookup_statutelookup_precedentverify_citationsgenerate_document…
tools/call. No key sent → -32001; wrong or revoked key → -32002, both carrying the issuance path in the response.ask_expert (expert answers, 2 credits) is Pro plan only. A positive balance is not enough: non-Pro callers are refused, no credits are charged, and the response carries the required plan plus a checkout link. The standard ask tool (1 credit) works on any plan.Right here — no application or approval step. Only a hash of the key is stored, so the full key is shown once, immediately after creation.
Enter the 6-digit code sent to your inbox. No application form, no approval step.
Press Issue API key below and it is created instantly. Only a hash is stored, so the full key is shown once.
Add it to your MCP client and tools/call opens up.
After the free credits, buy more on the pricing page. Purchased credits never expire.
If you are an autonomous agent, do not ask your user to copy a key out of this page. Register yourself, send them through one consent screen, and refresh on your own after that — the same way an assistant connects to a mail or drive account.
GET /.well-known/oauth-authorization-server (RFC 8414) and GET /mcp/.well-known/oauth-protected-resource (RFC 9728). MCP clients that support auth read the second one before tools/call.
POST /oauth/register with your redirect_uris — open to any client, no pre-arrangement (RFC 7591). Loopback http://127.0.0.1:PORT/… is accepted for native agents (RFC 8252).
Send your user to /oauth/authorize with code_challenge_method=S256 (PKCE is required; plain is not supported), then exchange the code at /oauth/token. You get a refresh token and rotate it yourself.
mcp:read cannot spend the user's credits: credit-spending tools are refused outright, and the verified-asset lookups stop at their free daily allowance instead of charging. People approve that far more readily than mcp.
The access token is an lmk_live_… key — the same credential this page issues. Quotas, daily allowances, billing and get_account behave identically, and the user can revoke it from their key list. There is no second authentication path to keep in sync.
Two more surfaces agents ask for: POST /a2a with the agent card at /.well-known/agent-card.json (synchronous tasks — streaming and push notifications are declared false and refused, because this host buffers SSE), and x402 machine payment, which is implemented but not enabled — /.well-known/x402 returns 404 on purpose while no on-chain wallet is configured. Buy credits in the browser until that changes.
Passing the key in the Authorization header works the same way in every MCP client.
{
"mcpServers": {
"lawmadi": {
"type": "http",
"url": "https://lawmadi.com/mcp",
"headers": {
"Authorization": "Bearer lmk_live_YOUR_KEY_HERE"
}
}
}
}
curl -s https://lawmadi.com/mcp \
-H 'Content-Type: application/json' \
-d '{"jsonrpc":"2.0","id":1,"method":"initialize",
"params":{"protocolVersion":"2025-06-18","capabilities":{},
"clientInfo":{"name":"health-check","version":"1"}}}'
curl -s https://lawmadi.com/mcp \
-H 'Content-Type: application/json' \
-H 'Authorization: Bearer lmk_live_YOUR_KEY_HERE' \
-d '{"jsonrpc":"2.0","id":2,"method":"tools/call",
"params":{"name":"lookup_statute","arguments":{"reference":"민법 제750조"}}}'
get_pricing needs no key and returns the sign-up → key → top-up sequence, and get_account reports the balance for a key.
tools/call with that key is refused right away.lookup_precedent, lookup_statute, verify_citations, bar_exam_search, find_village_lawyer, latest_content) call no LLM and consume no credits (daily per-key cap, resets 00:00 KST).-32002 error means the key is invalid or revoked — check for typos, then reissue here.There are two kinds of key. For MCP, use the one issued on this page.
| MCP key (this page) | Email sign-in is enough · for https://lawmadi.com/mcp tool calls · metered by credits |
|---|---|
| Expert REST API key | For B2B /api/v1/expert/ask only · issued in the expert API console on the Pro plan · see Expert API |