Claude MCP Knowledge Base
Indexes GitHub repositories to build a knowledge base for MCP development, automatically syncing with official MCP repositories and user repositories containing .claude/ directories.
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., "@Claude MCP Knowledge Base search knowledge base for MCP tool patterns"
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.
Claude MCP Knowledge Base
Eliminate repeated MCP research - A persistent knowledge base server for Model Context Protocol (MCP) development with GitHub integration and removal blocklist.
Features
Zero-Research MCP Creation: Built-in knowledge of MCP specifications, best practices, and patterns
Always Up-to-Date: Automatically syncs from official MCP repositories and community examples
GitHub Integration: Indexes your
.claude/directories across all repositoriesRemoval Blocklist: Track deleted MCPs and exclude file patterns permanently
Periodic Sync: Auto-updates knowledge base every 30 minutes (configurable)
Fast Search: Keyword-based search across all indexed documentation
Related MCP server: obsidian-kb
Quick Start
Prerequisites
Node.js ≥18
GitHub Personal Access Token (for indexing repos)
Installation
npm install -g @grandinharrison/claude-mcp-kbOr use with npx:
npx @grandinharrison/claude-mcp-kbSetup
Set GitHub Token:
export GITHUB_TOKEN="your_github_pat_here"Or authenticate with Claude Code (token will be auto-detected from ~/.claude/.credentials.json).
Add to Claude Code:
Add to your .claude/settings.json:
{
"mcpServers": {
"knowledge-base": {
"command": "npx",
"args": ["-y", "@grandinharrison/claude-mcp-kb"],
"env": {
"GITHUB_TOKEN": "your_token_here"
}
}
}
}Or use the CLI:
claude mcp add --transport stdio knowledge-base -- npx @grandinharrison/claude-mcp-kbFirst Run:
The server will automatically:
Create
~/.claude-kb/directoryIndex official MCP repositories
Discover your repos with
.claude/directoriesStart periodic sync (every 30 minutes)
Usage
Available Tools
search_knowledge_base
Search MCP documentation, examples, and best practices.
{
"query": "how to implement MCP tool with error handling",
"maxResults": 10
}Returns: Ranked search results with snippets and source files.
get_mcp_specification
Get current MCP protocol spec, best practices, and common patterns.
{}Returns: Complete MCP specification with lifecycle, transports, capabilities.
list_repositories
List all indexed repositories with file counts.
{}Returns: Repository list with counts.
add_blocklist_entry
Add MCP server or file pattern to blocklist.
{
"type": "file_pattern",
"pattern": "**/*.secret.md",
"reason": "Contains sensitive information"
}Or block a server:
{
"type": "server",
"serverName": "@example/bad-mcp-server",
"reason": "Security vulnerability"
}check_blocklist
Check if something is blocked.
{
"serverName": "@example/my-server"
}update_knowledge_base
Manually trigger sync (normally automatic).
{
"force": true
}Configuration
Edit ~/.claude-kb/config.json:
{
"version": "1.0.0",
"repositories": [
{
"owner": "your-org",
"repo": "your-repo",
"branch": "main",
"includePatterns": [".claude/**/*.md"],
"excludePatterns": ["**/node_modules/**"],
"indexingEnabled": true,
"type": "user"
}
],
"sync": {
"enabled": true,
"intervalMinutes": 30,
"autoDiscoverUserRepos": true,
"includeOfficialMCPRepos": true,
"includeCommunityRepos": true
},
"storage": {
"cacheDir": "~/.claude-kb",
"maxIndexSizeMB": 1000
},
"blocklist": {
"enabled": true,
"strict": true
}
}Configuration Options
repositories: Explicitly configured repos to index
sync.intervalMinutes: How often to sync (5-1440 minutes)
sync.autoDiscoverUserRepos: Auto-find your repos with
.claude/dirssync.includeOfficialMCPRepos: Index modelcontextprotocol/* repos
sync.includeCommunityRepos: Index awesome-mcp-servers lists
blocklist.strict: Block without prompting user
Blocklist
The blocklist is stored in ~/.claude-kb/data/blocklist.json as an append-only log.
Block a File Pattern
{
"type": "file_pattern",
"pattern": "**/private/**",
"reason": "Exclude private directories"
}Block an MCP Server
{
"type": "server",
"serverName": "@malicious/mcp-server",
"version": "1.0.0",
"reason": "Security vulnerability CVE-2025-12345"
}Removal is Permanent
Once blocked, entries remain in the log forever (unless manually edited). To override:
Edit
~/.claude-kb/data/blocklist.jsonSet
allowOverride: trueon the entryRestart server
Storage Structure
~/.claude-kb/
├── config.json # Configuration
├── data/
│ ├── specification.json # MCP spec cache
│ └── blocklist.json # Blocklist log
├── repos/ # Cached repository content
│ ├── modelcontextprotocol/
│ │ └── servers/
│ └── your-username/
│ └── your-repo/
└── templates/ # MCP templates (future)Development
Build from Source
git clone https://github.com/grandinharrison/claude-mcp-kb.git
cd claude-mcp-kb
npm install
npm run buildRun in Dev Mode
npm run devRun Tests
npm testRoadmap
Current (v0.1.0)
✅ Basic keyword search
✅ GitHub integration
✅ Periodic sync
✅ Blocklist (servers + file patterns)
✅ Official MCP repos indexing
✅ Auto-discover user repos
Planned (v0.2.0)
Vector search (txtai/FAISS integration)
Semantic similarity scoring
MCP server templates generation
Real-time webhook sync
Web UI for blocklist management
Future
Multi-cloud support (GitLab, Bitbucket)
Team collaboration features
Usage analytics
Knowledge graph relationships
Troubleshooting
"GitHub token not found"
Set GITHUB_TOKEN environment variable or authenticate with Claude Code.
"Error fetching repo"
Check:
Token has
reposcopeRepository exists and you have access
Network connectivity
Knowledge base not updating
Check
~/.claude-kb/config.json- ensuresync.enabled: trueManually trigger:
update_knowledge_basetoolCheck logs in stderr output
Slow searches
Current MVP uses keyword search. Upgrade to vector search in v0.2.0 for faster semantic search.
Contributing
Contributions welcome! Please:
Fork the repository
Create a feature branch
Add tests for new functionality
Submit a pull request
License
MIT License - see LICENSE file
Author
Harrison Grandin
Acknowledgments
Built on @modelcontextprotocol/sdk
Inspired by the MCP community
Special thanks to Anthropic for Claude Code
Available Tools
6 toolsadd_blocklist_entryA
Add an entry to the blocklist. Can block MCP servers or exclude file patterns from indexing.
Inputs: type (required), reason (required), pattern, serverName.
check_blocklistC
Check if a server or file pattern is blocked.
Inputs: pattern, serverName.
get_mcp_specificationA
Get the current MCP protocol specification, best practices, and common patterns. Always up-to-date knowledge about MCP development.
Inputs: no named parameters.
list_repositoriesA
List all repositories currently indexed in the knowledge base with file counts.
Inputs: no named parameters.
search_knowledge_baseA
Search the MCP knowledge base for documentation, examples, and best practices. Searches across official MCP repos, community servers, and your repositories with .claude/ directories.
Inputs: query (required), maxResults.
update_knowledge_baseA
Manually trigger a knowledge base update from GitHub. Normally happens automatically every 30 minutes.
Inputs: force.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 6 tools
Most tools target distinct resource-action pairs, but search_knowledge_base and get_mcp_specification both cover MCP documentation and best practices and could be confused. The descriptions help by distinguishing broad search from canonical spec retrieval, so the ambiguity is limited.
All tool names consistently follow a verb_noun pattern: search, list, get, add, check, update. Multiword objects like blocklist_entry and knowledge_base do not break the predictability of the naming convention.
Six tools is a well-scoped count for a knowledge base MCP server. Each tool covers an essential workflow: searching, listing indexed content, retrieving the spec, managing blocklist entries, and triggering updates.
The core search, listing, spec retrieval, and update workflows are covered, but the blocklist lifecycle is incomplete—there is no way to remove an entry or list all blocked entries. An accidental blocklist addition becomes a dead end for the agent.
Maintenance
Related MCP Connectors
A MCP server built for developers enabling Git based project management with project and personal…
An MCP server that gives your AI access to the source code and docs of all public github repos
Repository knowledge graph MCP server for codebase understanding and debugging.
Driflyte MCP server which lets AI assistants query topic-specific knowledge from web and GitHub.
Related MCP Servers
- FlicenseBqualityDmaintenanceAn MCP server that enables interaction with Markdown knowledge bases, allowing users to search and retrieve content by tags, text, URL, or date range from their local markdown files.791-
- FlicenseCqualityDmaintenanceGit-backed MCP server for creating and maintaining an Obsidian-style markdown knowledge base with full CRUD, search, and git sync.7-
- AlicenseNot gradedqualityDmaintenanceA knowledge base MCP server backed by Qdrant vector database with local embeddings for semantic search and document management.3 npm1ISC
- FlicenseAqualityBmaintenanceAn MCP server that acts as a knowledge engine for software projects, delivering relevant context at the start of a task and accumulating knowledge at its end through tools like start_task, context, finish_task, remember, and search, with a file-based source of truth and optional semantic retrieval via Graphiti/Neo4j.5-