MCP Server Implementation
@yisu201506
关于 MCP Server Implementation
Repository for MCP server implementation
基本信息
配置
使用下面的配置,将此服务器添加到你的 MCP 客户端。
{
"mcpServers": {
"mcp-server-yisu201506": {
"command": "python",
"args": [
"-m",
"venv",
"venv"
]
}
}
}工具
未检测到工具
工具是从 README 中自动提取的。维护者可以在 ## Tools 标题下列出工具,即可填充这部分内容。
概览
What is MCP Server Implementation?
A Flask-based implementation of the Model Context Protocol (MCP) that extends Large Language Models with external tools like weather and calculator, using text-based tool invocation directly in the context window.
How to use MCP Server Implementation?
Clone the repository, create a Python virtual environment, install dependencies, set environment variables for API keys, then run flask run or gunicorn app:app. Send chat messages via the POST /chat endpoint with a JSON body containing a messages array.
Key features of MCP Server Implementation
- Complete MCP parsing, execution, and response handling
- Sample weather and calculator tools with parameter validation
- Maintains conversation context across multiple interactions
- Regex‑based parsing for flexible tool invocation detection
- Flask REST API for easy chat integration
Use cases of MCP Server Implementation
- Adding real‑time weather data to an LLM‑powered chatbot
- Enabling a language model to perform mathematical calculations
- Building custom tool integrations by inheriting from the Tool base class
- Demonstrating MCP workflow for educational or prototyping purposes
FAQ from MCP Server Implementation
What is MCP and how does it differ from function calling?
MCP places tool definitions in the prompt text and parses natural‑language responses for tool calls, while function calling uses structured JSON in API parameters and requires API support.
What are the runtime dependencies?
Python 3, Flask, Gunicorn (optional for production), and API keys for the LLM and weather service stored in environment variables.
Where is conversation state stored?
The server maintains conversation history across multiple interactions by adding processed responses and tool results back into the message history.
What transport does the server use?
HTTP via the Flask development server (default port 5000) or Gunicorn in production.
How are tools authenticated?
Weather tool requires a WEATHER_API_KEY environment variable; LLM requests require an LLM_API_KEY. Both are set in a .env file.
其他 分类下的更多 MCP 服务器

Sequential Thinking
modelcontextprotocolModel Context Protocol Servers
Core Philosophy: Connect, Unify, Respond
mindsdbDelegate anything. It comes back done.
Codelf
unbugA search tool helps dev to solve the naming things problem.
Blender
ahujasidOpen-source MCP to use Blender with any LLM
Production-ready MCP integrations for AI applications
Klavis-AIKlavis AI: MCP integration platforms that let AI agents use tools reliably at any scale
评论