minimal-mcp-server
Provides a tool to search Japanese Wikipedia for article summaries and links using the Wikipedia API.
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., "@minimal-mcp-server Search Wikipedia for the history of Tokyo Tower"
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.
minimal-mcp-server
MCP(Model Context Protocol)を学ぶための最小構成のサーバー実装です。 Claude Desktop と接続して、チャットからツールを呼び出すことができます。
提供ツール
ツール名 | 説明 | 引数 |
| 入力されたメッセージをそのまま返す |
|
| サーバーの現在日時を返す | なし |
| 日本語Wikipediaで記事の要約を検索する(外部API連携) |
|
Related MCP server: MCP Server TypeScript
セットアップ
必要環境
Node.js v18 以上(
fetchAPI を使用するため)npm
インストール
git clone <repository-url>
cd minimal-mcp-server
npm installビルド
npm run buildsrc/index.ts が build/index.js にコンパイルされます。
動作確認
npm startstdio で待ち受け状態になれば成功です(Ctrl+C で終了)。
Claude Desktop との接続
1. 設定ファイルを編集
macOS の場合:
~/Library/Application Support/Claude/claude_desktop_config.json以下を mcpServers に追加します:
{
"mcpServers": {
"minimal-mcp-server": {
"command": "node",
"args": ["/path/to/minimal-mcp-server/build/index.js"]
}
}
}
/path/to/は実際のパスに置き換えてください。
2. Claude Desktop を再起動
再起動後、チャット入力欄のハンマーアイコンをクリックすると、登録されたツールが一覧に表示されます。
3. ログの確認
MCPサーバーのログは以下に出力されます:
tail -f ~/Library/Logs/Claude/mcp-server-minimal-mcp-server.logstdio トランスポートでは
console.log(stdout)は MCP 通信と干渉するため、ログには必ずconsole.error(stderr)を使用してください。
使い方(Claude Desktop での質問例)
ツールは自然言語で質問するだけで、Claude が自動的に適切なツールを選んで実行します。
echo
「Hello World」とエコーしてget-current-time
今何時?search-wikipedia
東京タワーについて教えて
富士山のWikipedia情報を調べて開発ガイド
プロジェクト構成
minimal-mcp-server/
├── src/
│ └── index.ts # サーバー本体(ツール定義含む)
├── build/ # コンパイル出力(git管理外)
├── package.json
└── tsconfig.jsonツールの追加方法
src/index.ts に server.registerTool() を追加します:
server.registerTool(
"tool-name", // ツール名(ケバブケース推奨)
{
description: "ツールの説明(Claudeがツール選択の判断に使う)",
inputSchema: { // 引数定義(Zodスキーマ)省略可
param1: z.string().describe("引数の説明"),
param2: z.number().describe("引数の説明"),
},
},
async ({ param1, param2 }) => {
// ツールの処理
return {
content: [
{ type: "text", text: "結果のテキスト" },
],
};
},
);ポイント
description は重要です。Claude はこの説明文を見てどのツールを使うか判断します。具体的に書くほど正確に呼び出されます
inputSchema は Zod で定義し、自動的に JSON Schema に変換されてクライアントに公開されます
引数なしのツールは
inputSchemaを省略できます戻り値は
content配列で、type: "text"のオブジェクトを返します
外部 API 連携の例(search-wikipedia)
server.registerTool(
"search-wikipedia",
{
description: "日本語Wikipediaでキーワードを検索し、記事の要約を返すツール",
inputSchema: {
query: z.string().describe("検索キーワード(例: 東京タワー)"),
},
},
async ({ query }) => {
const url = `https://ja.wikipedia.org/api/rest_v1/page/summary/${encodeURIComponent(query)}`;
const res = await fetch(url);
if (!res.ok) {
return {
content: [
{ type: "text", text: `「${query}」に該当する記事が見つかりませんでした。` },
],
};
}
const data = await res.json();
return {
content: [
{
type: "text",
text: `【${data.title}】\n${data.extract}\n\nURL: ${data.content_urls?.desktop?.page ?? "N/A"}`,
},
],
};
},
);技術スタック
技術 | 用途 |
MCP SDK ( | MCP サーバーフレームワーク |
引数のスキーマ定義・バリデーション | |
TypeScript | 型安全な開発 |
StdioServerTransport | Claude Desktop との通信(stdin/stdout) |
トランスポートについて
このサーバーは stdio トランスポート を使用しています。Claude Desktop はこの方式でMCPサーバーと通信します。
Claude Desktop → stdin → StdioServerTransport → McpServer → ツール実行
↓
Claude Desktop ← stdout ← StdioServerTransport ← McpServer ← 結果返却Web アプリとして公開する場合は StreamableHTTPServerTransport を使用します(別途実装が必要)。
Available Tools
3 toolsechoA
入力されたメッセージをそのまま返す簡単なツール
Inputs: message (required).
get-current-timeB
現在の日時を取得するツール
Inputs: no named parameters.
search-wikipediaA
日本語Wikipediaでキーワードを検索し、記事の要約を返すツール
Inputs: query (required).
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 3 tools
Each tool has a clearly distinct purpose: echo returns input messages, get-current-time retrieves the current date/time, and search-wikipedia searches Japanese Wikipedia. There is no overlap in functionality, making tool selection unambiguous for an agent.
The naming follows a mostly consistent verb_noun pattern (echo, get-current-time, search-wikipedia), with echo being a slight deviation as a single verb. The style is readable and predictable, though not perfectly uniform.
With only 3 tools, the server feels thin for a general-purpose MCP server, as it lacks depth in any specific domain. However, it is well-scoped for minimal functionality, avoiding bloat.
The toolset is severely incomplete for any coherent domain; it mixes unrelated utilities (echo, time) with a specific search function (Wikipedia). There are obvious gaps, such as missing CRUD operations or a focused workflow, which could lead to agent failures.
Maintenance
Related MCP Connectors
A simple Typescript MCP server built using the official MCP Typescript SDK and smithery/cli. This…
Nifty's MCP server — exposes tasks, projects, messages, and files as tools for AI agents.
MCP server for progressive tool usage at any scale (see https://klavis.ai)
A comprehensive Model Context Protocol (MCP) server that enables AI assistants to interact with yo…
Related MCP Servers
- AlicenseDqualityDmaintenanceA minimal Model Context Protocol server in TypeScript that demonstrates MCP-compliant resources and tools for LLMs, featuring simple resources and a basic tool that echoes messages or returns greetings.15Apache 2.0
- -licenseNot gradedqualityNot gradedmaintenanceA production-ready TypeScript MCP server providing basic tools (add, echo, timestamp), resources (server info, greetings, data access), and prompt templates (analyze, code-review, summarize). Serves as a foundation for building custom MCP servers with extensible architecture.547 npm-
- AlicenseNot gradedqualityDmaintenanceA Node.js/TypeScript MCP server template with sample tools (ping and system_info) that demonstrates how to build custom tools for Claude Desktop using stdio transport.MIT
- AlicenseNot gradedqualityDmaintenanceA local Model Context Protocol (MCP) server that exposes custom tools to Claude Desktop, enabling direct interaction with your local environment. It provides a framework for building and integrating custom TypeScript tools into the Claude interface.MIT