π€ Model Context Protocol (MCP) Examples
LocalAbout π€ Model Context Protocol (MCP) Examples
Model Context Protocol (MCP) Examples is a collection of modular MCP server examples built with the TypeScript SDK for MCP developers. Modules run independently, while a root launcher registers and starts them; examples include code analysis and boilerplate generation.
Key features
- 01Modular MCP server examples
- 02Dynamic module registration and launch
- 03Analyze local code repositories
- 04Generate and extend starter codebases
Use cases
- 01Explore a local code repository
- 02Generate starter project code
- 03Debug servers with MCP Inspector
MCP support
Modules register tools and prompts with MCP and use Streamable HTTP or STDIO transports. The root launcher dynamically registers and starts the MCP servers.
Configuration
Local server config is the same for every client. Copy it into your clientβs MCP config file.
We havenβt collected a package or remote endpoint for this server. Follow the instructions in the project README.
Tools
Local servers expose tools only once running on your machine, and the maintainer has not provided a tool list.
Details
From the project READMEπ€ Model Context Protocol (MCP) Examples
This repository contains modular MCP agent servers built using the Model Context Protocol TypeScript SDK.
Each subdirectory in src/ is a self-contained MCP server with tools and prompts (e.g., code analysis, summarization, etc.).
β¨ The root
src/index.tsdynamically registers and launches all individual servers.
π¦ Structure
src/
βββ index.ts # Main launcher to register all MCP servers
βββ code-analysis/ # Analyzes local code repositories
β βββ tools.ts # Tool implementations
β βββ server.ts # Registers tools & prompts with MCP
β βββ utils.ts # Helper functions (file reading, structure)
β βββ prompt.ts # Prompt handler definitions
β βββ README.md # Module-specific usage docs
...
π Getting Started
1. Install dependencies
npm install
2. (Optional) Set up local .env
echo "PORT=3000" > .env
3. Start the MCP server
npm run dev
The server will run at:
http://localhost:3000/mcp
π§ͺ Debugging / Manual Testing
You can test the server using MCP Inspector, a UI debugger for MCP-based servers.
Start the MCP Inspector (in another terminal)
npm run debug
Then open:
π http://127.0.0.1:6274
and connect to http://localhost:3000/mcp using Streamable HTTP.
π§© Supported MCP Modules
| Folder | Description | Transport |
|---|---|---|
code-analysis | Analyze and explore local code repositories | Streamable HTTP |
boilerplate-gen | Generate starter codebases and incrementally add features | STDIO |
| (more coming soon) | ... | ... |
π License
MIT License Copyright (c) 2025 suresh konakanchi
Permission is hereby granted,
free of charge, to any person obtaining a copy of this software and associated
documentation files (the "Software"), to deal in the Software without
restriction, including without limitation the rights to use, copy, modify, merge,
publish, distribute, sublicense, and/or sell copies of the Software, and to
permit persons to whom the Software is furnished to do so, subject to the
following conditions:
The above copyright notice and this permission notice
(including the next paragraph) shall be included in all copies or substantial
portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF
ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO
EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR
OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
Comments
New to MCP?
From what the protocol is to installing your first server, these answers cover most first questions.
An open protocol that defines how AI applications connect to external tools and data in a uniform way. Clients talk to the model; MCP servers provide tools, resources and prompt templates. They exchange standard messages, so one server can be reused by many clients.