MCP Server
Connect Claude, ChatGPT, Cursor or Claude Code to a Komenin workspace through the Model Context Protocol.
What the MCP server exposes
The endpoint is /api/mcp (Streamable HTTP transport). It exposes workspace-scoped tools that map onto the same logic the dashboard uses: read accounts and the reply inbox, draft and approve comment replies, schedule posts, and create listeners. Every tool calls through the workspace that authenticated the request — the tool arguments can never address another tenant.
Tools
- list_accounts (accounts:read) — connected accounts, health, remaining daily quota
- list_comments (comments:read) — inbound comments/mentions by status and platform
- list_pending_approvals (comments:read) — drafts waiting for a human decision
- list_content_drafts (content:read) — scheduled/published auto-post drafts
- get_insights (analytics:read) — sent/failed comments, pending approvals, monthly usage
- reply_to_comment (comments:write) — drafts a reply; still needs approval
- approve_comment (comments:write) — approves and schedules with the platform-safe delay
- reject_comment (comments:write) — rejects a pending comment draft so it will not be sent
- schedule_post (content:write) — schedules a post on a connected account
- create_listener (listeners:write) — keyword/competitor listener feeding a campaign
- list_campaigns (campaigns:read) — engagement campaigns with status, platform, and post/approval counts
- list_leads (leads:read) — captured social leads with pipeline stage, intent, and follow-up date
Connect Claude / ChatGPT
- In Claude: Settings → Connectors → Add custom connector, paste https://komenin.id/api/mcp.
- The client registers itself (POST /api/oauth/register), then opens the consent screen.
- Sign in, pick the workspace, and approve the scopes you want the assistant to have.
- ChatGPT: Settings → Connectors → Advanced → Developer mode → Add MCP server with the same URL.
- Manage or revoke active AI connections anytime in Settings → AI & MCP (/app/settings/mcp).
Claude Code / Cursor with an API key
CLI clients that support a static bearer token do not need the OAuth flow. Create a key in Settings → API Keys with the scopes you want and pass it directly.
claude mcp add --transport http komenin https://komenin.id/api/mcp \
--header "Authorization: Bearer aeth_..."
# or in ~/.cursor/mcp.json
{
"mcpServers": {
"komenin": {
"url": "https://komenin.id/api/mcp",
"headers": { "Authorization": "Bearer aeth_..." }
}
}
}Discovery endpoints
- GET /api/mcp — capabilities probe (no auth required)
- GET /.well-known/oauth-protected-resource/api/mcp — RFC 9728 resource metadata
- GET /.well-known/oauth-authorization-server — RFC 8414 server metadata
- A 401 from /api/mcp carries WWW-Authenticate with the resource_metadata URL so clients can self-configure.
Security model
- Access tokens are opaque (koat_...) and stored as SHA-256 hashes.
- Refresh tokens rotate on every use; replaying a rotated token revokes the whole chain.
- Suspending a user or workspace invalidates tokens immediately.
- Write tools mirror the dashboard: replies still enter the approval queue, and sends keep the platform's minimum interval.
Need the product UI? Open command center