MCP-Server
by chenshuai2144
MCP-Server is a server and client implementation based on the Model Context Protocol (MCP), allowing large language models (LLMs) to call external tools through a structured protocol to complete complex tasks. It includes an MCP server and a TypeScript client.
Last updated: N/A
What is MCP-Server?
MCP-Server is a server and client implementation based on the Model Context Protocol (MCP). It enables large language models (LLMs) to interact with external tools in a structured way, facilitating the completion of complex tasks by leveraging external services.
How to use MCP-Server?
- Start the server using
node dist/src/index.js
. 2. Start the client and connect to the server usingnode dist/mcp-client-typescript/src/index.js /path/to/server/script.js
. 3. Interact with the server via the Web API by sending a POST request tohttp://localhost:3000/sse
with a JSON payload containing the query.
Key features of MCP-Server
Provides a server and client implementation for the Model Context Protocol (MCP)
Allows LLMs to call external tools through a structured protocol
Includes pre-built tools for weather forecasting and GitHub user information retrieval
Offers a Web API for front-end applications with streaming responses and process visualization
Use cases of MCP-Server
Enabling LLMs to access real-time information, such as weather data
Allowing LLMs to interact with external services, such as GitHub
Building applications that require LLMs to perform complex tasks by combining reasoning and tool usage
Providing a framework for integrating LLMs with various external APIs and services
FAQ from MCP-Server
What is the Model Context Protocol (MCP)?
What is the Model Context Protocol (MCP)?
MCP is a structured protocol that enables LLMs to interact with external tools and services.
What LLM is used by default?
What LLM is used by default?
The client is configured to use Deepseek by default, accessed through an OpenAI-compatible API.
What external tools are currently implemented?
What external tools are currently implemented?
The server currently implements tools for weather forecasting (using Gaode Maps API) and GitHub user information retrieval.
What environment variables are required?
What environment variables are required?
The .env
file needs to include LLM_API_KEY
for the Deepseek API and GAODE_KEY
for the Gaode Maps API.
How does the white-box process visualization work?
How does the white-box process visualization work?
The client displays the intent recognition, tool selection, tool call parameters/results, and final answer generation processes, allowing users to understand the model's reasoning and tool usage.