open-index/open-npm huggingface dataset:
npm package: @roegin0906/create-mcp-server-template
Description: 一个用于快速生成远程MCP服务项目的脚手架工具
Latest version: 1.0.2

# 远程 MCP 服务模板

一个基于 Hono 与 MCP SDK 的最小化远程 MCP 服务模板，内置单个测试工具 `get-test-message`，方便开发者在此基础上继续扩展自己的远程工具集。

## 目录结构速览

```
src/
  server/
    hono-server.ts   # Hono + StreamableHTTP 服务封装
    hono-index.ts    # MCP 服务器入口，统一路由到工具映射
    tools/
      index.ts       # 工具注册入口（当前仅 get-test-message）
      test.ts        # 示例工具实现
  client/
    simpleStreamableHttpClient.ts # 可选的交互式本地客户端
```

## 环境准备

- Node.js 18+（建议 20）
- npm 9+

首次使用：
```bash
npm install
```

## 启动模板服务器

开发模式（监听文件变动并自动重启）：
```bash
npm run dev
# 或
npm run dev:hono
```

编译并以生产模式运行：
```bash
npm run build
npm start        # 默认监听 http://localhost:3000/mcp
```

你也可以通过 `PORT` 环境变量自定义监听端口：
```bash
PORT=4000 npm start
```

服务器启动后可访问 `GET /health` 进行基础存活检测。

## 调用内置测试工具

模板内置 `get-test-message` 工具，执行后返回固定的 JSON 文本：
```json
{ "message": "远程MCP服务模板工作正常" }
```

### 方式一：使用内置示例客户端

1. 先确保服务器已通过 `npm run dev` 或 `npm start` 运行。
2. 构建客户端：`npm run build`
3. 运行客户端：
   ```bash
   npm run start:simpleClient
   ```
4. 在客户端交互界面中输入：
   ```
   list-tools        # 查看可用工具
   call-tool get-test-message
   ```

### 方式二：接入任意支持 StreamableHTTP 的 MCP Host

在你的 MCP Host（例如 Claude Desktop、MCP Inspector 等）配置中，将服务器地址指向 `http://<host>:<port>/mcp`，即可通过 Host 自带的工具调用界面执行 `get-test-message`。

> **提示**：当前工具无需鉴权。若要接入真实 API，可在 `src/server/hono-index.ts` 内根据工具名前缀或其他条件补充认证逻辑。

## 编写自己的 MCP 工具

1. 在 `src/server/tools/` 新建文件并导出工具函数。
2. 在 `src/server/tools/index.ts` 中新增对应的 `McpToolDefinition`，并放入 `toolsMap`。
3. 可选：在 `__tests__/` 内新增 Vitest 测试文件，验证自定义工具逻辑。

## 测试

```bash
npm test
```

当前测试覆盖 `get-test-message` 函数以及工具映射注册。新增工具后，推荐为业务逻辑补充单元测试。

## 常见问题

- **修改后看不到最新效果？**
  使用 `npm run dev` 以获得自动编译与重启；或重新执行 `npm run build && npm start`。
- **如何添加外部 API 地址？**
  可通过 `.env` 或系统环境变量注入 `API_BASE_URL` 等配置，在 `hono-index.ts` 中读取并拼接请求地址。
- **如何启用鉴权？**
  模板内保留了 bearer token 处理逻辑，可根据工具类型决定是否从请求上下文或环境变量中注入头信息。

享受构建你的远程 MCP 工具吧！
npm package: @roehrt/9-for-90
Description: ## Background
Author: roehrt
Latest version: 1.0.1

# 9 € Ticket 9️⃣🎫🚂

## Background

From June on Germany offers a “9 for 90” ticket, which is primarily intended to inspire more people to use public transport and offers free use of public transport for 90 days for 9 € monthly (so 27 € for all 90 days). However, while it's primarily intended for regional transport, it can also be useful for long-distance travels. In fact: you can strip of all regional traffic at the beginning and ending of the journey.

## How it works

At the moment the "algorithm" is quite simple: just strip off the beginning and ending of the journey and check if this journey is cheaper - a smarter algorithm (using some kind of gathered graphs) is planned. All the heavy-lifting is done by the great [`hafas-client`].

## Installation

**[WIP]**

## API example

```javascript
const { findJourneys } = require('@roehrt/9-for-90');
findJourneys('8011160', '8010224').then((data) => {
  console.log(require('util').inspect(data, {depth: null, colors: true}))
});
```

