Cover image
Try Now
2025-04-14

3 years

Works with Finder

2

Github Watches

0

Github Forks

1

Github Stars

nabchan-mcp-server

[!WARNING] これは実験的なプロジェクトであり、改善の余地が大いにあります。

概要

Nablarchの解説書をもとにしてNablarchの情報を返すMCPサーバーです。

Getting started

Dockerを使って簡単に試せます。

graph LR
  a[VSCode]
  b[nabchan-mcp-server<br>(Dockerコンテナ)]
  a -->|標準入出力で通信| b

VSCodeへ次の設定を追加してください。

{
  "mcp": {
    "inputs": [],
    "servers": {
      "nablarch-document": {
        "command": "docker",
        "args": [
          "run",
          "-i",
          "--rm",
          "--network",
          "none",
          "-e",
          "TRANSPORT=stdio",
          "ghcr.io/backpaper0/nabchan-mcp-server",
        ]
      }
    }
  }
}

GitHub Copilot ChatをAgentモードにしてNablarchに関する質問をしてみてください。

アーキテクチャ

とりあえずローカルのPythonだけで動作するような構成を取っています。

Whooshという全文検索ライブラリとJanomeという形態素解析ライブラリを使ってインデックスを構築しています。 解説書のHTMLから抽出したテキストを形態素解析したものが全文検索の対象フィールドとなります。 それ以外にもタイトルや概要、内容をmarkdown形式に変換したものをもっており、それらはMCPサーバーが提供するAPIで利用されます。

graph TD
   h[Nablarchの解説書<br>(HTMLファイル)]
   c(テキスト)
   d(概要)
   t(タイトル)
   m(markdown)
   i[Whooshのインデックス]

   h -->|BeautifulSoupで<br>テキスト抽出| c
   c -->|Janomeで形態素解析| i
   c -->|LLMで要約| d
   d --> i
   h -->|BeautifulSoupで<br>タイトル抽出|t
   t --> i
   h -->|html2textで<br>markdown化| m
   m --> i

MCPサーバーが提供しているAPIは次の通りです。

  • read_document
    • URLが示すNablarchのドキュメントをmarkdown形式へ変換したものを返します。
  • search_document
    • Nablarchのドキュメントを検索します。返される情報は次の通り
      • タイトル
      • URL
      • 概要

必要な環境

  • Python 3.11
  • uv
  • Git
  • Docker

インデックスの構築

uv run -m tools.build_index

[!NOTE] サブモジュールの中身を取得していない場合、git submodule initgit submodule updateを実行してください。

検索を試す

uv run -m tools.search_document -q "Nablarch"

開発時のVSCode設定例

/path/to/nabchan-mcp-serverは実際のパスに置き換えてください。

{
  "mcp": {
    "inputs": [],
    "servers": {
      "nablarch-document": {
        "command": "uv",
        "args": [
          "--directory",
          "/path/to/nabchan-mcp-server",
          "run",
          "-m",
          "nabchan_mcp_server.main",
        ]
      }
    }
  }
}

トランスポートタイプにSSEを使う場合はこちら。

{
  "mcp": {
    "inputs": [],
    "servers": {
      "nablarch-document": {
        "type": "sse",
        "url": "http://localhost:8000/sse"
      }
    }
  }
}

SSEを使う場合は次のコマンドであらかじめサーバーを起動しておく必要があります。

uv run -m nabchan_mcp_server.main --transport sse --host localhost

相关推荐

  • Joshua Armstrong
  • Confidential guide on numerology and astrology, based of GG33 Public information

  • https://suefel.com
  • Latest advice and best practices for custom GPT development.

  • Alexandru Strujac
  • Efficient thumbnail creator for YouTube videos

  • Emmet Halm
  • Converts Figma frames into front-end code for various mobile frameworks.

  • Elijah Ng Shi Yi
  • Advanced software engineer GPT that excels through nailing the basics.

  • https://maiplestudio.com
  • Find Exhibitors, Speakers and more

  • Lists Tailwind CSS classes in monospaced font

  • lumpenspace
  • Take an adjectivised noun, and create images making it progressively more adjective!

  • https://appia.in
  • Siri Shortcut Finder – your go-to place for discovering amazing Siri Shortcuts with ease

  • Carlos Ferrin
  • Encuentra películas y series en plataformas de streaming.

  • Yusuf Emre Yeşilyurt
  • I find academic articles and books for research and literature reviews.

  • tomoyoshi hirata
  • Sony α7IIIマニュアルアシスタント

  • apappascs
  • 发现市场上最全面,最新的MCP服务器集合。该存储库充当集中式枢纽,提供了广泛的开源和专有MCP服务器目录,并提供功能,文档链接和贡献者。

  • ShrimpingIt
  • MCP系列GPIO Expander的基于Micropython I2C的操作,源自ADAFRUIT_MCP230XX

  • jae-jae
  • MCP服务器使用剧作《无头浏览器》获取网页内容。

  • ravitemer
  • 一个功能强大的Neovim插件,用于管理MCP(模型上下文协议)服务器

  • patruff
  • Ollama和MCP服务器之间的桥梁,使本地LLMS可以使用模型上下文协议工具

  • pontusab
  • 光标与风浪冲浪社区,查找规则和MCP

  • av
  • 毫不费力地使用一个命令运行LLM后端,API,前端和服务。

  • Mintplex-Labs
  • 带有内置抹布,AI代理,无代理构建器,MCP兼容性等的多合一桌面和Docker AI应用程序。

  • WangRongsheng
  • 🧑‍🚀 llm 资料总结(数据处理、模型训练、模型部署、 o1 模型、mcp 、小语言模型、视觉语言模型)|摘要世界上最好的LLM资源。

  • modelcontextprotocol
  • 模型上下文协议服务器

    Reviews

    3 (1)
    Avatar
    user_NXK84fj9
    2025-04-17

    Nabchan-mcp-server by backpaper0 is an exceptional server management tool. It provides a seamless, efficient way to manage multiple connections with great ease. The setup is straightforward and the performance is impressive. As an avid MCP application user, I highly recommend this server for its reliable and robust features. Check it out at https://github.com/backpaper0/nabchan-mcp-server.