マナリンクのModel Context Protocol (MCP) サーバー実装です。AIアシスタントが先生検索などの機能を利用できるようにします(トライアル実装です)
What is TeXmeijin manalinkMCP
マナリンクMCPサーバー
マナリンクのModel Context Protocol (MCP) サーバー実装です。AIアシスタントが先生検索などの機能を利用できるようにします。
機能
このMCPサーバーは以下のツールを提供します:
- 科目マスタ取得: 科目名と科目IDのマスタを取得
- 特徴マスタ取得: コース特徴のマスタを取得(APIから動的に取得)
- 学年マスタ取得: 学年名とIDのマスタを取得
- 先生検索(詳細指定): 科目ID、学年IDなどの詳細パラメータで先生を検索
前提条件
- Node.js 18+
- npm または yarn
インストール
# リポジトリのクローン
git clone [リポジトリURL]
cd manalink-mcp
# 依存関係のインストール
npm install
使い方
開発モード
npm run dev
本番モード
npm run build
npm start
Claude for Desktopとの連携
Claude for Desktopで使用するには、claude_desktop_config.json
ファイルに設定を追加します。
- Claude for Desktopの設定ファイルを開く
code ~/Library/Application\ Support/Claude/claude_desktop_config.json
- 以下の設定を追加
{
"mcpServers": {
"manalink": {
"command": "node",
"args": [
"/絶対パス/manalink-mcp/dist/index.js"
]
}
}
}
- Claude for Desktopを再起動
MCP ツール
1. 科目マスタ取得
// ツール名: get_subject_master
// パラメータ: なし
2. 特徴マスタ取得
// ツール名: get_course_features
// パラメータ: なし
3. 学年マスタ取得
// ツール名: get_grade_master
// パラメータ: なし
4. 先生検索 (詳細指定)
// ツール名: search_teachers_advanced
// パラメータ:
// - subject_ids: 科目IDの配列(オプション)
// - grade_ids: 学年IDの配列(オプション)
// - course_feature_id: 特徴ID(オプション)
// - sort: ソート順(オプション)[pr, certification, rating, lesson_count, latest]
// - desired_teaching_period: 指導期間(オプション)[monthly, once]
検証方法
MCP Inspectorを使用して検証することができます。
- ビルドを実行してから、インスペクタを実行します
npm run build
npx @modelcontextprotocol/inspector node dist/index.js
ライセンス
MIT
HTMLからMarkdownへの変換機能
マナリンクから取得したHTMLコンテンツをマークダウン形式に変換する機能を実装しています。
インストール方法
npm install node-html-markdown
使用方法
import { convertHtmlToMarkdown } from './utils/api';
// HTMLからMarkdownへの変換
const html = `
<div>
<h1>マナリンク</h1>
<p>オンライン家庭教師プラットフォーム</p>
<ul>
<li><a href="/about">サービスについて</a></li>
<li><a href="/teachers">先生を探す</a></li>
</ul>
</div>
`;
const markdown = convertHtmlToMarkdown(html);
console.log(markdown);
変換結果
上記のHTMLからは以下のようなマークダウンが生成されます:
# マナリンク
オンライン家庭教師プラットフォーム
* *サービスについて*
* *先生を探す*
先生検索結果のマークダウン変換
先生検索APIでは、検索結果をHTML形式とMarkdown形式の両方で取得できます:
import { searchTeachers } from './utils/api';
// 数学の中学生を教えられる先生を検索
const result = await searchTeachers({
subject_ids: [2], // 数学
grade_ids: [4], // 中学1年生
sort: 'rating'
});
// HTML形式の検索結果
console.log(result.bodyContent);
// Markdown形式の検索結果
console.log(result.markdown);
Leave a Comment
Frequently Asked Questions
What is MCP?
MCP (Model Context Protocol) is an open protocol that standardizes how applications provide context to LLMs. Think of MCP like a USB-C port for AI applications, providing a standardized way to connect AI models to different data sources and tools.
What are MCP Servers?
MCP Servers are lightweight programs that expose specific capabilities through the standardized Model Context Protocol. They act as bridges between LLMs like Claude and various data sources or services, allowing secure access to files, databases, APIs, and other resources.
How do MCP Servers work?
MCP Servers follow a client-server architecture where a host application (like Claude Desktop) connects to multiple servers. Each server provides specific functionality through standardized endpoints and protocols, enabling Claude to access data and perform actions through the standardized protocol.
Are MCP Servers secure?
Yes, MCP Servers are designed with security in mind. They run locally with explicit configuration and permissions, require user approval for actions, and include built-in security features to prevent unauthorized access and ensure data privacy.
Related MCP Servers
chrisdoc hevy mcp
sylphlab pdf reader mcp
An MCP server built with Node.js/TypeScript that allows AI agents to securely read PDF files (local or URL) and extract text, metadata, or page counts. Uses pdf-parse.
aashari mcp server atlassian bitbucket
Node.js/TypeScript MCP server for Atlassian Bitbucket. Enables AI systems (LLMs) to interact with workspaces, repositories, and pull requests via tools (list, get, comment, search). Connects AI directly to version control workflows through the standard MCP interface.
aashari mcp server atlassian confluence
Node.js/TypeScript MCP server for Atlassian Confluence. Provides tools enabling AI systems (LLMs) to list/get spaces & pages (content formatted as Markdown) and search via CQL. Connects AI seamlessly to Confluence knowledge bases using the standard MCP interface.
prisma prisma
Next-generation ORM for Node.js & TypeScript | PostgreSQL, MySQL, MariaDB, SQL Server, SQLite, MongoDB and CockroachDB
Zzzccs123 mcp sentry
mcp sentry for typescript sdk
zhuzhoulin dify mcp server
zhongmingyuan mcp my mac
zhixiaoqiang desktop image manager mcp
MCP 服务器,用于管理桌面图片、查看详情、压缩、移动等(完全让Trae实现)
zhixiaoqiang antd components mcp
An MCP service for Ant Design components query | 一个减少 Ant Design 组件代码生成幻觉的 MCP 服务,包含系统提示词、组件文档、API 文档、代码示例和更新日志查询
Submit Your MCP Server
Share your MCP server with the community
Submit Now