@hugobiotech/kb-mcp
v0.2.9
Published
Local stdio MCP server for read-only Bisheng, LightRAG, and PrimEvo PostgreSQL access.
Readme
Bisheng, LightRAG, and PrimEvo PostgreSQL MCP
Local stdio MCP server for read-only Bisheng Knowledge Base, LightRAG Knowledge Base, and PrimEvo PostgreSQL access through portal-auth.
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.
PrimEvo PostgreSQL Configuration
{
"mcpServers": {
"primevo-postgres": {
"command": "npx",
"args": ["-y", "@hugobiotech/[email protected]"],
"env": {
"PRIMEVO_POSTGRES_BASE_URL": "https://ai.hugobiotech.com:27876",
"PRIMEVO_POSTGRES_API_TOKEN": "pvpg_live_xxxxxxxxx"
}
}
}
}Use a per-user PrimEvo PostgreSQL API key created from the central Knowledge Base API Keys page. The desktop config must contain only the public portal base URL and the portal-issued pvpg_live_... token. Do not put PRIMEVO_DATABASE_URL, database passwords, internal service names, or provider credentials in local MCP config.
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, exact selectors (pmids,dois,document_ids,document_names,document_identifiers),tag_status=tagged,tag_status=untagged, ortag_status=all; uselimitandoffsetto page complete inventories.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.primevo_db_schema: list visible PrimEvo PostgreSQL tables and safe metadata.primevo_db_table: inspect one visible PrimEvo PostgreSQL table.primevo_db_query: execute one bounded read-only SELECT query through portal-auth.
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.PRIMEVO_POSTGRES_BASE_URL: public AI platform base URL.PRIMEVO_POSTGRES_API_TOKEN: per-user PrimEvo PostgreSQL API token.PRIMEVO_POSTGRES_TIMEOUT_MS: optional request timeout, defaults to30000.
