MCP-YNU FastMCP Server
OfficialUsed 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.
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@MCP-YNU FastMCP Serverlist available tools"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
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
Related MCP server: xmcp Application
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
mcp-ynu/
├── tools/ # Directory for tool modules
│ ├── __init__.py
│ ├── example.py
├── resources/ # Directory for resource modules
│ ├── __init__.py
│ ├── example.py
├── prompts/ # Directory for prompt modules
│ ├── __init__.py
│ ├── example.py
├── logger.py # Logger implementation
├── main.py # Main implementation
├── mcp_server.py # MCP server implementation
├── README.md # Project documentation
├── LICENSE # MIT License
└── pyproject.toml # Project configurationUsage
Create modules in the appropriate directories
Import mcp via
from mcp_server import mcpRun the server:
python main.pyExample Modules
Tools Module Example (tools/example.py)
from mcp_server import mcp
import httpx
@mcp.tool()
def calculate_bmi(weight_kg: float, height_m: float) -> float:
"""Calculate BMI given weight in kg and height in meters"""
return weight_kg / (height_m**2)
@mcp.tool()
async def fetch_weather(city: str) -> str:
"""Fetch current weather for a city"""
async with httpx.AsyncClient() as client:
response = await client.get(f"https://api.weather.com/{city}")
return response.textResources Module Example (resources/example.py)
from mcp_server import mcp
@mcp.resource("config://app")
def get_config() -> str:
"""Static configuration data"""
return "App configuration here"
@mcp.resource("users://{user_id}/profile")
def get_user_profile(user_id: str) -> str:
"""Dynamic user data"""
return f"Profile data for user {user_id}"Prompts Module Example (prompts/example.py)
from mcp_server import mcp
from mcp.server.fastmcp.prompts import base
@mcp.prompt()
def review_code(code: str) -> str:
return f"Please review this code:\n\n{code}"
@mcp.prompt()
def debug_error(error: str) -> list[base.Message]:
return [
base.UserMessage("I'm seeing this error:"),
base.UserMessage(error),
base.AssistantMessage("I'll help debug that. What have you tried so far?"),
]Debugging
Update
MCP_TRANSPORT_TYPEin.env, Executepython main.pyto start the mcp serverExecute
npx @modelcontextprotocol/inspectorto open the inspect.Choose
SSETransport Type with URLhttp://localhost:<mcp_server_port>/sseor ChooseSTDIOTransport Type with Commandpythonand 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 deployed
Maintenance
Related MCP Connectors
Nifty's MCP server — exposes tasks, projects, messages, and files as tools for AI agents.
MCP server for progressive tool usage at any scale (see https://klavis.ai)
Related MCP Servers
- FlicenseNot gradedqualityDmaintenanceA basic MCP server template that provides a foundation for building custom tools, resources, and prompts. Serves as a starting point for developers to create their own MCP server functionality.-
- FlicenseNot gradedqualityDmaintenanceA template/starter project for building MCP servers with structured directories for tools, prompts, and resources that are automatically discovered and registered.5-
- AlicenseBqualityDmaintenanceAn MCP server that registers customizable prompt templates as tools for natural language interaction. It supports hot-reloading and easy extension via YAML or JSON files to automate tasks like code review, refactoring, and content summarization.24 npm1MIT
- FlicenseNot gradedqualityDmaintenanceA Model Context Protocol server built with FastMCP that features dynamic tool loading and modular management via a dedicated tool directory. It supports both stdio and HTTP transport modes, enabling efficient development and deployment of custom MCP tools.-