Company KB MCP
Provides read-only integration with GitLab repositories, allowing AI assistants to sync, index, search, and retrieve cited answers from Markdown and MDX documentation stored in GitLab projects.
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@Company KB MCP Search the company KB for the deployment runbook for the billing service."
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
Company KB MCP
Company KB MCP is a local-first Model Context Protocol server that lets AI coding assistants search company Markdown knowledge stored in GitLab repositories.
It is designed for GitHub Copilot and Claude Code. The server clones selected GitLab repositories into a local cache, indexes Markdown and MDX files into a local SQLite database, and exposes MCP tools for search, cited answers, document opening, repository sync, and repository removal.
The server is read-only. It does not write to GitLab, push commits, create branches, or update source files.
What It Does
Adds GitLab repositories by URL.
Clones or refreshes shallow local repository mirrors.
Indexes Markdown, MDX, README, docs, ADR, runbook, and playbook content.
Stores repository, document, chunk, and keyword-search data in SQLite.
Optionally stores local vector embeddings with
sqlite-vecand FastEmbed.Returns snippets with GitLab source metadata and canonical source URLs.
Redacts secret-looking values from logs and tool responses.
Related MCP server: Qurio MCP Server
How It Works
A user installs the MCP from the private marketplace.
GitHub Copilot or Claude Code starts the MCP server over stdio.
The user asks the assistant to add a GitLab repository.
The MCP server resolves the GitLab project, clones it locally, and indexes Markdown files.
Later questions use local keyword search, optional semantic search, or both.
The assistant receives cited evidence and uses it to answer the user.
The local index stays on the user's machine. Private repositories require the user to provide a GitLab token through an environment variable.
Install From Private Marketplace
The exact marketplace URL and package registry details are placeholders for now.
GitHub Copilot
Open the private plugin marketplace.
Search for
Company KB.Install the GitHub Copilot target.
If prompted, provide a GitLab token secret named
GITLAB_TOKEN.Restart or reload the IDE MCP tools.
Expected MCP configuration shape:
{
"servers": {
"company-kb": {
"type": "stdio",
"command": "uvx",
"args": ["--from", "company-kb-mcp==0.1.0", "company-kb-mcp", "serve"]
}
}
}Claude Code
Open the private plugin marketplace.
Search for
Company KB.Install the Claude Code target, or run the marketplace-generated install command.
Set
GITLAB_TOKENin your shell if you need private repository access.Start or reload Claude Code and run
/mcpto confirm the server is connected.
Expected Claude Code command shape:
claude mcp add-json --scope user company-kb \
'{"type":"stdio","command":"uvx","args":["--from","company-kb-mcp==0.1.0","company-kb-mcp","serve"],"env":{"GITLAB_TOKEN":"${GITLAB_TOKEN:-}"}}'Basic Usage
After installation, ask your assistant to add a repository:
Use company-kb to sync https://gitlab.com/gitlab-org/cliThen ask questions that need company documentation:
Search company-kb for the deployment runbook for the billing service.Use company-kb to answer with citations: how do we rotate production credentials?Useful actions:
Add a repository: call
company_kb_sync_repositorywith a GitLab URL.Refresh known repositories: call
company_kb_sync.List indexed repositories: call
company_kb_list_repositories.Search documentation: call
company_kb_search.Open exact source context: call
company_kb_open_doc.Build a cited evidence pack: call
company_kb_answer.Remove a repository from the local index: call
company_kb_remove_repository.
Configuration
Configuration is optional for ad hoc usage. Without a config file, repositories can still be added by URL.
Common environment variables:
GITLAB_TOKEN: optional token for private GitLab repositories.COMPANY_KB_CONFIG: optional path to a YAML config file.COMPANY_KB_CACHE_DIR: optional local repository cache directory.COMPANY_KB_DATA_DIR: optional local SQLite index directory.COMPANY_KB_LOG_FILE: optional JSONL log file path.COMPANY_KB_AUTO_SYNC_ON_STARTUP: set to1to refresh indexed repositories when the server starts.
For private GitLab repositories, the token needs:
read_apiread_repository
Do not put token values in marketplace metadata, MCP config files, plugin manifests, or checked-in YAML files.
Local Development
Requirements:
Python 3.11 or newer.
uv.Git 2.30 or newer.
Install dependencies:
uv sync --devStart the MCP server:
uv run company-kb-mcp serveRun tests:
uv run pytestRun a local sync from the CLI:
uv run company-kb-mcp sync-url --url https://gitlab.com/gitlab-org/cliCheck status:
uv run company-kb-mcp statusArchitecture
See ARCHITECTURE.md for the component map and sequence diagrams.
Current Limits
Group discovery is scaffolded, but explicit repository URL sync is the main path.
Production keychain and OAuth auth modes are not implemented in the Python MVP.
company_kb_open_docreads the current local cache; it does not check out historical commits.Semantic search is optional and may download local FastEmbed model files on first use.
Available Tools
9 toolscompany_kb_answerB
Retrieve a focused evidence pack for a natural-language company documentation question. This tool does not invent final policy; it returns cited evidence and guidance for Copilot to synthesize from sources.
Inputs: question (required), limit, filters, requireCitations. Returns: object
company_kb_list_repositoriesA
List GitLab repositories that have been synchronized into the local RAG cache, including their local index counts and last sync metadata.
Inputs: no named parameters. Returns: object
company_kb_open_docA
Open an exact document excerpt or an indexed chunk by reference. Use this after search when more surrounding context or precise source lines are needed.
Inputs: path, commit, chunkId, lineEnd, +3 more. Returns: object
company_kb_recent_changesA
List recently changed indexed Markdown documents. Use this when the user asks what changed recently or wants documentation updates within a time window.
Inputs: days, limit, project. Returns: object
company_kb_remove_repositoryA
Remove one synchronized GitLab repository from the local RAG system. This deletes local index entries, vectors, and by default the local cached clone. It never writes to GitLab.
Inputs: url, project, deleteCache. Returns: object
company_kb_searchA
Search synchronized company Markdown documentation and return ranked snippets with stable GitLab citations. Use this for discovery questions, finding runbooks, locating ADRs, or collecting evidence before answering.
Inputs: query (required), limit, filters, searchMode. Returns: object
company_kb_statusA
Check configuration, GitLab authentication, repository sync state, and index size for the company knowledge base. Use this when search looks stale or broken, or when the user asks whether the MCP server is healthy.
Inputs: no named parameters. Returns: object
company_kb_syncB
Synchronize repositories that have already been added to the local RAG cache and update the Markdown index. Use this before answering when the user asks for fresh docs; normal search does not require a full sync.
Inputs: force, scope, project. Returns: object
company_kb_sync_repositoryA
Synchronize one GitLab repository by URL. The repository is cloned into the local read-only cache, indexed, and made searchable. Auth defaults to env when GITLAB_TOKEN is set, otherwise anonymous. Pass authMode as anonymous, env, or ssh-agent when you need to override it; do not pass token values.
Inputs: url (required), force, authMode, tokenEnv. Returns: object
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 9 tools
Most tools are clearly distinct by action (sync vs search vs open vs answer), but company_kb_sync and company_kb_sync_repository could be confused: one syncs all cached repos, the other syncs a single new repo by URL. company_kb_answer vs company_kb_search also overlap somewhat, though the descriptions separate discovery from evidence-pack retrieval.
All tools share the company_kb_ prefix and most use verb_noun structure (list_repositories, sync_repository, remove_repository, open_doc). Minor inconsistencies exist: recent_changes and answer are not as clearly verb_action as the rest, and sync vs sync_repository differ in level of detail.
9 tools is well-scoped for a knowledge base MCP server covering lifecycle management (sync, add, remove), status/health, search/discovery, and document access. Each tool serves a distinct operational need without bloat, and the count feels complete for the stated purpose.
The surface covers core KB operations: repository sync/add/remove, status, search, recent changes, open doc, and a synthesized answer tool. Minor gaps exist: there is no explicit tool for listing all unsynced GitLab repositories or for clearing/resetting the cache, but agents can work around these using the provided status and sync tools.
Maintenance
Related MCP Connectors
Governed, auditable knowledge your team curates for its AI assistants, self-hostable
Your organization's knowledge as OKF trees in Git, for AI assistants to search, read, and cite
Versioned documentation registry and semantic search for AI tools and coding assistants.
Provide your AI coding tools with token-efficient access to up-to-date technical documentation for…
Related MCP Servers
AlicenseNot gradedqualityBmaintenanceEnables AI coding assistants to query a local knowledge base for persistent, searchable project context, reducing re-explanation and token usage.8Functional Source , Version 1.1, ALv2 Future- AlicenseNot gradedqualityDmaintenanceEnables AI coding assistants to search and retrieve information from a locally ingested knowledge base using hybrid search, grounded in user-curated documentation.17MIT
- FlicenseAqualityDmaintenanceEnables AI assistants to search, read, and retrieve context from local knowledge bases with full-text search, absolute paths, and section-level details.4-
- AlicenseNot gradedqualityCmaintenanceEnables AI coding assistants to search and retrieve code from self-hosted Git repositories using semantic and lexical search with optional reranking, while keeping repository data under the operator's control.MIT