Used for server configuration with environment variables. It appears in the debugging section where users need to update 'MCP_TRANSPORT_TYPE' in a .env file before starting the server.
The server is built on Python (version 3.10 or higher) and uses the FastMCP Python SDK to provide a dynamic MCP server implementation.
MCP-YNU - FastMCP Server
A dynamic MCP server implementation using FastMCP that automatically loads tools, resources, and prompts from respective directories.
Features
Dynamic loading of modules from
tools/
,resources/
, andprompts/
directoriesAutomatic discovery and registration of modules
Simple configuration and extensibility
Type hints for better code clarity and static analysis
Comprehensive logging for monitoring server activity
Recent Updates
Added type hints throughout the codebase
Improved MCP instance handling
Added logging functionality
Added MIT license
Updated documentation with reference links
Directory Structure
Usage
Create modules in the appropriate directories
Import mcp via
from mcp_server import mcp
Run the server:
Example Modules
Tools Module Example (tools/example.py)
Resources Module Example (resources/example.py)
Prompts Module Example (prompts/example.py)
Debugging
Update
MCP_TRANSPORT_TYPE
in.env
, Executepython main.py
to start the mcp serverExecute
npx @modelcontextprotocol/inspector
to open the inspect.Choose
SSE
Transport Type with URLhttp://localhost:<mcp_server_port>/sse
or ChooseSTDIO
Transport Type with Commandpython
and Arguments/path/to/main.py
Requirements
Python >= 3.10
FastMCP
Reference Links
License
This project is licensed under the MIT License - see the LICENSE file for details.
This server cannot be installed
hybrid server
The server is able to function both locally and remotely, depending on the configuration or use case.
A dynamic MCP server implementation that automatically loads tools, resources, and prompts from their respective directories, allowing for easy extension and configuration.
Related MCP Servers
- AsecurityAlicenseAqualityMCP server that builds itself by creating new tools as needed based on user requests (Requires restart of Claude Desktop to use newly created tools).Last updated -427The Unlicense
- -securityFlicense-qualityA configurable MCP server that dynamically loads capabilities from a remote configuration to bridge MCP clients with remote APIs for executing actions, accessing resources, and utilizing prompt templates.Last updated -5965
- AsecurityAlicenseAqualityA tool that dynamically generates and configures MCP servers by automatically creating necessary directories and files according to user specifications.Last updated -11619MIT License