Sviluppatori
Costruisci con Welley
Puoi usare l'API di Welley per creare client, script, strumenti per la community e integrazioni. Il riferimento Swagger online descrive le operazioni e gli schemi che puoi usare.
In futuro prevediamo di rilasciare Welley come open source. Per ora non sono state annunciate né una data di rilascio né una licenza.
MCPModel Context Protocol
Collega un agente AI
Welley ha un server MCP, quindi un agente AI come Claude, Codex o Cursor può lavorare con il tuo account Welley. Aggiungi il server al tuo agente e accedi con Welley. Poi fai domande sui tuoi gruppi e feed, oppure chiedi all'agente di pubblicare, rispondere o organizzare un evento per te. L'agente agisce come te, quindi può fare solo ciò che puoi fare tu.
- server
https://welley.social/mcp- trasporto
Streamable HTTP- accesso
- OAuth, client ID
welley-mcp, nessun client secret - durata
- 7 giorni, poi accedi di nuovo
- disconnesso
- il tuo agente può comunque cercare nell'API e leggere i post pubblici
Il tuo agente
Claude, Codex, Cursor, Gemini e altri
welley.social/mcp
overviewfindcall
API di Welley
Post, gruppi, eventi, messaggi e impostazioni del server
| Strumento | Cosa fa |
|---|---|
overview() | Indica cosa può fare l'API, area per area. |
find(query) | Trova l'operazione giusta a partire da parole semplici, come “rispondere a un post”. |
call(operation_id, params, body, mode) | Descrive, controlla o esegue una singola operazione. Solo mode: "execute" invia una richiesta reale. |
Aggiungi Welley al tuo agente
Claude Code
claude mcp add --transport http --client-id welley-mcp welley https://welley.social/mcp
claude mcp login welley
- Si apre il browser. Accedi a Welley e approva la connessione.
- Su un computer senza browser, aggiungi
--no-browseral comando di login e apri su un altro dispositivo il link che stampa. Poi incolla l'indirizzo a cui arriva il browser.
App di Claude
- In claude.ai o Claude Desktop, apri Customize, poi Connectors, e aggiungi un connettore personalizzato.
- Chiamalo
Welleye inserisci l'URLhttps://welley.social/mcp. - Sotto il client OAuth, scegli Use your own OAuth client. Inserisci il client ID
welley-mcpe lascia vuoto il client secret. - Nella sezione di autenticazione, scegli Sign in when needed. Poi aggiungi il connettore, collegalo e approva la connessione in Welley.
- Con un piano Team o Enterprise, un proprietario aggiunge il connettore una sola volta per tutti.
ChatGPT
- In ChatGPT, aggiungi un server MCP personalizzato con l'URL
https://welley.social/mcp. - Configura OAuth con il client ID
welley-mcpe lascia vuoto il client secret.
Codex
[mcp_servers.welley]
url = "https://welley.social/mcp"
[mcp_servers.welley.oauth]
client_id = "welley-mcp"
codex mcp login welley
Cursor
{
"mcpServers": {
"welley": {
"url": "https://welley.social/mcp",
"auth": {
"CLIENT_ID": "welley-mcp",
"scopes": [
"welley:api"
]
}
}
}
}
VS Code
{
"servers": {
"welley": {
"type": "http",
"url": "https://welley.social/mcp",
"oauth": {
"clientId": "welley-mcp"
}
}
}
}
- VS Code apre l'accesso a Welley nel browser la prima volta che si connette.
Gemini CLI
{
"mcpServers": {
"welley": {
"url": "https://welley.social/mcp",
"type": "http",
"oauth": {
"enabled": true,
"clientId": "welley-mcp",
"scopes": [
"welley:api"
]
}
}
}
}
- Poi digita
/mcp auth welleyin Gemini CLI.
opencode
Ti serve opencode 2. Le versioni precedenti non possono accedere a Welley.
{
"$schema": "https://opencode.ai/config.json",
"mcp": {
"servers": {
"welley": {
"type": "remote",
"url": "https://welley.social/mcp",
"oauth": {
"client_id": "welley-mcp"
}
}
}
}
}
opencode mcp auth welley
Qualsiasi agente
Un agente con una shell e Python 3 può accedere con il nostro script di supporto. Esegue lo stesso accesso e lo conserva sul tuo computer.
curl -fsSLO https://welley.social/mcp/connect/welley_connect.py
python3 welley_connect.py start https://welley.social/mcp
python3 welley_connect.py finish https://welley.social/mcp --code '<code>'
python3 welley_connect.py header https://welley.social/mcp
startmostra un link. Aprilo, accedi a Welley e approva la connessione.- La pagina mostra un codice. Passalo a
finish. headerstampa l'header HTTP che il tuo agente invia a ogni richiesta. Dopo 7 giorni stampa{}e tu esegui di nuovostart.- Per uno script o un bot, puoi anche creare un token di accesso personale nelle impostazioni di Welley e inviarlo come
Authorization: Bearer <token>.
Guarda un agente al lavoro
Questa è una sessione reale in Claude Code. Maya è membro di Riverside Garden, un gruppo dedicato a un orto comunitario. Collega Welley, chiede cosa si è persa e poi chiede all'agente di rispondere a una domanda al posto suo. Il gruppo controlla i nuovi post prima che vengano pubblicati, quindi la sua risposta resta in attesa di un moderatore.
~/garden $ claude mcp add --transport http --client-id welley-mcp welley https://welley.social/mcp
Added HTTP MCP server welley with URL: https://welley.social/mcp to local config
~/garden $ claude mcp login welley --no-browser
Starting authentication for "welley"…
Visit this URL to authorize:
https://welley.social/oauth/authorize?response_type=code&client_id=welley-mcp&code_challenge=…
Waiting for authorization… (^C to cancel)
Or paste the redirect URL here:
# Maya opens the link, signs in to Welley and clicks Allow.
~/garden $ claude
> What's new in Riverside Garden lately? Is there a question nobody has answered yet?
⏺ welley - find (MCP)(query: "community feed recent posts and unanswered questions")
⎿ {"status":"task_not_finished_yet","candidates":[{"operationId":"get_api_v1_pos…
⏺ Riverside Garden is likely a group. Let me try the group feed with intent to resolve the id.
⏺ welley - call (MCP)(operation_id: "get_api_v1_groups_groupid_feed", mode: "execute")
⎿ {"ok":false,"operationId":"get_api_v1_groups_groupid_feed","error":{"type":"va…
⏺ welley - call (MCP)(operation_id: "get_api_v1_groups_search", params: {"query": "Riverside Garden"}, mode: "execute")
⎿ {"ok":false,"operationId":"get_api_v1_groups_search","error":{"type":"validati…
⏺ welley - call (MCP)(operation_id: "get_api_v1_groups_search", params: {"substring": "Riverside Garden"}, mode: "execute")
⎿ {"status":200,"body":{"groups":[{"groupId":"gr_01m4y6errre80b2101wdbn7kfm","gr…
⏺ welley - call (MCP)(operation_id: "get_api_v1_groups_groupid_feed", params: {"groupId": "gr_01m4y6errre80b2101wdbn7kfm", "limit": 30, "includeComments": true, "includePublisher": true}, mode: "execute")
⎿ {"status":200,"body":[{"id":"pt_01m67821z8e0qv7eqtf4jb44n3","uri":"https://wel…
⏺ The group has 22 posts but the feed returned only 7, so some channels may be missing. I'll look up the group's channels.
⏺ welley - find (MCP)(query: "list channels of a group")
⎿ {"status":"task_not_finished_yet","candidates":[{"operationId":"get_api_v1_gro…
⏺ welley - call (MCP)(operation_id: "get_api_v1_groups_groupid_channels", params: {"groupId": "gr_01m4y6errre80b2101wdbn7kfm"}, mode: "execute")
⎿ {"status":200,"body":[{"id":"gc_01m4y6nfrheyeszr37r94fh9r7","username":"rivers…
⏺ Questions most likely live in the "Growing advice" forum channel, which isn't in the main feed. Let me fetch its posts.
⏺ welley - call (MCP)(operation_id: "get_api_v1_posts", mode: "describe")
⎿ {"operationId":"get_api_v1_posts","method":"GET","path":"/api/v1/posts","title…
⏺ Pulling the forum posts (all forum categories) plus the volunteering channel in parallel.
⏺ welley - call (MCP)(operation_id: "get_api_v1_posts", params: {"groupId": "gr_01m4y6errre80b2101wdbn7kfm", "channelAppMeta": "welley.group.forum", "limit": 30, "htmlContent": "false"}, mode: "execute")
⎿ {"status":200,"body":[{"id":"pt_01m4y6wn9sejw9pyb4kkpf4fet","uri":"https://wel…
⏺ welley - call (MCP)(operation_id: "get_api_v1_posts", params: {"ownerId": "gc_01m4y6ndqte0naxpd23nxj2zpd", "limit": 20, "htmlContent": "false"}, mode: "execute")
⎿ {"status":200,"body":[{"id":"pt_01m6781k5weasa5819xvhzcxwy","uri":"https://wel…
⏺ Riverside Garden has been quiet since Oct 30. Nobody has posted in the last six days. And yes, there's one question with no replies.
Recent activity (Oct 30)
- Water shut-off on Nov 15 (Alex Morgan, Announcements): take your hoses home or hang them in the shed before then. That's 10 days away.
- Garlic for bed 4 is in (Maya Chen): three kinds from the seed library. It gets planted Saturday, after the compost work.
- First harvest from bed 12 (Noah Bennett): two pounds of cherry tomatoes. It got 4 likes and 2 comments.
- Watering shifts (Elena Ruiz, Volunteering): Elena will do Tuesdays until the water goes off and asked if anyone needs Thursday covered. One person has replied.
Older posts still around (Oct 14)
- Saturday workday plan (Garden projects): 9:00 at the main gate. Turn the compost, mulch the paths, plant the garlic. It has 2 replies.
- Second compost bay (Sam Rivera): needs about 8 pallets, wire and two people for an afternoon. It has 1 reply.
- Aphids on the kale in bed 7 (Maya Chen, Growing advice): asks about companion planting. It has 1 reply.
- Spring seed exchange: March 14 in the community room.
The question nobody has answered
"When should we sow the fava beans?", posted by Sam Rivera in Growing advice on Oct 14. It has no replies, one 👍 and one view. Sam says the October sowing came through winter well, but the March sowing gave a bigger harvest, and asks if anyone has notes from earlier seasons. If anyone is going to sow this fall, now is the time, so a reply would help soon.
I only read the public channels. I didn't open Staff discussion or Chess, which are private.
> Answer Sam for me: we sowed half in late October and half in March last year. The October ones flowered first, but the March ones gave more pods, so I'd do both again.
⏺ welley - find (MCP)(query: "reply to a post (create comment)")
⎿ {"status":"task_not_finished_yet","candidates":[{"operationId":"post_api_v1_po…
⏺ welley - call (MCP)(operation_id: "post_api_v1_posts_postid_comments", params: {"postId": "pt_01m4y6wgw9eve9me2bzs0dap01"}, body_json: {"text": "We sowed half in late October and half in March last year. The October ones flowered first, but the March ones gave more pods, so I'd do both again.", "privacy": "PUBLIC", "kind": "Note"}, mode: "execute")
⎿ {"status":202,"body":{"id":"pp_01m6pe5xzde5yttak8e857qfqs","groupId":"gr_01m4y…
⏺ The server accepted the reply but marked it as pending. I'll check whether it has gone live.
⏺ welley - find (MCP)(query: "get comments of a post", limit: 3)
⎿ {"status":"task_not_finished_yet","candidates":[{"operationId":"get_api_v1_pos…
⏺ welley - call (MCP)(operation_id: "get_api_v1_posts_postid_comments", params: {"postId": "pt_01m4y6wgw9eve9me2bzs0dap01", "htmlContent": "false"}, mode: "execute")
⎿ {"status":200,"body":[],"request":{"operationId":"get_api_v1_posts_postid_comm…
⏺ welley - call (MCP)(operation_id: "get_api_v1_posts_postid_comments", params: {"postId": "pt_01m4y6wgw9eve9me2bzs0dap01", "htmlContent": "false"}, mode: "execute")
⎿ {"status":200,"body":[],"request":{"operationId":"get_api_v1_posts_postid_comm…
⏺ I sent your reply to Sam's fava bean question, but it isn't showing in the thread yet.
The reply is under your account (Maya Chen) in Growing advice:
> We sowed half in late October and half in March last year. The October ones flowered first, but the March ones gave more pods, so I'd do both again.
Welley accepted it and marked it pending (pending post id pp_01m6pe5xzde5yttak8e857qfqs). I checked the thread twice right after, and both times it still had no comments. It may still be processing, or the group may have to approve it first. If it doesn't appear within a few minutes, look at the post in Growing advice. I can check it again for you if you like.
>
Inizia con una richiesta pubblica
L'API funziona su HTTPS e la maggior parte delle operazioni accetta e restituisce JSON. Le operazioni di lettura pubbliche possono funzionare senza un account.
Leggi le informazioni sul server
Questa richiesta restituisce metadati pubblici sul server. Non modifica nessun dato del server.
curl --fail --silent --show-error "https://welley.social/api/v1/instance"
Cerca l'operazione in Swagger
Prima di scrivere un client, controlla i parametri, lo schema della richiesta, lo schema della risposta e i permessi.
Autentica un'integrazione
Le operazioni protette richiedono un token valido nell'header Authorization. La nostra CLI ufficiale invia il token con il prefisso Bearer.
Leggi i tuoi permessi effettivi sul server
Imposta WELLEY_TOKEN con un tuo token valido, nel modo in cui gestisci di solito i segreti. Questo esempio legge soltanto dati.
curl --fail --silent --show-error \ -H "Authorization: Bearer $WELLEY_TOKEN" \ "https://welley.social/api/v1/rbac/permissions"
- Per un'integrazione, crea un token di accesso personale nelle impostazioni del tuo account.
- Dagli un nome e una scadenza. L'API accetta anche expiresInDays=0 per un token senza scadenza memorizzata.
- Limita quali permessi globali, permessi di gruppo e gruppi il token può usare.
- Se lasci vuota una lista di elementi consentiti, quel campo è limitato solo dal tuo accesso attuale. Un token non può dare diritti che tu non hai.
- Vedrai il segreto del token una sola volta. Salvalo prima di chiudere il risultato della creazione.
- Per gestire i token ti serve una sessione di accesso all'account. Un token di accesso personale non può creare, elencare, copiare o revocare token.
Controlla permessi e ambito
L'autenticazione dice all'API chi sta chiamando. I permessi del ruolo decidono quali operazioni quel chiamante può usare.
- L'API restituisce 401 quando una richiesta protetta non ha un'autenticazione valida.
- L'API restituisce 403 quando il chiamante non ha un permesso richiesto.
- I nomi dei permessi seguono il formato Resource.Action, per esempio GroupSettings.Manage.
- Per le operazioni su webhook e permessi con ambito, ometti scope per usare l'ambito del server. Per l'ambito di un gruppo, passa il TypeId del gruppo.
- Leggi la descrizione di ogni operazione. Alcuni endpoint usano firme HTTP o un altro protocollo invece di un token dell'account.
Scegli un'area dell'API
Il riferimento copre funzioni social, integrazioni e amministrazione del server. Gli esempi qui sono solo una piccola parte dell'API.
Account e profili
Leggi i profili, gestisci le identità dell'account e usa le operazioni di esportazione o di spostamento dell'account.
| Metodo | Percorso | Operazione | Accesso |
|---|---|---|---|
| GET | /api/v1/users | Leggi un profilo locale o remoto tramite il nome utente. | Pubblico o token facoltativo |
| POST | /api/v1/users | Aggiungi un altro profilo all'account attuale, fino al limite del server. | Token richiesto |
Post e feed
Leggi i feed e crea post. Altre operazioni gestiscono risposte, sondaggi, reazioni, bozze e post salvati.
| Metodo | Percorso | Operazione | Accesso |
|---|---|---|---|
| GET | /api/v1/posts | Leggi i post pubblici come ospite, oppure un feed personalizzato quando sei autenticato. | Pubblico o token facoltativo |
| POST | /api/v1/posts | Crea un post indicando il contenuto e chi può vederlo. | Token richiesto |
Gruppi ed eventi
Crea strumenti per la community con gruppi, appartenenza, canali, moderazione ed eventi.
| Metodo | Percorso | Operazione | Accesso |
|---|---|---|---|
| POST | /api/v1/groups | Crea un gruppo, usando i permessi dell'utente autenticato. | Token richiesto |
| GET | /api/v1/events | Elenca gli eventi pubblici o gli eventi che l'utente autenticato può vedere. | Pubblico o token facoltativo |
| POST | /api/v1/events | Crea un evento. Un evento di gruppo richiede GroupEvents.Create. | Token richiesto |
Conversazioni e notifiche
Leggi le stanze di conversazione e i loro messaggi. Leggi le raccolte di notifiche e aggiorna il loro stato di lettura.
| Metodo | Percorso | Operazione | Accesso |
|---|---|---|---|
| GET | /api/v1/rooms | Elenca le stanze dell'utente attuale. Per continuare l'elenco, usa nextCursor dal corpo della risposta. | Token richiesto |
| GET | /api/v1/user-notifications | Elenca le notifiche dell'utente attuale. | Token richiesto |
Media, ricerca e traduzione
Carica media, cerca tra i contenuti che puoi vedere e chiedi traduzioni di testo.
| Metodo | Percorso | Operazione | Accesso |
|---|---|---|---|
| POST | /api/v1/uploads | Crea una voce di caricamento, poi invia con PUT il contenuto del file all'URL di caricamento che ricevi. | Token richiesto |
| GET | /api/v1/search | Cerca tra i contenuti che il chiamante può vedere, oppure risolvi gli URL supportati. | Pubblico o token facoltativo |
| POST | /api/v1/translate/text | Traduci il testo nella lingua richiesta. | Token richiesto |
Webhook e agenti IA
Collega servizi esterni con i webhook. Configura gli agenti IA tramite le API per gli agenti.
| Metodo | Percorso | Operazione | Accesso |
|---|---|---|---|
| GET | /api/v1/webhooks/events | Ottieni l'elenco dei tipi di evento webhook supportati. | Token richiesto |
| POST | /api/v1/webhooks | Crea un webhook in un ambito di server o di gruppo per cui hai il permesso. Il segreto di firma HTTP viene mostrato una sola volta. | Token richiesto |
| GET | /api/v1/ai-agents | Elenca gli agenti IA che il chiamante può vedere. | Token richiesto |
Amministrazione di server e gruppi
Usa l'API per impostazioni, segnalazioni, moderazione, controlli della federazione, quote e amministrazione del deployment.
| Metodo | Percorso | Operazione | Accesso |
|---|---|---|---|
| GET | /api/v1/rbac/permissions | Leggi i permessi effettivi per l'utente e l'ambito attuali. | Token richiesto |
| GET | /api/v1/settings | Leggi le impostazioni della piattaforma, se l'account ha i permessi necessari. | Pubblico o token facoltativo |
Gestisci risposte e media
Segui la paginazione e il flusso di caricamento propri di ogni operazione.
- Per i feed a cursore, segui i link di paginazione che il server restituisce. Non costruire cursori ipotizzando gli ID.
- Le stanze restituiscono un nextCursor opaco nel corpo della risposta. Quando continui l'elenco, mantieni gli stessi filtri.
- Per caricare contenuti multimediali, crea una voce di caricamento, poi invia il contenuto all'URL che ricevi.
- Controlla le risposte di errore e i limiti di ogni operazione. Anche un'operazione documentata può richiedere un ruolo, una configurazione del server o un provider esterno.