More information on how to use `findJourneys` can be found in the [`hafas-client`] docs:
[`journeys`](https://github.com/public-transport/hafas-client/blob/master/docs/journeys.md)
and `findJourneys` have the same signature and nearly the same return type and can therefore
be used interchangeably. It returns an array of `Journeys` an `earlierRef` and `laterRef` can't be used.
The only additional property that `findJourneys` return is an optional
object `trick` storing how the price saving was achieved.

```typescript
interface CheaperJourney extends Journey {
  trick?: {
    prepend: Leg[],
    append: Leg[],
    oldPrice: number,
  }
}
```
- `oldPrice` stores the unoptimized price.
- `prepend` stores all legs that need to be **prepended** to the original journey (regional trains).
- `append` stores all legs that need to be **appended** to the original journey (regional trains).

Note: it's the same API used in [`baahn`].

## Downsides

In case of delay of the regional traffic, one has then no right to compensation.

## Related

[`baahn`] - JavaScript client for finding special cheaper connections for Deutsche Bahn journeys.

[`baahn`]: https://github.com/roehrt/baahn
[`hafas-client`]: https://github.com/public-transport/hafas-client
npm package: @roelandtsw/cookie-master
Description: Clear the electron HTTP cookies via custom capacitor plugin
Author: WR
Latest version: 1.0.14

# @roelandtsw/cookie-master

The cookie master API is created to clear cookies in electron app (node.js layer)
It is a capacitor plugin

## Install

```bash
npm install @roelandtsw/cookie-master
npx cap sync
```

## Example

```javascript

let oMessage = await CapacitorCustomPlatform.plugins.CookieMaster.clearCookies();
console.log(oMessage);


let oMessage = await CapacitorCustomPlatform.plugins.CookieMaster.getCookies();
console.log(oMessage);

```

## API

<docgen-index>

* [`getCookies()`](#getcookies)
* [`clearCookies()`](#clearcookies)
* [Interfaces](#interfaces)

</docgen-index>

<docgen-api>
<!--Update the source file JSDoc comments and rerun docgen to update the docs below-->

### getCookies()

```typescript
getCookies() => Promise<Cookies>
```

Return all cookies from the node.js layer (electron)

**Returns:** <code>Promise&lt;<a href="#cookies">Cookies</a>&gt;</code>

**Since:** 1.0.0

--------------------


### clearCookies()

```typescript
clearCookies() => Promise<Cookies>
```

Clear all cookies on the node.js layer (electron)

**Returns:** <code>Promise&lt;<a href="#cookies">Cookies</a>&gt;</code>

**Since:** 1.0.0

--------------------


### Interfaces


#### Cookies

| Prop    | Type             | Description               | Since |
| ------- | ---------------- | ------------------------- | ----- |
| **`d`** | <code>any</code> | Generic message interface | 1.0.0 |

</docgen-api>
npm package: @roelofjan-elsinga/angular-translator
Description: This is a version of angular-translate for AngularJS ported to Angular.
Author: Roelof Jan Elsinga
Latest version: 1.2.0

# Angular Translator

This is a version of angular-translate for AngularJS ported to Angular. 
This package can be used to extract strings from Angular templates and place them in .po files, just like angular-gettext. 
This is ported for usage in Angular, instead of AngularJS.

## Usage in Webpack

```JavaScript
plugins: [
    new AngularGetTextPlugin({
        compileTranslations: { //optional
            input: 'path/to/files/*.po',
            outputFolder: 'path/to/output',
            format: 'json' // or javascript
        },
        extractStrings: { //optional
            input: 'path/to/files/**/*.html',
            destination: 'path/to/strings/file/translations.pot',
            pluralAttribute: 'translateplural',
            contextAttribute: 'translatecontext',
            commentAttribute: 'translatecomment',
            attributes: ['translate', 'apptranslate']
        }
    }),
]
```
npm package: @roelven/openclaw-sanitize-tool-results
Description: OpenClaw plugin that sanitizes tool results — fixes malformed tool blocks, truncates oversized results, strips ANSI codes
Author: Roel van der Ven
Latest version: 1.0.1

# sanitize-tool-results

An OpenClaw plugin that prevents session corruption by cleaning up malformed tool blocks before they get persisted to the conversation history.

## What it does

When an agent session runs, every tool call and its result gets saved to the conversation transcript. Occasionally, tool results arrive malformed — a missing ID, a missing tool name, oversized output from a verbose command, or ANSI color codes from terminal output. If these get persisted as-is, they can confuse the LLM on subsequent turns or break session replay.

This plugin intercepts messages **before they are written to the transcript** and fixes three categories of problems:

1. **Malformed tool call blocks** — If a tool call is missing its `id`, `name`, or `arguments`, the plugin fills in safe defaults (a generated UUID, `__unknown_tool`, or `{}`) and logs a warning.
2. **Oversized results** — Tool output larger than 100 KB is truncated to 100 KB with a `[TRUNCATED]` notice appended. This prevents a single large `cat` or `exec` output from bloating the context window.
3. **ANSI escape codes** — Terminal color codes (`\x1b[32m`, etc.) are stripped so the LLM sees clean text.

The plugin only modifies what gets **persisted** — it does not change what the LLM sees in real time. This makes it safe to run alongside other plugins.

## Why use it

- Prevents rare but hard-to-debug session corruption from malformed tool blocks
- Keeps conversation transcripts clean and replayable
- Avoids context window waste from oversized tool output
- Zero configuration, zero overhead for normal-sized results

## Compatibility

- **OpenClaw version**: Requires OpenClaw `main` branch (post-February 2026) with the plugin hook system wired.
- **Hook used**: `tool_result_persist` — this hook is part of the standard plugin API and does not require any core modifications.
- **No external dependencies**.

## Installation

```bash
openclaw plugins install @roelven/openclaw-sanitize-tool-results
```

Then register it in your `~/.openclaw/openclaw.json`:

```json
{
  "plugins": {
    "allow": ["sanitize-tool-results"],
    "entries": {
      "sanitize-tool-results": { "enabled": true }
    }
  }
}
```

Restart the gateway:

```bash
openclaw gateway stop && openclaw gateway start
```

## Setup

No additional setup is needed. The plugin works out of the box with sensible defaults:

- Max result size: 100 KB
- ANSI stripping: always on
- Malformed block repair: always on

There is nothing the user or the agent needs to configure after installation.

## License

MIT
npm package: @roenlie/mirage-mde
Description: [![npm version](https://img.shields.io/npm/v/@roenlie/mirage-mde.svg?style=for-the-badge)](https://www.npmjs.com/package/@roenlie/mirage-mde) [![Build Status](https://img.shields.io/github/actions/workflow/status/roenlie/mirage-mde/npm-publish.yml?style=f
Author: Kristoffer Roen-Lie
Latest version: 1.0.2

# mirage-mde..

[![npm version](https://img.shields.io/npm/v/@roenlie/mirage-mde.svg?style=for-the-badge)](https://www.npmjs.com/package/@roenlie/mirage-mde)
[![Build Status](https://img.shields.io/github/actions/workflow/status/roenlie/mirage-mde/npm-publish.yml?style=for-the-badge)](https://github.com/roenlie/ts-packages/mirage-mde)
npm package: @roenlie/reflect-metadata
Description: Partial implementation of TC39 reflect-metadata. Primarily for use as a lightweight and function activated implementation shim to the proposal.
Author: Kristoffer Roen-Lie
Latest version: 1.0.3

# Reflect-Metadata

Partial implementation of TC39 reflect-metadata.
Primarily for use as a lightweight and function activated implementation shim to the proposal.

### Manual activation
#### .ts/.js
```typescript 
import { useReflectMetadata } from '@roenlie/reflect-metadata';

useReflectMetadata();
```
#### .html
```html
<script type="module">
	import { useReflectMetadata } from '@roenlie/reflect-metadata';

	useReflectMetadata();
</script>
```

### Automatic activation
#### .ts/.js
```typescript
import '@roenlie/reflect-metadata/use';
```
#### .html
```html
<script type="module" src="@roenlie/reflect-metadata/use"></script>
```


Repeated calls to `useReflectMetadata` will have no effect.
If any of the methods being shimmed already exists from a different reflect-metadata shim, existing implementation will not be overriden.

Approximately 3.2kb not-minified, 1.70kb minified, 0.70kb gzipped.
npm package: @roenlie/vite-plugin-import-css-sheet
Description: Small plugin that enables the use of tc39/proposal-import-attributes for css files in vite.
Author: Kristoffer Roen-Lie
Latest version: 0.0.7

# @roenlie/vite-plugin-import-css-sheet
Small plugin that enables the use of tc39/proposal-import-attributes for css files in vite.
Any imported .css file that uses the with/assert syntax will be imported as a `CSSStyleSheet`.
This plugin **only** covers .css imports and nothing else.


## Install

#### npm
```
npm i @roenlie/vite-plugin-import-css-sheet --save-dev
```

#### pnpm
```
pnpm add -D @roenlie/vite-plugin-import-css-sheet
```

## Enable
```typescript
import { defineConfig } from 'vite';
import { importCSSSheet } from '@roenlie/vite-plugin-import-css-sheet';

export default defineConfig({
	plugins: [
		importCSSSheet(),
	],
});
```

For typings to work correctly, in your tsconfig.json file add the following:

#### tsconfig.json
```json
{
	"compilerOptions": {
		"types": [
			"@roenlie/vite-plugin-import-css-sheet/client"
		]
	},
}
```
This adds the correct type to .css file imports.

If you also use vite/client typings, `@roenlie/vite-plugin-import-css-sheet/client` must be below it.

## Usage

New correct syntax.
```typescript
import style from './button.css' with { type: 'css' };
```

Also works with the previous assert syntax.
```typescript
import style from './button.css' assert { type: 'css' };
```
<br><br>