knowledge-mcp
Click on "Install 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., "@knowledge-mcpsearch for API authentication docs in the payments repository"
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.
Knowledge MCP Server
A vendor-neutral Knowledge MCP server for Codex, OpenCode, Claude Code, Gemini CLI, and other MCP-compatible clients.
Overview
This server provides a stable MCP interface for knowledge retrieval across repositories. The MCP contract remains stable while storage, search, embedding, indexing, and transport implementations can be replaced independently.
Related MCP server: mcp-documentacao
Features
Stable MCP Contract v1:
knowledge_search,knowledge_get,knowledge_listVendor-Neutral Architecture: Ports and adapters pattern
Hybrid Retrieval: Lexical (SQLite FTS) + Optional Semantic (Qdrant)
Docker Support: Multi-stage BuildKit builds, multi-platform (amd64/arm64)
Quick Start
Prerequisites
Python 3.12+
uv package manager
Docker (optional, for containerized deployment)
Local Development
# Install dependencies
uv sync
# Run tests
uv run pytest
# Run the server (stdio mode)
uv run python -m knowledge_mcp
# Run with HTTP transport
TRANSPORT=http uv run python -m knowledge_mcpDocker Deployment
# Build image
make docker-build
# Start container
make docker-up
# View logs
make docker-logs
# Stop container
make docker-downProject Structure
knowledge-mcp/
├── src/knowledge_mcp/ # Main package
│ ├── __init__.py
│ ├── __main__.py # CLI entrypoint
│ └── server.py # Server implementation
├── tests/ # Test suite
├── docs/ # Documentation
│ ├── decisions/ # Architecture Decision Records
│ └── contracts/ # MCP contract definitions
├── Dockerfile
├── docker-compose.yml
├── Makefile
└── pyproject.tomlArchitecture
The server follows the ports and adapters (hexagonal) architecture:
MCP / CLI / watcher entrypoints
|
v
application services
|
v
domain and ports
^
|
infrastructure adaptersDomain and application packages never import infrastructure, MCP SDK, or provider-specific types.
MCP Contract v1
Tools
Tool | Description |
| Search knowledge with scope, filters, and limits |
| Retrieve exact document or section by ID |
| List documents with prefix and depth filtering |
Resources
URI | Description |
| Server status and health |
| Document content resource |
Knowledge Routing
Mode | Use Case |
| Explicit target, one repository, low architectural risk |
| Ambiguous location, multiple layers |
| Cross-repository, architecture, security |
Configuration
See .env.example for available configuration options.
Key Settings
TRANSPORT: stdio, http, or sseKNOWLEDGE_ROOT: Path to knowledge sourcesLEXICAL_PROVIDER: sqlite_fts (default), or disabledSEMANTIC_PROVIDER: disabled (Phase 8: qdrant)
Development
Quality Gates
# Format check
uv run ruff format --check .
# Lint check
uv run ruff check .
# Type check
uv run pyright
# All checks
make test-ciPhase Implementation
This project follows a phased implementation approach. See the implementation plan for details.
License
MIT
Available Tools
3 toolsknowledge_getA
Get the full content of a specific knowledge document by its document ID. Can retrieve specific sections.
| Name | Required | Description | Default |
|---|---|---|---|
| section | No | Optional section heading to retrieve | |
| max_chars | No | Maximum characters to return | |
| document_id | Yes | The document ID to retrieve |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations, the description carries the full burden of behavioral disclosure. It claims to retrieve 'full content', but the input schema includes a max_chars parameter that can truncate output, creating a potential contradiction between what the description says and the tool's actual behavior. The description also does not mention permissions, errors, or the safety of the read operation.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is two sentences, front-loaded with the main purpose, and contains zero unnecessary words. Every sentence contributes meaning.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
While the tool is simple and the schema covers parameters, there is no output schema. The description only says 'full content' without explaining the return format or whether truncation can occur. It also does not clarify how this tool relates to siblings, leaving some contextual gaps for an agent.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema description coverage is 100%, so the baseline is 3. The description adds context for document_id by mentioning 'by its document ID' and for section with 'specific sections', but it does not explain max_chars beyond what the schema already provides.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the tool retrieves the full content of a knowledge document by ID, using the specific verb 'get' and the resource. It also mentions the ability to retrieve specific sections, which distinguishes it from sibling tools like knowledge_search and knowledge_list.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description implies usage when you have a document ID and need its content, but it does not explicitly state when to use this tool instead of knowledge_search or knowledge_list. There are no explicit exclusions or alternatives mentioned, so guidance is only implied.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
knowledge_listB
List knowledge documents with optional filtering by scope and prefix.
| Name | Required | Description | Default |
|---|---|---|---|
| depth | No | Traversal depth | |
| limit | No | Maximum results | |
| scope | Yes | List scope | |
| prefix | No | Logical knowledge prefix filter | |
| repository | No | Repository ID (required for repository scope) |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations, the description must carry behavioral transparency, but it only states the literal action without disclosing any additional behavioral traits (e.g., read-only guarantee, pagination, auth requirements, potential cost). Listing is implicitly read-only, but the description adds no value beyond the action itself.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is a single sentence that is front-loaded with the primary action and quickly mentions optional filtering. It is concise with no wasted words.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Without an output schema, the description should explain return values, but it doesn't. It also does not mention dependencies like repository being required for repository scope, though the schema covers that. The description is too minimal to be fully contextual for a 5-parameter tool with no output schema.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema description coverage is 100%, so the baseline is 3. The description mentions 'scope and prefix' as filters, but this doesn't add meaning beyond what the schema already describes for these parameters. It doesn't enrich the parameter understanding.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description says 'List knowledge documents', which is a specific verb and resource. The mention of optional filtering by scope and prefix distinguishes it from sibling tools like knowledge_search (which likely searches) and knowledge_get (which likely gets a single document).
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description implies usage by stating it lists documents with optional filtering, but it does not explicitly compare to alternatives or state when not to use it. It lacks clear context on when to choose this over knowledge_search or knowledge_get, though the verb 'list' gives a hint.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
knowledge_searchA
Search for knowledge documents matching a query. Returns relevant documents ranked by relevance.
| Name | Required | Description | Default |
|---|---|---|---|
| kinds | No | Document kinds to filter | |
| limit | No | Maximum results | |
| query | Yes | Search query (1-1000 characters) | |
| scope | Yes | Search scope | all |
| repositories | No | Repository IDs to search (max 10) | |
| include_archived | No | Include archived documents |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
There are no annotations, so the description carries the full burden of behavioral disclosure. It mentions that it returns ranked documents, but does not explicitly state that the operation is read-only, nor does it mention any permissions, side effects, or limitations. This is a significant gap for a tool with no annotation support.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is extremely concise, consisting of two short sentences that are front-loaded with the core purpose. Every word is informative, with no fluff or repetition of the schema.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
The description adequately states the purpose and basic output, but lacks context about the result format, pagination behavior, or distinctions among scopes. Given the tool has 6 parameters and no output schema, the description should provide more guidance to the agent, making it minimally sufficient but not completely helpful.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema description coverage is 100%, and the description adds no additional parameter-specific meaning beyond what the schema already provides. The mention of 'query' in the description is redundant given the schema, so the baseline of 3 applies.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description uses a specific verb ('Search') and resource ('knowledge documents'), clearly indicating the tool's function. It distinguishes itself from siblings 'knowledge_get' and 'knowledge_list' by focusing on search and relevance ranking.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description implies usage for finding relevant documents, but does not explicitly state when to use this tool vs alternatives. It lacks any mention of exclusions, prerequisites, or specific use cases such as when to use knowledge_get or knowledge_list instead.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections. Dates show when Glama detected each change.
3 tool updates
v0.1.0- First observed
knowledge_get - First observed
knowledge_list - First observed
knowledge_search
TDQS
Each tool has a clearly distinct purpose: knowledge_search for query-based relevance, knowledge_get for retrieving by ID, and knowledge_list for enumerating with filters. No overlap in functionality.
All tool names follow a consistent pattern: knowledge_ + verb (search, get, list). The naming is uniform and predictable, with no mixed conventions.
Three tools is a well-scoped count for a read-focused knowledge server. Each tool covers a distinct core operation (search, retrieve, list) without unnecessary bloat.
The server is entirely read-only, offering no operations to create, update, or delete knowledge documents. For a domain implied as 'knowledge management', this is a significant gap that would prevent agents from writing to the knowledge base.
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Related MCP Connectors
Personal knowledge base MCP server with semantic search, auto-categorization, metadata extraction
Token-free MCP server for structured RevoGrid Core, Pro, and Enterprise knowledge retrieval.
MCP server for searching Airweave collections with natural language queries.
Related MCP Servers
- AlicenseNot gradedqualityDmaintenanceMCP server for documentation search that automatically indexes web documentation sites and provides semantic, full-text, or hybrid search capabilities.14MIT
- FlicenseNot gradedqualityCmaintenanceMCP server that indexes technical documents and provides hybrid search (vector + BM25) for retrieval only, without generation.-
- AlicenseAqualityCmaintenanceMCP server that enables local hybrid semantic and keyword search over private PDF, DOCX, Markdown, and text documents without sending data to embedding APIs.94,707MIT
- AlicenseNot gradedqualityBmaintenanceMCP server for a content-first knowledge base, enabling AI agents to search (full-text, semantic, hybrid) and retrieve Markdown documents, list content, and find related docs.18MIT
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/gilanggsb/knowledge-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server