
Store and retrieve entities, relations and observations in a persistent local knowledge graph.

A project that implements its own Model Context Protocol client and server, with the server providing a RESTful API, Anthropic-integrated AI processing, and messaging and context management.
Self-built MCP client and server is cataloged as an MCP server attributed to okikusan-public. A project that implements its own Model Context Protocol client and server, with the server providing a RESTful API, Anthropic-integrated AI processing, and messaging and context management. It is categorized under ai agents-models. See the capability inspector for recorded interfaces and their independent review status; consult upstream documentation for the current interface.
Installation configuration is not reviewed. No executable setup is offered for this entry; inspect the source repository before proceeding.
Catalog license label: MIT. Check the source repository's current license and terms before using, modifying or distributing this software.
能力定义尚未审核。未核验的采集内容不会作为可信接口展示。
暂无可展示的已审核记录。这不表示上游不支持此能力。
暂无可展示的已审核记录。这不表示上游不支持此能力。
暂无可展示的已审核记录。这不表示上游不支持此能力。
Email delivery is not connected. This page does not collect email addresses or create subscriptions.
Browse the registry for current listings instead.
Reviews for Self-built MCP client and server are not available yet
Review publishing and storage are not connected. This page does not collect or publish ratings or comments, including after sign-in.
An Express.js RESTful API server combined with an AI processing engine integrated with Anthropic's API, plus messaging and context management.
No, it is offered for educational and research purposes, and security and error handling should be strengthened for production use.
README.md · 25874d7cfe52 · 采集于 2026-11-13 12:06:03 UTC
保留上游原文,不做 AI 改写。为安全起见过滤脚本、表单和不安全链接。
当前显示最后一次成功采集的文档快照,请以来源页面为准。
このリポジトリは、Model Context Protocol (MCP)のクライアントとサーバーを自作で実装したものです。AnthropicのClaudeモデルとのインタラクションを通じて、MCPの実装方法と活用例を示しています。
Model Context Protocol (MCP)は、AIアシスタントと様々なデータソースを接続するためのオープンスタンダードです。このプロジェクトでは、MCPの基本的な概念を理解し、実際に動作するクライアントとサーバーの両方を実装しています。
MCPサーバー:
WebSocketサポート:
MCPクライアント:
デモアプリケーション:
mcp-client-server/
├── client/ # MCPクライアント実装
│ ├── http-client.ts # HTTP通信クライアント
│ ├── ws-client.ts # WebSocket通信クライアント
│ ├── mcp-client.ts # 統合クライアント
│ ├── types.ts # 型定義
│ └── index.ts # エントリーポイント
├── server/ # MCPサーバー実装
│ ├── controllers/ # APIコントローラー
│ ├── routes/ # APIルート定義
│ ├── services/ # MCPサービス
│ ├── websocket/ # WebSocketサポート
│ ├── types.ts # 型定義
│ └── index.ts # サーバーエントリーポイント
├── examples/ # サンプルアプリケーション
│ ├── http-demo.ts # HTTPデモ
│ ├── websocket-demo.ts # WebSocketデモ
│ └── chat-demo.ts # チャットデモ
├── MCP_DOCUMENTATION.md # MCPに関する詳細資料
├── dist/ # ビルド出力ディレクトリ
└── .env # 環境変数設定
リポジトリをクローンまたはダウンロードします
依存関係をインストールします
npm install
# .envファイルを作成し、以下の内容を設定
PORT=3000
HOST=localhost
ANTHROPIC_API_KEY=your_anthropic_api_key_here
MODEL_NAME=claude-3-opus-20240229
MAX_TOKENS=1000
npm run start:server
サーバーはデフォルトで http://localhost:3000 で起動します。 WebSocketサーバーも同時に ws://localhost:3000 で利用可能になります。
サーバーが起動していることを確認してから実行します。
npm run demo:http
このデモはHTTP APIを使用してMCPサーバーと通信し、以下を行います:
npm run demo:ws
このデモはWebSocketを使用して以下を実演します:
npm run demo:chat
コマンドライン上でリアルタイムにMCPと会話できるインタラクティブなデモです:
| エンドポイント | メソッド | 説明 |
|---|---|---|
/api/health | GET | サーバーのヘルスチェック |
/api/message | POST | 完全なMCPメッセージを送信 |
/api/prompt | POST | シンプルなテキストプロンプトを送信 |
WebSocketエンドポイント: ws://localhost:3000
message - 完全なMCPメッセージを送信prompt - シンプルなテキストプロンプトを送信stream - ストリーミングレスポンスをリクエストconnection - 接続状態の通知message_response - メッセージへの応答prompt_response - プロンプトへの応答stream_start - ストリーミング開始通知stream_chunk - ストリーミングデータチャンクstream_end - ストリーミング終了通知error - エラー通知import { createMCPClient, createPromptRequest, MCPRole } from './client';
// クライアントの作成
const client = createMCPClient({
apiBaseUrl: 'http://localhost:3000',
wsBaseUrl: 'ws://localhost:3000'
});
// HTTP APIを使用した例
async function httpExample() {
// サーバーの状態確認
const health = await client.healthCheck();
console.log('サーバー状態:', health.status);
// シンプルなプロンプト送信
const response = await client.sendPrompt('AIの未来について教えてください');
console.log('応答:', response.response);
}
// WebSocketを使用した例
async function wsExample() {
// WebSocket接続
await client.connectWebSocket();
// イベントリスナーの登録
client.on('prompt_response', (data) => {
console.log('応答:', data.response);
});
// プロンプトの送信
client.sendWebSocketPrompt('量子コンピューティングの可能性は?');
// ストリーミングでのリクエスト
client.on('stream_chunk', (chunk) => {
// リアルタイムでチャンクを処理
process.stdout.write(chunk.content[0].text);
});
// ストリーミングリクエストの送信
client.sendStreamRequest({
messages: [{
role: MCPRole.USER,
content: [{ type: 'text', text: 'AIと人間の協調について詩を書いてください' }]
}],
model: 'claude-3-opus-20240229'
});
}
このプロジェクトは基本的な実装を提供していますが、以下のような拡張が可能です:
詳細な技術資料は MCP_DOCUMENTATION.md を参照してください。このドキュメントには以下の情報が含まれています:
MIT
Claim this server with your GitHub account to request manual ownership verification.
Link to the catalog listing for Self-built MCP client and server from your README. This badge does not certify ownership, compatibility or security.
[](https://awesome-mcp.com/servers/mcp-client-server-okikusan-public)Public repository statistics could not be verified. Check the configured source address; unavailable counts are not zero.
来源、范围和时段分别列出;不相加,不代表安装人数、活跃用户或安全审核。
尚无已审核的包 / 镜像标识,暂不展示下载统计。
Alternative and complementary servers in the same category

Store and retrieve entities, relations and observations in a persistent local knowledge graph.

Organize problem solving into revisable, branching thought steps through an MCP tool.

Query-aware context compression with an MCP plugin for coding agents, plus Python and HTTP interfaces for reducing the context sent to a language model.