my-mcp-server
my-mcp-server
TypeScript で MCP (Model Context Protocol) サーバーを構築するためのプレイグラウンド兼実験プロジェクトです。stdio トランスポートを介して AI エージェントや言語モデルにツールとリソースを公開する方法を示します。
このサーバーは、シンプルなユーザーデータベース(ローカル JSON ファイルでバックアップ)を管理し、AI エージェントがユーザーレコードを読み取ったり作成したりするために呼び出せるエンドポイントを公開します。
特徴
ツール —
my-create-tool:name、address、email、phoneフィールドを受け取り、レコードをsrc/users.jsonに永続化して新しいユーザーを作成します。リソース —
users://all: モックデータベースからユーザーの完全なリストを JSON として返します。リソース —
users://{userId}/profile:userIdで識別される単一ユーザーのプロフィールを返します。
Related MCP server: FastMCP Example Server
前提条件
インストール
npm installサーバーの実行
開発モード(tsx を使用、ビルドステップなし)
npm run server:devコンパイル済み出力のビルドと実行
npm run server:build # compiles TypeScript → JavaScript
node dist/server.js # run the compiled serverウォッチモード(変更時に自動再コンパイル)
npm run server:build:watchMCP Inspector UI で検査
MCP Inspector を使用すると、ブラウザ UI でツールを対話的に呼び出し、リソースを閲覧できます。
npm run server:inspect注:
server:inspectはDANGEROUSLY_OMIT_AUTH=trueを設定します。これはローカル開発専用です。
エージェント環境での MCP サーバーの読み込み
エージェント CLI(例: Claude Code CLI)
.mcp.json が存在すると、エージェントがそれを検出してサーバーの読み込みを促します。それ以外の場合は、他のサーバーと一緒に設定に追加する必要がある単純な MCP サーバー設定です。
プロジェクト構造
my-mcp-server/
├── src/
│ ├── server.ts # MCP server entry point (tools & resources)
│ └── users.json # Mock user database (read/written at runtime)
├── package.json
└── tsconfig.json技術スタック
パッケージ | 役割 |
| MCP サーバー SDK(ツール、リソース、stdio トランスポート) |
| ツールの入力スキーマ検証 |
| ビルドステップなしで TypeScript を直接実行 |
| TypeScript コンパイラ |
| ブラウザベースの MCP デバッグ UI |
ライセンス
ISC
This server cannot be installed
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Related MCP Servers
- FlicenseNot gradedqualityDmaintenanceA lightweight MCP server that connects a local AI model (Ollama) with custom CRUD tools for an in-memory database, enabling natural language database management.
- FlicenseNot gradedqualityDmaintenanceEducational example of an MCP server built with FastMCP, demonstrating how to expose tools, resources, and prompts for AI clients.
- FlicenseNot gradedqualityDmaintenanceExample MCP server built with FastMCP, demonstrating tools, resources, and prompts for AI integration.12
- FlicenseNot gradedqualityCmaintenanceA demonstrative MCP server that exposes a query-user tool for retrieving user info by ID, integrated with LangChain for agent-driven model reasoning and tool calls.
Related MCP Connectors
MCP server exposing the Backtest360 engine API as tools for AI agents.
MCP server for AI agents to plan, verify, and deploy Cloudflare-native apps.
MCP server for AI dialogue using various LLM models via AceDataCloud
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/sp-acc/my-mcp-server'
If you have feedback or need assistance with the MCP directory API, please join our Discord server