Shared Knowledge MCP Server
Required for running the Weaviate vector database option, with included scripts for managing the Docker-based Weaviate environment.
Provides access to Git-related information, including commit message formats and conventions through the knowledge base search functionality.
Enables indexing and searching of Markdown (.md, .mdx) files, allowing AI assistants to retrieve information from documentation stored in Markdown format.
Supports Milvus as one of the vector store backends for storing and retrieving document embeddings in the knowledge base.
Uses OpenAI's API for vectorizing documents to create embeddings for the knowledge base, requiring an API key for operation.
Implements type-safe interfaces for search requests and results, enabling structured interaction with the knowledge base through strongly-typed APIs.
Shared Knowledge MCP Server
This is a knowledge base MCP server that can be used in common with various AI assistants (CLINE, Cursor, Windsurf, Claude Desktop). It utilizes Retrieval Augmented Generation (RAG) to realize efficient information search and utilization. By sharing the knowledge base between multiple AI assistant tools, it provides consistent information access.
Features
A common knowledge base can be used across multiple AI assistants
High-precision information retrieval using RAG
Type-safe implementation using TypeScript
Supports multiple vector stores (HNSWLib, Chroma, Pinecone, Milvus)
Extensibility through abstracted interfaces
Related MCP server: Confluence MCP Server
install
git clone https://github.com/yourusername/shared-knowledge-mcp.git
cd shared-knowledge-mcp
npm installsetting
The MCP server settings are added to the configuration file of each AI assistant.
VSCode (for CLINE/Cursor)
~/Library/Application Support/Code/User/globalStorage/saoudrizwan.claude-dev/settings/cline_mcp_settings.json :
{
"mcpServers": {
"shared-knowledge-base": {
"command": "node",
"args": ["/path/to/shared-knowledge-mcp/dist/index.js"],
"env": {
"KNOWLEDGE_BASE_PATH": "/path/to/your/rules",
"OPENAI_API_KEY": "your-openai-api-key",
"SIMILARITY_THRESHOLD": "0.7",
"CHUNK_SIZE": "1000",
"CHUNK_OVERLAP": "200",
"VECTOR_STORE_TYPE": "hnswlib"
}
}
}
}Examples of using Pinecone
{
"mcpServers": {
"shared-knowledge-base": {
"command": "node",
"args": ["/path/to/shared-knowledge-mcp/dist/index.js"],
"env": {
"KNOWLEDGE_BASE_PATH": "/path/to/your/rules",
"OPENAI_API_KEY": "your-openai-api-key",
"VECTOR_STORE_TYPE": "pinecone",
"VECTOR_STORE_CONFIG": "{\"apiKey\":\"your-pinecone-api-key\",\"environment\":\"your-environment\",\"index\":\"your-index-name\"}"
}
}
}
}Claude Desktop
~/Library/Application Support/Claude/claude_desktop_config.json :
Example using HNSWLib (default)
{
"mcpServers": {
"shared-knowledge-base": {
"command": "node",
"args": ["/path/to/shared-knowledge-mcp/dist/index.js"],
"env": {
"KNOWLEDGE_BASE_PATH": "/path/to/your/docs",
"OPENAI_API_KEY": "your-openai-api-key",
"SIMILARITY_THRESHOLD": "0.7",
"CHUNK_SIZE": "1000",
"CHUNK_OVERLAP": "200",
"VECTOR_STORE_TYPE": "hnswlib",
"VECTOR_STORE_CONFIG": "{}"
},
"disabled": false,
"autoApprove": []
}
}
}Examples of using Weaviate
{
"mcpServers": {
"shared-knowledge-base": {
"command": "node",
"args": ["/path/to/shared-knowledge-mcp/dist/index.js"],
"env": {
"KNOWLEDGE_BASE_PATH": "/path/to/your/docs",
"OPENAI_API_KEY": "your-openai-api-key",
"SIMILARITY_THRESHOLD": "0.7",
"CHUNK_SIZE": "1000",
"CHUNK_OVERLAP": "200",
"VECTOR_STORE_TYPE": "weaviate",
"VECTOR_STORE_CONFIG": "{\"url\":\"http://localhost:8080\",\"className\":\"Document\",\"textKey\":\"content\"}"
},
"disabled": false,
"autoApprove": []
}
}
}Note : If you are using Weaviate, you must first start the Weaviate server, which can be done with the following command:
./start-weaviate.shdevelopment
Start the development server
npm run devBuild
npm run buildRunning in Production
npm startAvailable Tools
rag_search
Search for information in the knowledge base.
Search Request
interface SearchRequest {
// 検索クエリ(必須)
query: string;
// 返す結果の最大数(デフォルト: 5)
limit?: number;
// 検索のコンテキスト(オプション)
context?: string;
// フィルタリングオプション(オプション)
filter?: {
// ドキュメントの種類でフィルタリング(例: ["markdown", "code"])
documentTypes?: string[];
// ソースパスのパターンでフィルタリング(例: "*.md")
sourcePattern?: string;
};
// 結果に含める情報(オプション)
include?: {
metadata?: boolean; // メタデータを含める
summary?: boolean; // 要約を生成
keywords?: boolean; // キーワードを抽出
relevance?: boolean; // 関連性の説明を生成
};
}Usage Example
Basic search:
const result = await callTool("rag_search", {
query: "コミットメッセージのフォーマット",
limit: 3
});Advanced Search:
const result = await callTool("rag_search", {
query: "コミットメッセージのフォーマット",
context: "Gitの使い方について調査中",
filter: {
documentTypes: ["markdown"],
sourcePattern: "git-*.md"
},
include: {
summary: true,
keywords: true,
relevance: true
}
});Search Results
interface SearchResult {
// 検索クエリに関連する文書の内容
content: string;
// 類似度スコア(0-1)
score: number;
// ソースファイルのパス
source: string;
// 位置情報
startLine?: number; // 開始行
endLine?: number; // 終了行
startColumn?: number; // 開始桁
endColumn?: number; // 終了桁
// ドキュメントの種類(例: "markdown", "code", "text")
documentType?: string;
// 追加情報(include オプションで指定した場合のみ)
summary?: string; // コンテンツの要約
keywords?: string[]; // 関連キーワード
relevance?: string; // 関連性の説明
metadata?: Record<string, unknown>; // メタデータ
}Response example
{
"results": [
{
"content": "# コミットメッセージのフォーマット\n\n以下の形式でコミットメッセージを記述してください:\n\n```\n<type>(<scope>): <subject>\n\n<body>\n\n<footer>\n```\n\n...",
"score": 0.92,
"source": "/path/to/rules/git-conventions.md",
"startLine": 1,
"endLine": 10,
"startColumn": 1,
"endColumn": 35,
"documentType": "markdown",
"summary": "コミットメッセージのフォーマットについての説明文書",
"keywords": ["commit", "message", "format", "type", "scope"],
"relevance": "このドキュメントは検索クエリ \"コミットメッセージのフォーマット\" に関連する情報を含んでいます。類似度スコア: 0.92"
}
]
}These expanded search capabilities enable LLM to process information more accurately and efficiently. Additional information such as location, document type, abstract, and keywords help LLM to better understand and utilize search results.
structure
At startup, it reads Markdown files (.md, .mdx) and text files (.txt) in the specified directory.
Split the document into chunks and vectorize it using the OpenAI API
Creates a vector index using the selected vector store (default: HNSWLib)
Returns documents that are highly similar to a search query
Supported Vector Stores
HNSWLib : A fast vector store stored on the local file system (default)
Chroma : an open source vector database
Pinecone : Managed vector database service (API key required)
Milvus : A large-scale vector search engine
Weaviate : A schema-first vector database (Docker required)
Each vector store is exposed through an abstracted interface, making it easy to switch between them as needed.
How to navigate the Vector Store environment
HNSWLib (default)
HNSWLib saves the vector store on the local file system, so no special configuration is required.
Vector store reconstruction:
./rebuild-vector-store-hnsw.shWeaviate
To use Weaviate, you need Docker.
Start the Weaviate environment:
./start-weaviate.shVector store reconstruction:
./rebuild-vector-store-weaviate.shCheck the status of Weaviate:
curl http://localhost:8080/v1/.well-known/readyStopping the Weaviate environment:
docker-compose downDelete your Weaviate data completely (only if necessary):
docker-compose down -vWeaviate configuration is managed in the docker-compose.yml file. By default, the following settings are applied:
Port: 8080
Authentication: Anonymous access enabled
Vectorization module: None (use external padding)
Data storage: Docker volume (
weaviate_data)
Configuration options
environmental variables | explanation | Default value |
KNOWLEDGE_BASE_PATH | Knowledge Base Path (required) | - |
OPENAI_API_KEY | OpenAI API key (required) | - |
SIMILARITY_THRESHOLD | Similarity score threshold for search (0-1) | 0.7 |
CHUNK_SIZE | Chunk size for splitting text | 1000 |
CHUNK_OVERLAP | Chunk overlap size | 200 |
VECTOR_STORE_TYPE | The type of vector store to use ("hnswlib", "chroma", "pinecone", "milvus"). | "hnswlib" |
VECTOR_STORE_CONFIG | Vector store configuration (JSON string) | {} |
license
ISC
contribution
Fork
Create a feature branch (
git checkout -b feature/amazing-feature)Commit the changes (
git commit -m 'Add some amazing feature')Push to the branch (
git push origin feature/amazing-feature)Create a Pull Request
This server cannot be installed
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 Servers
- FlicenseNot gradedqualityCmaintenanceServer that enhances the capabilities of the Cline coding agent. It provides intelligent code suggestions, reduces hallucinations, and documents the knowledge base by leveraging your project's documentation and detecting the technologies used in your codebase.15
- AlicenseNot gradedqualityDmaintenanceA server that integrates Confluence with Claude Desktop and other AI assistants, enabling natural language interactions with your Confluence documentation.3794MIT
- FlicenseAqualityNot gradedmaintenanceA local-first knowledge base server that enables AI clients to store, retrieve, and manage documents using semantic search. Provides privacy-focused, offline-capable memory for AI assistants with tools for ingesting, querying, updating, and deleting knowledge.716
- FlicenseNot gradedqualityDmaintenanceA local document intelligence and knowledge management server for Claude Desktop that provides RAG-powered Q\&A, media transcription, and URL crawling. It features 11 tools for processing various file types and managing a persistent local vector store with zero infrastructure costs.1
Related MCP Connectors
Driflyte MCP server which lets AI assistants query topic-specific knowledge from web and GitHub.
Connect your team's living knowledge base — docs, data, issues, CRM — to Claude and ChatGPT.
A personal RAG database you build from chat, so AI creates work that sounds like you.
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/j5ik2o/shared-knowledge-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server