MCP.so
登录

MCP-SERVER-TEMPLATE

@vyasa1986

关于 MCP-SERVER-TEMPLATE

暂无概览

基本信息

分类

开发工具

运行时

node

传输方式

stdio

发布者

vyasa1986

配置

暂无标准配置

该服务器的 README 中没有可解析的 MCP 配置块,请前往代码仓库查看安装说明。

代码仓库

工具

未检测到工具

工具是从 README 中自动提取的。维护者可以在 ## Tools 标题下列出工具,即可填充这部分内容。

概览

What is MCP-SERVER-TEMPLATE?

MCP-SERVER-TEMPLATE is a TypeScript-based starter template for building Model Context Protocol (MCP) servers using the official MCP SDK. It acts as an interface between user queries and tool execution, enabling AI assistants and external systems to dynamically call tools, interpret prompts, and manage resources in a modular and extensible way.

How to use MCP-SERVER-TEMPLATE?

Clone the repository, run npm install, configure environment variables (e.g., TRANSPORT_TYPE, HTTP_PORT) in a .env file, then start the server with npm start (production) or npm run dev (development). Use npm run test:http to test the HTTP transport, npm run mcp:inspector to launch the MCP Inspector GUI for debugging.

Key features of MCP-SERVER-TEMPLATE

  • Modular architecture with separation of concerns
  • Transport abstraction for HTTP (stateless) and stdio (stateful)
  • Dependency injection for testability and decoupling
  • Tool system with Zod schema validation and auto-generated JSON schema
  • Extensible prompt and resource scaffolding for LLM workflows
  • Built-in testing with Jest and MCP Inspector GUI

Use cases of MCP-SERVER-TEMPLATE

  • Building conversational MCP servers for AI assistants
  • Creating a backend to manage callable tools for LLM-based workflows
  • Prototyping LLM toolchains or integrating with proprietary systems
  • Preparing a scalable production MCP assistant backend

FAQ from MCP-SERVER-TEMPLATE

What are the prerequisites to run MCP-SERVER-TEMPLATE?

Node.js version 18.x or later, npm, and Git are required.

What transport types does MCP-SERVER-TEMPLATE support?

It supports HTTP (stateless, each request creates a new server instance) and stdio (stateful, for persistent communication). The transport is set via the TRANSPORT_TYPE environment variable (default: 'stdio').

How do I configure the server?

Configuration is done through environment variables in a .env file, such as TRANSPORT_TYPE, HTTP_PORT, HTTP_HOST, SESSION_SUPPORT, and LOG_LEVEL. Defaults are provided for each option.

How can I test the server?

Run unit tests with npm test (Jest). For HTTP transport, start the server with TRANSPORT_TYPE=http, then run npm run test:http to send a tools/list JSON-RPC request and validate the response.

What is the MCP Inspector and how do I use it?

The MCP Inspector is a web-based debugging GUI for visualizing tool calls and server state. Run npm run mcp:inspector after building the project to launch it locally (default port 6274).

评论

开发工具 分类下的更多 MCP 服务器