Token导航 LogoToken导航TokenDH.com
MCP Instruction Server logo
AI代理HTTP官方级别未说明来源级核验

MCP Instruction Server

MCP Server

MCPInstructionServer是一个基于TypeScript的MCP(模型上下文协议)服务器,用于AI助手发现和访问结构化的Markdown指令库。

工具数

2

提示词数

0

GitHub Stars

0

资源数

0
知识管理JavaScriptClaudeClaude

安装说明

本站只整理中文说明和来源信息,不托管安装包,也不代用户安装。

作者 / 组织

MartinSchlott

提供方

MartinSchlott

最后核验

2026/5/17 20:52

快速接入

先看主来源和安装命令,再打开仓库或文档;下面只保留这个条目的关键接入事实。

详细介绍

MCP指令服务器

TypeScript MCP(模型上下文协议)服务器,用于AI助手发现和访问结构化markdown指令。

概述

MCPInstructionServer使像Claude这样的AI助手能够通过标准化的界面访问基于markdown的指令库。通过将指令组织为markdown文件,您可以:

  • 为人工智能提示创建一个集中的知识库
  • 维护版本化、结构化的指导文件
  • 允许AI助手按需搜索和检索特定指令
  • 为人工智能辅助任务建立一致的模式

运作原理

服务器对指定目录(及其子目录)中的markdown文件进行索引,将每个文件视为指令文档。服务器提取每个文档的标题和第一段,以创建可搜索的摘要。

AI助手可以:

  1. 列出所有可用的说明及其摘要
  2. 按ID请求具体说明

特性

  • 基于文件系统的简单存储:只需标记目录中的文件
  • 递归目录扫描:以分层文件夹结构组织指令
  • 路径安全:防止遍历目录和访问允许目录外的文件
  • 自动摘要提取:从每个文档中提取H1标题和第一段
  • 模型上下文协议支持:与实施MCP的AI助手兼容

先决条件

  • Node.js 18+(用于ESM支持)
  • npm或纱线
  • 基本熟悉TypeScript和markdown

安装

# Clone the repository
git clone https://github.com/yourusername/MCPInstructionServer.git
cd MCPInstructionServer

# Install dependencies
npm install

# Build the project
npm run build

用法

启动服务器

# Start with path to your instructions directory
npm start -- /path/to/instructions

# Or directly with node
node dist/index.js /path/to/instructions

创建指令

指令只是带有 .md 扩展。每个文件应遵循以下结构:

# Instruction Title

Brief description of this instruction's purpose. This first paragraph will be used as the summary when listing instructions.

## Details

Additional sections with more detailed information...

## Examples

Usage examples, code samples, etc.

目录结构示例

instructions/
├── api/
│   ├── authentication.md
│   └── rate-limiting.md
├── design/
│   ├── color-system.md
│   └── typography.md
└── general/
    ├── code-review.md
    └── git-workflow.md

访问说明

服务器提供两个MCP工具:

1. listInstructions

返回所有可用指令及其ID和摘要的列表。

示例响应:

id: api/authentication
summary: Authentication API - This document outlines the authentication protocol used in our system.

id: design/typography
summary: Typography Guidelines - This guide explains our typographic scale and usage rules.

2. readInstruction

获取指令ID并返回相应指令的完整内容。

请求示例: { "id": "api/authentication" }

发展

# Run in development mode with auto-restart
npm run dev -- /path/to/instructions

# Run tests
npm test

安全考虑

  • 服务器验证所有路径以防止目录遍历攻击
  • 只能访问指定指令目录中的文件
  • 不提供写入功能,只允许读取

许可证

麻省理工学院

贡献

欢迎投稿!请随时提交拉取请求。

目录标签

目录标签

知识管理JavaScriptClaudeAI助手本地部署指令管理Markdown处理知识库MCP协议

支持客户端

Claude

接入字段

传输方式(transport,传输协议)

HTTP

鉴权方式(authType,认证方式)

none

工具数量(toolCount,工具数)

2

资源数量(resourceCount,资源数)

0

提示词数量(promptCount,提示词数)

0

权限和风险

HTTPnone部署方式未说明

接入前请确认传输方式、认证方式和部署位置,并根据实际工具能力限制访问范围。

安装前确认

不要直接授予不必要的文件、网络或账号权限;先核对安装命令和配置内容。

仍需确认:installCommand

来源信息

继续浏览同类 MCP