MCP
One MCP server gives your coding agent what it needs to work with Diamra. Add it once. Today the agent reads these docs through it, a guide with the rules to follow, and skills such as page design for your brand. What comes later arrives on the same address, so you never add a second server.
https://mcp.diamra.com/v1/mcpThe server speaks MCP over Streamable HTTP. It never takes an API key. The docs and the skills need no sign-in. A tool that works for your Diamra account asks you to sign in first.
Connect your agent
Any MCP client that connects to a remote server can use it. Give the client the address above.
In Claude, open Connectors, choose Add custom connector, and paste the address. In Claude Code, run one command:
claude mcp add --transport http diamra https://mcp.diamra.com/v1/mcpThen ask a question that needs the docs, such as "Using Diamra, how do I verify a webhook signature?" The agent finds the pages on its own.
Sign in
Two tools work for your Diamra account: get_profile and sign_out. The tools that come later for your store will ask for the same sign-in. The first time your agent calls one, the server answers that you must sign in, and your client opens a page on diamra.com.
- The page names the app that asks, the address it sends you back to, and the Diamra account that answers. If you are signed out of Diamra, the page asks you to sign in first.
- Read the three lines. Choose Allow only if you started this yourself, from an app you trust. Deny stops it, and Use another account lets you switch.
- The app gets a token for your account and goes back to your agent. A token lasts an hour, and the app renews it on its own.
An app you allow can see your account and do what you can do on Diamra, in your stores too. It never sees your password. Sign-in is separate from API keys: your server still calls the API with its own key.
In Claude Code, type /mcp, choose diamra, then choose to authenticate. Your browser opens the page, and the app shows there as Claude Code (diamra). You can also sign in from a shell with one command:
claude mcp login diamraTo disconnect an app, ask your agent: "Sign me out of Diamra." It calls sign_out, and Diamra takes back what you allowed for that app. The next tool that works for your account asks you to sign in again.
Tools
The pages are the ones you read here. When a page changes on this site, your agent reads the new text within ten minutes.
Skills
A skill is a working method the agent follows for one kind of task. The server tells the agent when to read each one, so you do not have to ask for it.
The agent reads the core of a skill first, then only the parts the task needs. After the first session your project has a design folder with the brand, the rules, the tokens, the components and a log of decisions. It also adds a short note to the agent instructions of your project, so any agent you use later starts from the same decisions.
Examples
You ask in your own words, and the agent picks the pages. These are the pages it usually reads.
- "How do I verify a webhook signature?" The agent reads
guide, thenwebhooks/signing-keys. - "Add sign-up and log-in for my customers." The agent reads
guide,api/keysandapi/auth. - "Show a customer designs from what they describe." The agent reads
guideandapi/designs. - "Tell my page when a customer accepts a price." The agent reads
guide,embed/listenandembed/messages. - "Design a landing page for our engagement rings." The agent reads the skill
luxury-page-design, asks you about your brand, then builds the page. - "Who am I signed in as on Diamra?" The agent calls
get_profile. If you have not signed in yet, your client asks you to sign in first.
One session, step by step
- The agent connects. The server tells it to read the page
guidefirst. - It calls
list_docsand gets the name of every page. - It calls
read_docforguide, then for each page your question needs. - It answers you, or writes the code, from what it read.
One call by hand
Your agent makes these calls for you. To see one, send it yourself: every tool call is one POST. This one reads the Health page.
curl https://mcp.diamra.com/v1/mcp \ -H "Content-Type: application/json" \ -H "Accept: application/json, text/event-stream" \ -d '{ "jsonrpc": "2.0", "id": 1, "method": "tools/call", "params": { "name": "read_doc", "arguments": { "page": "api/health" } } }'{ "jsonrpc": "2.0", "id": 1, "result": { "content": [ { "type": "text", "text": "# Health\n\nTells you whether the API is up. It needs no key and is never billed..." } ], "structuredContent": { "page": "api/health", "title": "Health", "url": "https://diamra.com/developer/docs/api/health", "markdown": "# Health\n\nTells you whether the API is up. It needs no key and is never billed..." }, "isError": false }}The text is the page as Markdown, and structuredContent carries the same page with its name, title and address. A name that is not in list_docs answers with isError set, and tells the agent what to do next:
{ "jsonrpc": "2.0", "id": 2, "result": { "content": [{ "type": "text", "text": "Unknown page: api/orders. Call list_docs for the pages." }], "isError": true }}Sign-in for your own client
Claude Code handles the sign-in for you, and so does any client that follows the MCP specification. If you write your own MCP client, the server follows the authorization part of that specification: OAuth 2.1 with PKCE, and a client registers itself.
tools/listmarks every tool withsecuritySchemes:noauthfor a public tool,oauth2for a tool that needs sign-in. A public tool takes no token.- A tool that needs sign-in, called with no token, answers
401. ItsWWW-Authenticateheader points to the server metadata. - The metadata names the authorization server. Your client registers there, sends the person to sign in, and gets an access token and a refresh token.
- Send the access token in the
Authorizationheader of each call:Bearerand the token. - A token that has expired, or that the person took back, answers
401again, witherror="invalid_token"in the header. Renew the token, or start the sign-in again.
curl -i https://mcp.diamra.com/v1/mcp \ -H "Content-Type: application/json" \ -H "Accept: application/json, text/event-stream" \ -d '{ "jsonrpc": "2.0", "id": 1, "method": "tools/call", "params": { "name": "get_profile", "arguments": {} } }'HTTP/2 401www-authenticate: Bearer resource_metadata="https://mcp.diamra.com/.well-known/oauth-protected-resource/v1/mcp"content-type: application/json{ "jsonrpc": "2.0", "id": 1, "error": { "code": -32001, "message": "Sign in to Diamra to use this tool." } }What the agent reads first
When the agent connects, the server tells it to read the guide for agents before it writes code. The guide is a short list of rules: where a key lives, which headers a call takes, how to wait for a design, and how to check a webhook.