@hugobiotech/bisheng-kb-mcp
v0.2.3
Published
Local stdio MCP server for read-only Bisheng and LightRAG Knowledge Base access.
Readme
Bisheng and LightRAG KB MCP
Local stdio MCP server for read-only Bisheng and LightRAG Knowledge Base access.
Bisheng Configuration
{
"mcpServers": {
"bisheng-kb": {
"command": "npx",
"args": ["-y", "@hugobiotech/[email protected]"],
"env": {
"BISHENG_BASE_URL": "https://ai.hugobiotech.com:27876",
"BISHENG_API_TOKEN": "bsk_live_xxxxxxxxx"
}
}
}
}Use a per-user read-only Bisheng KB API token. Do not use a shared company token unless every exposed KB is intentionally company-wide.
LightRAG Configuration
{
"mcpServers": {
"lightrag-kb": {
"command": "npx",
"args": ["-y", "@hugobiotech/[email protected]"],
"env": {
"LIGHTRAG_BASE_URL": "https://ai.hugobiotech.com:27876",
"LIGHTRAG_API_TOKEN": "kbk_live_xxxxxxxxx",
"LIGHTRAG_DEFAULT_QUERY_PARAMS": "{\"mode\":\"hybrid\",\"top_k\":12,\"chunk_top_k\":6,\"max_entity_tokens\":6000,\"max_relation_tokens\":8000,\"max_total_tokens\":30000,\"hl_keywords\":[],\"ll_keywords\":[],\"response_type\":\"Multiple Paragraphs\",\"user_prompt\":\"Use the retrieved context to answer accurately.\",\"conversation_history\":[],\"only_need_context\":false,\"only_need_prompt\":false,\"enable_rerank\":false,\"include_references\":true,\"include_chunk_content\":true,\"stream\":false}"
}
}
}
}Use a per-user LightRAG KB API key created from the central Knowledge Base API Keys page. One token can wrap one or more authorized LightRAG KBs. Use lightrag_kb_list to see the wrapped KBs, then pass kb_id, kb_slug, or exact kb_name in LightRAG tool calls when the token wraps more than one KB.
LIGHTRAG_KB_ID is no longer required. Existing configs may keep it as an optional default KB selector for compatibility, but new desktop examples should omit it and let the token catalog drive selection.
LIGHTRAG_DEFAULT_QUERY_PARAMS is optional. It must be a JSON object encoded as an env string. Supported fields match the LightRAG query tool schema: mode, top_k, chunk_top_k, max_entity_tokens, max_relation_tokens, max_total_tokens, hl_keywords, ll_keywords, response_type, user_prompt, conversation_history, only_need_context, only_need_prompt, enable_rerank, include_references, include_chunk_content, stream, and nested params. The example includes every defaultable top-level field except query, which must come from each tool call. Unknown keys are ignored. Per-query tool arguments override these defaults.
Tools
bisheng_kb_list: list visible knowledge bases.bisheng_kb_search: retrieve citation-bearing chunks from selected knowledge bases.bisheng_kb_fetch_chunk: fetch one chunk returned by search.lightrag_kb_list: list LightRAG KBs wrapped by the configured token.lightrag_kb_status: show sanitized status and metadata for a selected LightRAG KB.lightrag_kb_search: search a selected LightRAG KB.lightrag_kb_ask: ask a question against a selected LightRAG KB.lightrag_kb_list_tags: list public document tags and facet metadata for a selected LightRAG KB.lightrag_kb_find_articles: return synced document metadata by tags,tag_status=tagged,tag_status=untagged, ortag_status=all.lightrag_kb_search_by_tags: search a selected LightRAG KB and keep only references matching document tags.lightrag_kb_ask_by_tags: ask a selected LightRAG KB and keep only references matching document tags.
Environment
BISHENG_BASE_URL: Bisheng server base URL.BISHENG_API_TOKEN: per-user Bisheng KB API token.BISHENG_TIMEOUT_MS: optional request timeout, defaults to30000.LIGHTRAG_BASE_URL: public AI platform base URL.LIGHTRAG_API_TOKEN: per-user LightRAG KB API token.LIGHTRAG_TIMEOUT_MS: optional request timeout, defaults to30000.LIGHTRAG_DEFAULT_QUERY_PARAMS: optional JSON object with default LightRAG retrieval parameters.LIGHTRAG_KB_ID: optional legacy default LightRAG KB corpus id. New configs should omit it.
