Skip to main content
Glama
kenta-ja8

React Learning MCP Server

by kenta-ja8
README.md
# learning-react-mcp
- minimal MCP server that pre-scrapes React learning docs into DuckDB
- hybrid search using DuckDB full-text search and transformer-based reranking

## Dev

```
uv sync
uv run main_setup.py
uv run main.py
```

## Test

```
# initialize request
{"jsonrpc":"2.0","id":0,"method":"initialize","params":{"protocolVersion":"2025-03-26","capabilities":{},"clientInfo":{"name":"manual-cli","version":"1.0.0"}}}
{"jsonrpc":"2.0","method":"notifications/initialized"}

{"jsonrpc":"2.0","id":1,"method":"tools/list","params":{}}
{"jsonrpc":"2.0","id":2,"method":"tools/call","params":{"name":"search","arguments":{"question":"CSSにについて教えて"}}}
# response -> {"jsonrpc":"2.0","id":1,"result":{"content":[{"type":"text","text":"概要引用符で文字列を渡す 波括弧は JavaScript 世界への窓口 波括弧を使える場所 「ダブル波括弧」で JSX 内に CSS やその他のオブジェクトを含める オブジェクトと波括弧でさらにいろいろやってみる まとめチャレンジ問題"}],"isError":false}}

```

## Setup
- vscode settings.json

```
"react-learning-mcp":{
  "command": "bash",
  "args": [
    "-c",
    "cd {{REPOSITORY_PATH}} && uv run main.py"
  ]
}
```

## Reference
- https://voluntas.ghost.io/duckdb-hybrid-search/