Developers
MCP server documentation
Grown Up Meds exposes its research peptide catalog to AI clients (ChatGPT, Claude, Cursor, Codex) over the Model Context Protocol. The server is read-only and OAuth protected — callers sign in with a Grown Up Meds account and the tools run as that user.
1. Connect
Add the endpoint below as a remote MCP server in your client. Transport is Streamable HTTP; authentication is OAuth 2.1 with dynamic client registration, so most clients register themselves and simply open a browser window for consent.
Endpoint: https://<your-site>.lovable.app/mcp
Transport: Streamable HTTP (POST, Accept: application/json, text/event-stream)
Auth: OAuth 2.1 (Bearer), dynamic client registration supported
Metadata: https://<your-site>.lovable.app/.well-known/oauth-protected-resource
Consent page: https://<your-site>.lovable.app/.lovable/oauth/consentYou will be redirected to sign in (/auth, email/password or Google) and then to an approval screen. Unauthenticated requests to /mcp return 401 with a WWW-Authenticate header pointing at the metadata document.
2. Handshake and discovery
Standard MCP lifecycle — initialize, then list tools:
curl -sS https://<your-site>.lovable.app/mcp \
-H "Authorization: Bearer $ACCESS_TOKEN" \
-H "Content-Type: application/json" \
-H "Accept: application/json, text/event-stream" \
-d '{"jsonrpc":"2.0","id":1,"method":"initialize","params":{
"protocolVersion":"2025-06-18",
"capabilities":{},
"clientInfo":{"name":"my-client","version":"1.0.0"}}}'
# then
-d '{"jsonrpc":"2.0","id":2,"method":"tools/list","params":{}}'All three tools are annotated readOnlyHint: true and idempotentHint: true — nothing in this server mutates data, places orders, or reads customer information.
3. list_categories
Lists every research category in the catalog with product count and price range. Read-only, no input. Good first call to orient an agent.
| Input | Type | Description |
|---|---|---|
| — | — | This tool takes no arguments. |
Output: structuredContent.categories: array of { category, slug, product_count, min_price_usd, max_price_usd, url }. The same payload is also returned as pretty-printed JSON in content[0].text for clients without structured output support.
Example call
{
"method": "tools/call",
"params": { "name": "list_categories", "arguments": {} }
}Example structuredContent
{
"categories": [
{
"category": "Metabolic + Mitochondrial",
"slug": "metabolic-mitochondrial",
"product_count": 18,
"min_price_usd": 42,
"max_price_usd": 398,
"url": "/categories/metabolic-mitochondrial"
}
]
}Example natural-language queries
- “What categories of research peptides do you carry?”
- “Which category has the widest price range?”
4. search_peptides
Weighted search across peptide names and categories. Returns compact rows suitable for listing. Read-only.
| Input | Type | Description |
|---|---|---|
| query | string (required) | Peptide name or category, e.g. "retatrutide" or "tissue". An empty string returns the full catalog. |
| limit | integer 1–50 (default 10) | Maximum number of results. |
Output: structuredContent: { count, results: [{ slug, name, size, category, price_usd, purity, url }] }. The same payload is also returned as pretty-printed JSON in content[0].text for clients without structured output support.
Example call
{
"method": "tools/call",
"params": {
"name": "search_peptides",
"arguments": { "query": "retatrutide", "limit": 5 }
}
}Example structuredContent
{
"count": 3,
"results": [
{
"slug": "retatrutide-60mg",
"name": "Retatrutide",
"size": "60mg",
"category": "Metabolic + Mitochondrial",
"price_usd": 398,
"purity": "≥ 99%",
"url": "/products/retatrutide-60mg"
}
]
}Example natural-language queries
- “Find every Retatrutide vial and its price.”
- “Show me 5 tissue regeneration peptides.”
- “What GLP-1 style compounds do you stock under $200?”
5. get_peptide
Full detail for one catalog item: description, specs (CAS, form, storage, testing), purity, price and product URL. Read-only.
| Input | Type | Description |
|---|---|---|
| slug | string (required) | Catalog slug such as "retatrutide-30mg". Obtain it from search_peptides. |
Output: structuredContent: { slug, name, size, category, price_usd, purity, blurb, description, specs, url, notice }. The same payload is also returned as pretty-printed JSON in content[0].text for clients without structured output support.
Example call
{
"method": "tools/call",
"params": {
"name": "get_peptide",
"arguments": { "slug": "retatrutide-30mg" }
}
}Example structuredContent
{
"slug": "retatrutide-30mg",
"name": "Retatrutide",
"size": "30mg",
"category": "Metabolic + Mitochondrial",
"price_usd": 248,
"purity": "≥ 99%",
"description": "…",
"specs": { "CAS": "2381089-83-2", "Form": "Lyophilized powder", "Storage": "-20°C" },
"url": "/products/retatrutide-30mg",
"notice": "Reference material for laboratory research use only. 21+ only."
}Example natural-language queries
- “Give me the full spec sheet for retatrutide-30mg.”
- “How should BPC-157 10mg be stored, and what does it cost?”
6. Errors and troubleshooting
Tool-level failures return a normal MCP result with isError: true and a human-readable message; protocol/auth failures return HTTP status codes.
| Symptom | Cause / fix |
|---|---|
| 401 Unauthorized | Missing/expired bearer token, or a copied app-session JWT. Re-run the OAuth flow from your client. |
| 406 Not Acceptable | Add Accept: application/json, text/event-stream to the POST. |
| "Not authenticated" in a tool result | The token verified as a session but not as an OAuth client token — reconnect the server. |
| "No peptide found for slug …" | Bad slug. Call search_peptides first and use the slug it returns. |
| "The \"x\" tool failed: … (request id mcp_…)" | Unexpected server error. Quote the request id — it appears in the server logs. |
Every tool call writes one structured [mcp] log line (request id, tool, user id, client id, arguments, duration, status) to the server logs, so failed calls can be traced after publishing.
7. Usage terms
Catalog data returned over MCP describes reference materials for laboratory research use only — not for human or veterinary consumption. Purchasers must be 21+. See the Terms of Service and Privacy Policy.
