Skip to content
Good
Docs

Examples

Request the public metadata to find the authorization server. Discovery does not grant access to member content.

Contract version: 0.2.1

Discover the MCP resource

HTTP requestCopy
curl --fail --silent --show-error \
  'https://goodhub.net/.well-known/oauth-protected-resource/mcp'
Public metadataCopy
{
  "resource": "https://goodhub.net/mcp",
  "authorization_servers": [
    "https://goodhub.net"
  ],
  "bearer_methods_supported": [
    "header"
  ]
}

Request the public metadata to find the authorization server. Discovery does not grant access to member content.

Public metadata

REST API

Use an access token for this API with post:write and post:publish. Generate a separate UUID for each request key. Replace POST_ID with the id returned by draft creation.

Create a draftCopy
POST /v1/posts
Authorization: Bearer <access_token_for_the_v1_resource>
Content-Type: application/json
Idempotency-Key: DRAFT_KEY

{"body":"Weekly project update","visibility":"members"}
Request publicationCopy
POST /v1/posts/POST_ID/publish
Authorization: Bearer <access_token_for_the_v1_resource>
Content-Type: application/json
Idempotency-Key: PUBLISH_KEY

{}

Open approvalUrl from the pending receipt. Review the post and audience, then choose Publish or Cancel. Repeat the publication request with the same POST_ID and PUBLISH_KEY to read the decision.

MCP

Use a connection authorized for the MCP resource with the same two scopes. Send each tools/call message separately. Read the tool result as JSON from result.content[0].text. The publication call returns the approval link and accepts the same key on retry.

Create a draftCopy
{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "tools/call",
  "params": {
    "name": "good.posts.create_draft",
    "arguments": {
      "body": "Weekly project update",
      "visibility": "members",
      "idempotencyKey": "DRAFT_KEY"
    }
  }
}
Request publicationCopy
{
  "jsonrpc": "2.0",
  "id": 2,
  "method": "tools/call",
  "params": {
    "name": "good.posts.publish",
    "arguments": {
      "postId": "POST_ID",
      "idempotencyKey": "PUBLISH_KEY"
    }
  }
}