mirror of
https://github.com/langbot-app/LangBot.git
synced 2026-06-11 00:06:04 +00:00
feat(mcp): persist and display marketplace README
Capture the README markdown from LangBot Space when installing an MCP server and store it on the mcp_servers record (new readme column + alembic migration 0004). The detail page can then render docs offline, independent of the server's runtime/connection state.
This commit is contained in:
@@ -248,6 +248,9 @@ class PluginRuntimeConnector(ManagedRuntimeConnector):
|
||||
|
||||
mode = mcp_data.get('mode') or 'stdio'
|
||||
extra_args = mcp_data.get('extra_args') or {}
|
||||
# Marketplace records carry the rendered README markdown; persist it so
|
||||
# the detail page Docs tab works offline and without a marketplace round-trip.
|
||||
readme = mcp_data.get('readme') or ''
|
||||
# Use __ instead of / to avoid URL routing issues with slashes
|
||||
name = f'{mcp_data.get("author", "")}__{mcp_data.get("name", "")}'
|
||||
|
||||
@@ -267,6 +270,7 @@ class PluginRuntimeConnector(ManagedRuntimeConnector):
|
||||
'enable': True,
|
||||
'mode': mode,
|
||||
'extra_args': extra_args,
|
||||
'readme': readme,
|
||||
}
|
||||
|
||||
await self.ap.persistence_mgr.execute_async(sqlalchemy.insert(persistence_mcp.MCPServer).values(server_data))
|
||||
|
||||
Reference in New Issue
Block a user