mirror of
https://gitea.toothfairyai.com/ToothFairyAI/tf_code.git
synced 2026-04-09 18:29:39 +00:00
feat: tfcode
This commit is contained in:
41
packages/tfcode/python/tf_sync/mcp.py
Normal file
41
packages/tfcode/python/tf_sync/mcp.py
Normal file
@@ -0,0 +1,41 @@
|
||||
"""
|
||||
MCP server sync module for tfcode.
|
||||
|
||||
NOTE: MCP servers are not currently exposed via the ToothFairyAI SDK.
|
||||
This module is reserved for future implementation when MCP server
|
||||
discovery is added to the SDK.
|
||||
|
||||
For now, MCP servers should be configured manually via tfcode.json.
|
||||
"""
|
||||
|
||||
from pydantic import BaseModel
|
||||
|
||||
from tf_sync.config import TFConfig
|
||||
from tf_sync.tools import SyncedTool, ToolType
|
||||
|
||||
|
||||
class MCPServerSyncResult(BaseModel):
|
||||
"""Result of MCP server sync operation."""
|
||||
|
||||
success: bool
|
||||
servers: list[SyncedTool] = []
|
||||
error: str | None = None
|
||||
|
||||
|
||||
def sync_mcp_servers(config: TFConfig) -> MCPServerSyncResult:
|
||||
"""
|
||||
Sync MCP servers from ToothFairyAI workspace.
|
||||
|
||||
NOTE: Currently not supported. MCP servers are not exposed via the SDK.
|
||||
Configure MCP servers manually in tfcode.json instead.
|
||||
|
||||
Args:
|
||||
config: TFConfig instance
|
||||
|
||||
Returns:
|
||||
MCPServerSyncResult with error message
|
||||
"""
|
||||
return MCPServerSyncResult(
|
||||
success=False,
|
||||
error="MCP server sync not available via SDK. Configure MCP servers in tfcode.json.",
|
||||
)
|
||||
Reference in New Issue
Block a user