Code Knowledge MCP Server
コード知識ツール
ベクトル埋め込みを用いたコードリポジトリ向けの知識管理ツールです。高度な埋め込み技術を用いて、コードベースに関する知識の維持とクエリを支援します。
ビルドとインストール
1. パッケージをビルドする
まず、配布ファイルをビルドする必要があります。
# Clone the repository
git clone https://github.com/yourusername/code-knowledge-tool.git
cd code-knowledge-tool
# Create and activate a virtual environment
python -m venv venv
source venv/bin/activate
# Install build tools
python -m pip install --upgrade pip build
# Build the package
python -m buildこれにより、dist/ ディレクトリに 2 つのファイルが作成されます。
code_knowledge_tool-0.1.0-py3-none-any.whl (インストール用のホイール ファイル)
code_knowledge_tool-0.1.0.tar.gz (ソース配布)
2. パッケージをインストールする
前提条件
Ollama がインストールされ、実行されていることを確認します。
# Install Ollama (if not already installed)
curl https://ollama.ai/install.sh | sh
# Start Ollama service
ollama serveパッケージをインストールします。
オプション 1: ホイール ファイルからインストールする (使用上の推奨)
# Navigate to where you built the package
cd /path/to/code_knowledge_tool
# Install from the wheel file
pip install dist/code_knowledge_tool-0.1.0-py3-none-any.whlオプション 2: 編集可能モードでインストールする (開発に推奨)
このオプションは、ツールを変更したり、開発に貢献したりする場合に最適です。
# Assuming you're already in the code-knowledge-tool directory
# and have activated your virtual environment
# Install in editable mode with development dependencies
pip install -e ".[dev]"Related MCP server: hive-memory
RooCode/Clineとの統合
MCP 構成を設定にコピーします。
Cline (VSCode) の場合:
# Open the settings file
open ~/Library/Application\ Support/Code/User/globalStorage/rooveterinaryinc.roo-cline/settings/cline_mcp_settings.json次の構成を追加します。
{
"mcpServers": {
"code_knowledge": {
"command": "python",
"args": ["-m", "code_knowledge_tool.mcp_tool"],
"env": {
"PYTHONPATH": "${workspaceFolder}"
}
}
}
}RooCodeの場合:
# Open the settings file
open ~/Library/Application\ Support/RooCode/roocode_config.json上記と同じ構成を追加します。
新しいツールをロードするには、RooCode/Cline を再起動します。
メモリバンクおよびRAGコンテキストプロバイダーとして使用
このツールは、プロジェクトのメモリバンクおよびRAGコンテキストプロバイダーとして機能します。設定手順は次のとおりです。
提供されたテンプレートをプロジェクトにコピーします。
cp clinerules_template.md /path/to/your/project/.clinerulesプロジェクトのニーズに合わせて .clinerules のルールとパターンをカスタマイズします
テンプレートには、次の事項に関する包括的な手順が含まれています。
ナレッジベース管理
RAGベースの開発ワークフロー
コード品質ガイドライン
メモリ管理の実践
完全な設定と使用方法の詳細については、clinerules_template.md を参照してください。
特徴
コード知識のためのローカルベクトルストレージ
Ollamaを使用した効率的な埋め込み生成
複数のファイル形式のサポート
コンテキスト認識コード理解
MCP 経由の RooCode および Cline との統合
RAGベースのコンテキスト拡張
永続的な知識の保存
要件
Python 3.8以上
ローカルで実行されている Ollama サービス
ベクトル演算用のchromadb
発達
テストの実行
このプロジェクトは、エンドツーエンドの機能とMCP契約の遵守に重点を置いた統合優先のテストアプローチを採用しています。テストスイートは以下のとおりです。
MCP 契約テスト
ツールの登録と実行
リソース管理
知識操作
エラー処理
パッケージビルドテスト
インストール検証
依存関係の解決
MCPサーバーの初期化
基本機能
テストを実行するには:
# Install test dependencies
pip install -e ".[dev]"
# Run all tests
pytest
# Run specific test suites
pytest tests/integration/test_mcp_contract.py -v # MCP functionality
pytest tests/integration/test_package_build.py -v # Installation verificationテスト環境の要件:
# Ensure Ollama is running
ollama serveテストでは、テスト実行間で自動的にクリーンアップされる一時ディレクトリ (test_knowledge_store) が使用されます。
テスト戦略とパターンの詳細については、 docs/のドキュメントを参照してください。
将来の配布
このパッケージを pip 経由で利用できるようにするには (つまり、 pip install code-knowledge-tool )、次の手順を実行する必要があります。
PyPIにアカウントを登録する
twine をインストールします:
pip install twineディストリビューションをアップロードする:
twine upload dist/*
ただし、現時点では、上記のローカル ビルドおよびインストール方法を使用してください。
ライセンス
MITライセンス
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections. Dates show when Glama detected each change.
No tool schema history has been recorded yet.
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 Connectors
Project memory, semantic code search, and grounded agent context.
Shared memory for coding agents. Stop re-explaining your codebase every session.
Project memory for coding agents: requirements, decisions, code graph and delivery telemetry.
1Persistent memory for Claude Code and Cursor. Stop re-explaining your project every session.
Related MCP Servers
- AlicenseNot gradedqualityCmaintenanceProvides AI coding assistants with persistent project memory to retain architectural decisions, code patterns, and domain knowledge across sessions. It stores data locally in a SQLite database, allowing agents to remember, recall, and manage project-specific context using full-text search.13Apache 2.0
- AlicenseNot gradedqualityCmaintenanceProvides AI coding agents with persistent, graph-connected memory across projects, enabling cross-project context retrieval via synaptic connections and hybrid search.156MIT
- AlicenseNot gradedqualityDmaintenanceEnables AI coding agents to retrieve and manage code context with hybrid search, project memory, and observability via MCP tools.29MIT
- AlicenseBqualityDmaintenancePersistent, searchable project memory for Claude Code. Each project has its own local DuckDB with vector embeddings, auto-loading context at session start.2430MIT
Appeared in Searches
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/davidvc/code-knowledge-mcptool'
If you have feedback or need assistance with the MCP directory API, please join our Discord server