Token导航 LogoToken导航TokenDH.com
Mcp4 All logo
开发工具未说明官方级别未说明来源级核验

Mcp4 All

MCP Server

一个基于Node.js的MCP服务器,用于自动化将GitHub项目文档化为博客文章。

工具数

0

提示词数

0

GitHub Stars

0

资源数

0
JavaScript文档生成Python

安装说明

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

作者 / 组织

Melfelf

提供方

Melfelf

最后核验

2026/5/17 20:23

快速接入

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

详细介绍

MCP4All(可翻译为“面向所有人的MCP”或根据具体语境调整,如“MCP全民计划”等,但直接翻译为“面向所有人的MCP”较为通用)

项目描述

这个项目展示了在Node.js中实现的MCP服务器(模型上下文协议)。其目标是自动化地将GitHub项目文档化为博客文章。

安装

  1. 安装 Node.js(如果尚未安装)
  2. 安装依赖项:
   npm install

示例代码

MCP服务器已处于 server.js 已实现:

const express = require('express');
const axios = require('axios');
const fs = require('fs');
const path = require('path');

const app = express();
app.use(express.json());

app.post('/mcp', async (req, res) => {
	const { repo, token, blog_path = './blog_content' } = req.body;
	if (!repo || !token) {
		return res.status(400).json({ error: 'repo und token sind erforderlich.' });
	}
	try {
		const url = `https://api.github.com/repos/${repo}/readme`;
		const response = await axios.get(url, {
			headers: {
				Authorization: `token ${token}`,
				'User-Agent': 'MCP-Server-Node'
			}
		});
		const content = Buffer.from(response.data.content, 'base64').toString('utf-8');
		fs.mkdirSync(blog_path, { recursive: true });
		const filename = path.join(blog_path, `${repo.replace('/', '_')}.md`);
		fs.writeFileSync(filename, content, 'utf-8');
		res.json({ success: true, file: filename });
	} catch (err) {
		res.status(500).json({ error: err.message });
	}
});

app.get('/', (req, res) => {
	res.send('MCP4All Node.js Server läuft!');
});

const PORT = process.env.PORT || 5000;
app.listen(PORT, () => {
	console.log(`Server läuft auf Port ${PORT}`);
});

使用

启动服务器:

npm start

发送一个请求(例如,使用 curl):

curl -X POST http://localhost:5000/mcp \
	-H "Content-Type: application/json" \
	-d '{"repo":"username/repo","token":""}'

回答:

{"success": true, "file": "blog_content/username_repo.md"}

许可证

参见LICENSE(许可证)。

发送一个请求(例如,使用 curl):

curl -X POST http://localhost:5000/mcp -H "Content-Type: application/json" -d '{"input": "Was ist MCP?"}'

回答:

{"response": "Du hast gefragt: Was ist MCP?. MCP antwortet: Hallo Welt!"}

许可证

请参阅LICENSE。 测试

目录标签

目录标签

JavaScript文档生成PythonGitHub自动化本地部署博客工具Node.js

接入字段

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

未说明

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

token

工具数量(toolCount,工具数)

0

资源数量(resourceCount,资源数)

0

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

0

权限和风险

未说明token部署方式未说明

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

安装前确认

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

仍需确认:installCommand

来源信息

继续浏览同类 MCP