This project now includes a separate MCP adapter server in mcp_server.py.
The adapter does not replace existing logic. It calls your existing FastAPI
backend (unimain.py) over HTTP and exposes MCP tools on top.
cd SearchEmbedSDK
uvicorn unimain:app --host 127.0.0.1 --port 8000cd SearchEmbedSDK
python mcp_server.pyEnvironment variables:
CONTEXTCORE_API_BASE_URL(default:http://127.0.0.1:8000)CONTEXTCORE_MCP_TIMEOUT_SECONDS(default:120)MCP_TRANSPORT(default:stdio)
Add an MCP server entry pointing to mcp_server.py.
{
"mcpServers": {
"contextcore-unified": {
"command": "C:\\Users\\USER\\Documents\\SDKSearchImplementation\\SearchEmbedSDK\\.venv\\Scripts\\python.exe",
"args": [
"C:\\Users\\USER\\Documents\\SDKSearchImplementation\\SearchEmbedSDK\\mcp_server.py"
],
"env": {
"CONTEXTCORE_API_BASE_URL": "http://127.0.0.1:8000"
}
}
}
}server_infohealthunified_searchrun_llmindex_scanimage_index_statusrecent_activityfile_preflightstorage_status
Any interface that supports MCP stdio can run the same command setup.
For MCP hosts that support non-stdio transports, you can set:
$env:MCP_TRANSPORT="streamable-http"
python mcp_server.pymcp_server.py is intentionally isolated so backend behavior in unimain.py
stays unchanged.