Developers
Build with Welley
You can use the Welley API to build clients, scripts, community tools and integrations. The live Swagger reference describes the operations and schemas you can use.
We plan to release Welley as open source in the future. No release date or license is announced yet.
MCPModel Context Protocol
Connect an AI agent
Welley has an MCP server, so an AI agent such as Claude, Codex or Cursor can work with your Welley account. Add the server to your agent and sign in with Welley. Then ask about your groups and feeds, or ask the agent to post, reply or plan an event for you. The agent acts as you, so it can do only what you can do.
- server
https://welley.social/mcp- transport
Streamable HTTP- sign-in
- OAuth, client ID
welley-mcp, no client secret - lasts
- 7 days, then you sign in again
- signed out
- your agent can still search the API and read public posts
Your agent
Claude, Codex, Cursor, Gemini and others
welley.social/mcp
overviewfindcall
Welley API
Posts, groups, events, messages and server settings
| Tool | What it does |
|---|---|
overview() | Says what the API can do, area by area. |
find(query) | Finds the right operation from plain words, such as “reply to a post”. |
call(operation_id, params, body, mode) | Describes, checks or runs one operation. Only mode: "execute" sends a real request. |
Add Welley to your agent
Claude Code
claude mcp add --transport http --client-id welley-mcp welley https://welley.social/mcp
claude mcp login welley
- Your browser opens. Sign in to Welley and approve the connection.
- On a computer without a browser, add
--no-browserto the login command and open the link it prints on another device. Then paste the address that the browser ends on.
Claude app
- In claude.ai or Claude Desktop, open Customize, then Connectors, and add a custom connector.
- Name it
Welleyand enter the URLhttps://welley.social/mcp. - Under the OAuth client, pick Use your own OAuth client. Enter the client ID
welley-mcpand leave the client secret empty. - Under authentication, pick Sign in when needed. Then add the connector, connect it and approve the connection in Welley.
- On a Team or Enterprise plan, an owner adds the connector once for everyone.
ChatGPT
- In ChatGPT, add a custom MCP server with the URL
https://welley.social/mcp. - Set up OAuth with the client ID
welley-mcpand leave the client secret empty.
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 opens the Welley sign-in in your browser the first time it connects.
Gemini CLI
{
"mcpServers": {
"welley": {
"url": "https://welley.social/mcp",
"type": "http",
"oauth": {
"enabled": true,
"clientId": "welley-mcp",
"scopes": [
"welley:api"
]
}
}
}
}
- Then type
/mcp auth welleyin Gemini CLI.
opencode
You need opencode 2. Older versions can't sign in to 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
Any agent
An agent with a shell and Python 3 can sign in with our helper script. It runs the same sign-in and keeps it on your 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
startprints a link. Open it, sign in to Welley and approve the connection.- The page shows a code. Give it to
finish. headerprints the HTTP header that your agent sends with each request. After 7 days it prints{}, and you runstartagain.- For a script or a bot, you can also make a personal access token in your Welley settings and send it as
Authorization: Bearer <token>.
Watch an agent at work
This is a real session in Claude Code. Maya is a member of Riverside Garden, a community garden group. She connects Welley, asks what she missed, and then asks the agent to answer a question for her. The group reviews new posts before they go up, so her reply waits for a moderator.
~/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.
>
Start with a public request
The API runs over HTTPS, and most operations take and return JSON. Public read operations can work without an account.
Read server information
This request returns public metadata about the server. It doesn't change any server data.
curl --fail --silent --show-error "https://welley.social/api/v1/instance"
Look up the operation in Swagger
Before you write a client, check its parameters, request schema, response schema and permissions.
Authenticate an integration
Protected operations need a valid token in the Authorization header. Our official CLI sends the token with the Bearer prefix.
Read your effective server permissions
Set WELLEY_TOKEN to your own valid token, the way you usually handle secrets. This example only reads data.
curl --fail --silent --show-error \ -H "Authorization: Bearer $WELLEY_TOKEN" \ "https://welley.social/api/v1/rbac/permissions"
- For an integration, create a personal access token in your account settings.
- Give it a name and an expiration. The API also accepts expiresInDays=0 for a token with no stored expiration.
- Limit which global permissions, group permissions and groups the token can use.
- If you leave an allow-list empty, that field is limited only by your current access. A token can't give rights that you don't have.
- You'll see the token secret only once. Save it before you close the creation result.
- To manage tokens, you need an account login session. A personal access token can't create, list, copy or revoke tokens.
Check permissions and scope
Authentication tells the API who's calling. Role permissions decide which operations that caller can use.
- The API returns 401 when a protected request has no valid authentication.
- The API returns 403 when the caller doesn't have a required permission.
- Permission names follow Resource.Action, for example GroupSettings.Manage.
- For scoped webhook and permission operations, leave out scope to use server scope. For group scope, pass a group TypeId.
- Read the description of each operation. Some endpoints use HTTP signatures or another protocol instead of an account token.
Choose an API area
The reference covers social features, integrations and server administration. The examples here are just a small part of the API.
Accounts and profiles
Read profiles, manage account identities and use the account export or move operations.
| Method | Path | Operation | Access |
|---|---|---|---|
| GET | /api/v1/users | Read a local or remote profile by username. | Public or optional token |
| POST | /api/v1/users | Add another profile to the current account, up to the server's limit. | Token required |
Posts and feeds
Read feeds and create posts. Other operations handle replies, polls, reactions, drafts and saved posts.
| Method | Path | Operation | Access |
|---|---|---|---|
| GET | /api/v1/posts | Read public posts as a guest, or a personalized feed when you're authenticated. | Public or optional token |
| POST | /api/v1/posts | Create a post with its content and who can see it. | Token required |
Groups and events
Build community tools with groups, membership, channels, moderation and events.
| Method | Path | Operation | Access |
|---|---|---|---|
| POST | /api/v1/groups | Create a group, using the permissions of the authenticated user. | Token required |
| GET | /api/v1/events | List public events or the events the authenticated user can see. | Public or optional token |
| POST | /api/v1/events | Create an event. A group event needs GroupEvents.Create. | Token required |
Conversations and notifications
Read conversation rooms and their messages. Read notification collections and update whether they're read.
| Method | Path | Operation | Access |
|---|---|---|---|
| GET | /api/v1/rooms | List the current user's rooms. To continue the list, use nextCursor from the response body. | Token required |
| GET | /api/v1/user-notifications | List the current user's notifications. | Token required |
Media, search and translation
Upload media, search the content you can see and ask for text translations.
| Method | Path | Operation | Access |
|---|---|---|---|
| POST | /api/v1/uploads | Create an upload entry, then PUT the file content to the upload URL it returns. | Token required |
| GET | /api/v1/search | Search the content the caller can see, or resolve supported URLs. | Public or optional token |
| POST | /api/v1/translate/text | Translate text into the requested language. | Token required |
Webhooks and AI agents
Connect outside services with webhooks. Set up AI agents through the agent APIs.
| Method | Path | Operation | Access |
|---|---|---|---|
| GET | /api/v1/webhooks/events | Get the list of supported webhook event types. | Token required |
| POST | /api/v1/webhooks | Create a webhook in a server or group scope you have permission for. The HTTP signing secret is shown only once. | Token required |
| GET | /api/v1/ai-agents | List the AI agents the caller can see. | Token required |
Server and group administration
Use the API for settings, reports, moderation, federation controls, quotas and deployment administration.
| Method | Path | Operation | Access |
|---|---|---|---|
| GET | /api/v1/rbac/permissions | Read the effective permissions for the current user and scope. | Token required |
| GET | /api/v1/settings | Read platform settings, if the account has the required permissions. | Public or optional token |
Handle responses and media
Follow each operation's own pagination and upload flow.
- For cursor feeds, follow the pagination links the server returns. Don't build cursors from guesses about IDs.
- Rooms return an opaque nextCursor in the response body. When you continue the list, keep the same filters.
- To upload media, create an upload entry, then send the content to the URL it returns.
- Check each operation's error responses and limits. Even a documented operation can need a role, a server configuration or an external provider.