Skip to main content
Glama
Glanser Guidelines MCP Server

Glanser Guidelines MCP Server

by Vbridge7

Glanser Guidelines MCP Server

チームのコーディングガイドラインコーパスに対するセマンティック検索。 FastMCP + ChromaDB + sentence-transformers (all-MiniLM-L6-v2) を使用。 100%無料 — APIキーや外部サービスは不要で、セットアップ後は完全にオフラインで動作します。


フォルダ構成

mcp-server/
├── server.py          ← MCP server (run this on the host)
├── ingest.py          ← One-time ingestion script
├── requirements.txt   ← Python dependencies
├── documents/         ← Drop your .md guideline files here
│   └── CODING_GUIDELINES.md
└── chroma_db/         ← Created automatically by ingest.py (do not edit)

Related MCP server: Code Memory

セットアップ(ホストマシンで一度だけ実行)

1. 依存関係のインストール

pip install -r requirements.txt

sentence-transformers は初回実行時に all-MiniLM-L6-v2 モデル(約80MB)をダウンロードしてキャッシュします。2回目以降の実行は完全にオフラインです。

2. ドキュメントの追加

Markdownファイルを documents/ フォルダにコピーします:

cp /path/to/CODING_GUIDELINES.md documents/

3. インジェスト(一度埋め込みを行い、ディスクに保存)

python ingest.py

これにより、documents/ 内のすべての .md ファイルが読み込まれ、各セクションが埋め込まれ、ベクトルが chroma_db/ に永続化されます。この操作は、新しいドキュメントを追加したときのみ再実行してください。

便利なフラグ:

python ingest.py --file documents/NEW_DOC.md   # add a single new doc
python ingest.py --reset                        # wipe and re-ingest everything
python ingest.py --list                         # see what is currently indexed

4. サーバーの起動

python server.py

サーバーは http://0.0.0.0:8000 で起動します。


ホスティング(チームでのアクセス)

Railway または Render にデプロイします(どちらも無料枠があります):

  1. この mcp-server/ フォルダをGitリポジトリにプッシュします

  2. そのリポジトリを指す新しいサービスを作成します

  3. 起動コマンドを python server.py に設定します

  4. /app/chroma_db に永続ボリュームをマウントします(デプロイ後も埋め込みデータを保持するため)

  5. デプロイ後、ホストのコンソールから一度だけ python ingest.py を実行します

Railway/Renderは、以下のようなHTTPS URLを自動的に提供します: https://glanser-guidelines-mcp.railway.app


チームの .mcp.json への追加

各チームメンバーは、自身の .mcp.json に以下を追加します:

{
  "mcpServers": {
    "coding-guidelines": {
      "type": "http",
      "url": "https://your-hosted-domain.com/mcp"
    }
  }
}

利用可能なツール

ツール

説明

search_guidelines

すべてのドキュメントを対象としたセマンティック検索 — まずこれを使用してください

get_section

特定のセクションの全文を取得

list_sections

コーパス全体のすべてのセクションタイトルを閲覧

get_by_scope

library、client、または both でルールをフィルタリング

list_documents

インデックス化されたすべてのドキュメントとセクション数を確認


新しいドキュメントの追加

# 1. Copy the new doc
cp NEW_GUIDELINES.md documents/

# 2. Ingest only the new file (does not re-embed existing docs)
python ingest.py --file documents/NEW_GUIDELINES.md

# 3. No server restart needed — ChromaDB is queried live

ローカル開発 / テスト(ホスティングなし)

{
  "mcpServers": {
    "coding-guidelines": {
      "type": "http",
      "url": "http://localhost:8000/mcp"
    }
  }
}

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    Related MCP Connectors

    Related MCP Servers

    • A
      license
      A
      quality
      D
      maintenance
      MCP server with local vector search for your codebase. Smart indexing, semantic search, Git history — all offline.
      7
      87 PyPI
      50
      MIT
    • A
      license
      Not graded
      quality
      B
      maintenance
      A local hybrid-search MCP server that enables coding agents to query files and folders using natural language, returning relevant code chunks with exact source paths. Everything runs on-device with no API keys or network calls.
      36 PyPI
      9
      MIT
    • A
      license
      A
      quality
      B
      maintenance
      Enables natural-language semantic search over your own local files through an MCP server, fully offline without API keys or a server daemon, with optional LLM-grounded answers and exact file:line sources.
      5
      MIT