MCP Sample Server
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., "@MCP Sample Server what time is it in Tokyo?"
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.
MCP Sample Server
シンプルなModel Context Protocol (MCP)サーバーのサンプル実装です。
関連プロジェクト
MCPクライアント: このサーバーと対話するための自然言語クライアント
OpenAI APIを使用して自然言語でMCPツールを実行
GitHubリポジトリ: yukinaka/mcp-client
ローカルパス:
../mcp-client/
Related MCP server: Calculator MCP
機能
このMCPサーバーは以下の機能を提供します:
ツール
get_current_time - 現在の時刻を取得
パラメータ:
timezone(オプション) - タイムゾーン(例: Asia/Tokyo, UTC)
calculate - 簡単な計算を実行
パラメータ:
operation- 演算の種類(add, subtract, multiply, divide)a- 最初の数値b- 2番目の数値
リソース
サンプルノートへのアクセス(
note:///welcome,note:///example)
インストール
前提条件
Node.js (v18以上)
npm または yarn
ローカル開発
# リポジトリをクローン
git clone https://github.com/yukinaka/mcp-sample-server.git
cd mcp-sample-server
# 依存関係をインストール
npm install
# ビルド
npm run buildnpmパッケージとしてインストール(公開後)
npm install -g @odenalexbs/mcp-sample-server使い方
MCPクライアントで使用する(推奨)
このサーバーには、OpenAI APIを使用した自然言語クライアントが付属しています。
cd ../mcp-client
npm install
npm start詳細はmcp-client/README.mdを参照してください。
Claude Codeで使用する
.claude/settings.local.json に以下の設定を追加します:
開発版(ローカル)を使用する場合
{
"mcpServers": {
"sample": {
"command": "node",
"args": ["/path/to/mcp-sample-server/dist/index.js"]
}
}
}GitHubから直接使用する場合
{
"mcpServers": {
"sample": {
"command": "npx",
"args": ["-y", "github:yukinaka/mcp-sample-server"]
}
}
}npmパッケージとして使用する場合(公開後)
{
"mcpServers": {
"sample": {
"command": "npx",
"args": ["-y", "@odenalexbs/mcp-sample-server"]
}
}
}他のMCPクライアントで使用する
Claude Desktop等の他のMCPクライアントでも同様に設定できます。クライアントの設定ファイルに上記のような設定を追加してください。
開発
ウォッチモード
npm run watchテスト実行
# サーバーを直接実行してテスト
npm run build
npm startGitHub公開手順
GitHubで新しいリポジトリを作成
ローカルでGitリポジトリを初期化:
git init
git add .
git commit -m "Initial commit: MCP sample server"
git branch -M main
git remote add origin https://github.com/yukinaka/mcp-sample-server.git
git push -u origin main(オプション)npmに公開:
npm login
npm publishカスタマイズ
このサンプルをベースに、独自のツールやリソースを追加できます:
src/index.tsのtools配列に新しいツールを追加CallToolRequestSchemaハンドラーに実装を追加リソースを追加する場合は
resources関連のハンドラーを修正
ライセンス
MIT
参考リンク
Available Tools
2 toolscalculateC
簡単な計算を実行します(加算、減算、乗算、除算)
Inputs: operation (required), a (required), b (required).
get_current_timeB
現在の時刻を取得します
Inputs: timezone.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 2 tools
The two tools have completely distinct purposes: 'calculate' handles mathematical operations, while 'get_current_time' retrieves temporal information. There is no overlap in functionality, making it impossible for an agent to confuse them.
The naming is mixed: 'calculate' uses a verb-only style, while 'get_current_time' follows a verb_noun pattern. Although both are readable, they lack a consistent convention, which could lead to minor confusion in a larger set.
With only 2 tools, this server feels thin and under-scoped for a general-purpose 'MCP Sample Server'. It lacks coverage for common operations beyond basic math and time, suggesting it might be a minimal example rather than a fully functional server.
Given the server's name implies a sample or general utility scope, the toolset is severely incomplete. It misses obvious utilities like string manipulation, file operations, or data conversion, leaving significant gaps that would hinder agent workflows.
Related MCP Connectors
Read-only developer, date, finance, and text utilities. Authless remote MCP server by Clean.tools.
Model Context Protocol server for Studex tools, notifications, and profile integrations
Ovanek MCP: Model Context Protocol server for Ovanek platform tools; writes are dry-run by default.
Concierge MCP for agentic workflows: verified time + drift, uuid, diff, calc, attest, verify.
Related MCP Servers
- AlicenseCqualityDmaintenanceA server that provides tools for performing basic arithmetic operations (addition, subtraction, multiplication, division) via the Model Context Protocol.4ISC
- AlicenseBqualityCmaintenanceA Model Context Protocol server that provides basic calculator functionality for LLMs, enabling them to perform mathematical operations like addition, subtraction, multiplication, division, modulo, and square root.6235 npm15MIT
- FlicenseBqualityDmaintenanceA simple server that provides basic mathematical operations (sum and subtraction) through the Model Context Protocol.21-
- AlicenseBqualityDmaintenanceA Model Context Protocol server implementation that provides basic utility tools including echo, uppercase text conversion, and mathematical calculations.3MIT