MCP Server Template
MCP サーバー テンプレート
前提条件
LLM CLI インストール
このプロジェクトではLLM CLIのインストールが必要です。Homebrewを使ってインストールできます。
brew install llmインストール後、次のコマンドを実行して、PATH でllmコマンドが使用可能であることを確認します。
llm --versionRelated MCP server: MCP Server Template
はじめる
発達
依存関係をインストールします:
npm installホット リロードで開発サーバーを起動します。
npm run devプロジェクトをビルドします。
npm run buildテストを実行します:
npm test本番サーバーを起動します。
npm start
アーキテクトツール
Architect ツール ( src/tools/architect.ts ) は、LLM CLI と対話してアーキテクチャ設計のフィードバックを得るためのインターフェースを提供します。会話コンテキストを維持し、アプリケーションと LLM CLI 間の通信を処理します。
特徴
複数のやり取りにわたって会話のコンテキストを維持する
LLM CLI を通じてコマンド実行を処理します
エラー処理とログ記録を提供します
新しい会話と継続的な議論の両方をサポートします
要件
LLM CLI がインストールされ、PATH で利用可能である必要があります (前提条件セクションを参照)
LLM CLIの環境変数は適切に設定されている必要があります
テスト
テンプレートには、ローカル テスト用の組み込み TestClient と視覚的なデバッグ用の MCP Inspector が含まれています。
TestClientの使用
TestClient はツールをテストする簡単な方法を提供します。
import { TestClient } from "./utils/TestClient";
describe("YourTool", () => {
const client = new TestClient();
it("should process data correctly", async () => {
await client.assertToolCall(
"your-tool-name",
{ input: "test" },
(result) => {
expect(result.toolResult.content).toBeDefined();
}
);
});
});MCPインスペクターの使用
テンプレートには、ツールを視覚的にデバッグするための MCP インスペクターが含まれています。
インスペクターを起動します。
npx @modelcontextprotocol/inspector node dist/index.jshttp://localhost:5173でインスペクターUIを開きます。
検査官は以下を提供します:
テストツールのビジュアルインターフェース
リアルタイムのリクエスト/レスポンス監視
ツールメタデータ検査
インタラクティブなテスト環境
カーソルを使ったローカルテスト
Cursor を使用して MCP サーバーをローカルでテストするには:
パッケージをビルドしてリンクします。
npm run build npm run linkバイナリが動作することを確認します。
npx architect-test-mcp-toolカーソルにサーバーを追加します。
カーソル設定を開く
機能タブに移動します
MCPサーバーのセクションまでスクロールします
「サーバーを追加」をクリックします
「コマンド」タイプを選択
名前を付けます(例:「ローカルサンプルツール」)
次のコマンドを入力します:
npx architect-test-mcp-tool確認をクリック
MCP サーバー セクションでサーバーが実行中であることが表示されていることを確認し、カーソルでサーバーが正しく起動していることを確認します。
注意: コードを変更した場合は、必ず再構築して再リンクしてください。
npm run build
npm run linkテストが完了したら、パッケージのリンクを解除できます。
npm run unlinkこれにより、開発中に作成されたグローバル シンボリック リンクが削除されます。
トラブルシューティング
MCPインスペクターの使用
MCP Inspectorは、MCPサーバーのデバッグと検査に役立つツールです。使い方は以下のとおりです。
まず、プロジェクトをビルドします。
npm run buildインスペクターを実行します:
npx @modelcontextprotocol/inspector node dist/index.js
インスペクターは、次の操作を実行できる Web インターフェースを提供します。
利用可能なすべてのツールとそのスキーマを表示する
テストツールは対話的に呼び出します
リクエスト/レスポンスペイロードを検査する
サーバーとクライアント間の通信の問題をデバッグする
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Tools
Related MCP Servers
- AlicenseCqualityDmaintenanceA production-ready template for creating Model Context Protocol servers with TypeScript, providing tools for efficient testing, development, and deployment.15647MIT
- AlicenseCqualityDmaintenanceA TypeScript-based template for developing Model Context Protocol servers with features like dependency injection and service-based architecture, facilitating the creation and integration of custom data processing tools.1164ISC
- AlicenseCqualityDmaintenanceA TypeScript-based template for building Model Context Protocol servers, featuring fast testing, automated version management, and a clean structure for MCP tool implementations.1564MIT
- FlicenseNot gradedqualityDmaintenanceA template repository for building Model Context Protocol (MCP) servers with TypeScript, featuring full TypeScript support, testing setup, CI/CD pipelines, and modular architecture for easy extension.10
Related MCP Connectors
A comprehensive Model Context Protocol (MCP) server that enables AI assistants to interact with yo…
MCP server for secureFlows: token-free URL builders and integration-linting tools for AI agents.
Kickstart development with a customizable TypeScript template featuring sample tools for greeting,…
Appeared in Searches
- Using a TypeScript codebase as context for a tool or service
- Repository for Integrating MCP Tools in React
- Requirements for Building a Full-Stack Next.js Application
- A template for MCP (Model-Driven Programming, Manufacturing Control Protocol, or another MCP-related context)
- Instructions for installation or setting up something
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/stevennevins/architect-mcp-server'
If you have feedback or need assistance with the MCP directory API, please join our Discord server