MCP.so
登录

MCP Server - JavaScript SDK

@MCP-Mirror

基本信息

分类

开发工具

传输方式

stdio

作者

MCP-Mirror

关于 MCP Server - JavaScript SDK

Mirror of

MCP Server - JavaScript SDK 配置

暂无标准配置

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

代码仓库

MCP Server - JavaScript SDK 工具

工具列表暂未提供

当前收录暂时没有可展示的工具列表,不代表服务没有工具。请查阅项目文档了解支持的能力。

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

概览

What is MCP Server - JavaScript SDK?

MCP Server - JavaScript SDK is an unofficial JavaScript SDK for the Model Context Protocol. It allows developers to define server prompts, resources, and tools in separate JavaScript files and create a MCP server instance.

How to use MCP Server - JavaScript SDK?

Create files defining prompts, resources, and tools (e.g., prompts.js, resources.js, tools.js). Then import them into a server file and instantiate MCP with an info object (name, version), plus the prompts, resources, and tools objects.

Key features of MCP Server - JavaScript SDK

  • Define prompts with description, arguments, and message content
  • Define resources by URI and MIME type
  • Define tools with description, async handler, and JSON schema for parameters
  • Simple server instantiation with new MCP(infos, prompts, resources, tools)
  • Logs saved to system-specific user log directories

Use cases of MCP Server - JavaScript SDK

  • Building a custom MCP-compatible server with custom prompts, resources, and tools
  • Rapid prototyping of MCP services using JavaScript/Node.js
  • Integrating MCP with existing JavaScript codebases
  • Educational experimentation with the Model Context Protocol

常见问题

1

What is MCP Server - JavaScript SDK?

It is an unofficial JavaScript SDK for the Model Context Protocol that lets you define prompts, resources, and tools and run a server.

2

How do I define prompts?

Export a `prompts` object from a JavaScript file. Each key is the prompt name; value contains `description`, `arguments`, and `messages` with `role` and `content`.

3

How do I define resources?

Export a `resources` object where each key is a resource name and value has `uri` and `mimeType` fields.

4

How do I define tools?

Export a `tools` object. Each tool has `description`, an async `handler` function, and a `schema` object describing parameters.

5

Where are server logs stored?

Logs are stored in the user system logs directory: `~/.local/share/logs` (Linux), `~/Library/Logs` (macOS), or `%USERPROFILE%\AppData\Local\Logs` (Windows).

评论

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