communication
Discourse MCP Integration for OpenAI Agents SDK
Connect Discourse to OpenAI Agents SDK through the local KosmoKrator MCP gateway with scoped tools, credentials, and write policy.
Connect Discourse to OpenAI Agents SDK
Attach KosmoKrator integration tools to OpenAI Agents SDK workflows through a local MCP gateway.
Start the KosmoKrator MCP gateway locally and point the OpenAI Agents SDK MCP tool at that process or wrapper. The gateway is local, scoped to this integration, and starts with
--write=deny so OpenAI Agents can inspect read-capable tools without receiving write access by default.
Discourse MCP Config for OpenAI Agents SDK
Use headless JSON commands for CI-style execution and MCP for agent tool discovery.
{
"mcpServers": {
"kosmokrator-discourse": {
"type": "stdio",
"command": "kosmo",
"args": [
"mcp:serve",
"--integration=discourse",
"--write=deny"
]
}
}
} Run the Gateway Manually
kosmokrator mcp:serve --integration=discourse --write=deny Why Use KosmoKrator Here
Expose only Discourse instead of a broad multi-service tool list.
Reuse credentials already configured for the KosmoKrator CLI and Lua runtime.
Start read-only, then opt into ask or allow for trusted workspaces.
Discourse Tools Visible to OpenAI Agents
OpenAI Agents sees stable MCP tool names generated from the Discourse integration catalog.
| MCP tool | Source function | Type | Description |
|---|---|---|---|
integration__discourse__discourse_list_topics | discourse.discourse_list_topics | Read | List the latest topics from the Discourse forum. Returns topic titles, categories, and activity metadata. |
integration__discourse__discourse_get_topic | discourse.discourse_get_topic | Read | Get a single Discourse topic by ID, including its posts, author, and metadata. |
integration__discourse__discourse_create_topic | discourse.discourse_create_topic | Write | Create a new topic in a Discourse category. Requires a title, body content (Markdown), and category ID. |
integration__discourse__discourse_update_topic | discourse.discourse_update_topic | Write | Update an existing Discourse topic's title or move it to a different category. |
integration__discourse__discourse_list_categories | discourse.discourse_list_categories | Read | List all categories on the Discourse forum. Returns category names, IDs, descriptions, and parent relationships. |
integration__discourse__discourse_get_category | discourse.discourse_get_category | Read | Get a single Discourse category by ID, including its recent topics and metadata. |
integration__discourse__discourse_create_post | discourse.discourse_create_post | Write | Reply to an existing Discourse topic with a new post. Provide the topic ID and body content in Markdown. |
integration__discourse__discourse_get_current_user | discourse.discourse_get_current_user | Read | Get the currently authenticated Discourse user profile. Useful for verifying API credentials and identifying the user context. |