# MCP搜索
## 基本信息
- Slug: `jser-mcp`
- Source: modelscope
- Publisher: @jser/mcp
- Categories: search / rag-systems / documentation-access
- Hosted: No
- License: MIT License
- Source URL: https://www.modelscope.cn/mcp/servers/@jser/mcp
## 简介
一种模型上下文协议服务器，为JSer.info的JavaScript资源数据库提供搜索和检索功能，通过各种专业工具访问项目、帖子、产品信息和时间线数据。
## MCP Server 详情

# @jser/mcp

An MCP Server for JSer.info

- [Introduction - Model Context Protocol](https://modelcontextprotocol.io/introduction)
- [modelcontextprotocol/typescript-sdk: The official Typescript SDK for Model Context Protocol servers and clients](https://github.com/modelcontextprotocol/typescript-sdk)

## Usage

### Usage in VSCode

In VSCode, you can use JSer.info MCP in one of the following ways:

#### Using a Remote Server (Recommended)

You can add a remote server using either of the following methods:

##### Method 1: Add via Command Line

bash
code --add-mcp  {"name":"jser-info-mcp","url":"https://mcp.jser.info/mcp"} 


##### Method 2: Add to settings.json

Add the following configuration to your VSCode `settings.json`:
json
"mcp": {
  "servers": {
    "jser-info-mcp": {
      "url": "https://mcp.jser.info/mcp"
    }
  }
}


This will automatically make JSer.info MCP available.

#### Using a Local Server

1. Start `@jser/mcp` in the terminal
   bash
   npx @jser/mcp
   

2. Open the VSCode command palette (`Cmd+Shift+P` or `Ctrl+Shift+P`) and run `MCP: Add Server...`

3. Enter `http://localhost:14561/mcp` as the server URL to connect

### Available Features

After connecting, the following tools will be available:
   - `jser_search_items`: Search items by title, description, URL, and tags (supports OR search with multiple keywords)
   - `jser_search_posts`: Search posts by title, description, URL, and tags
   - `jser_product_name`: Get product name from URL
   - `jser_week`: Get JSer week by number
   - `jser_weeks`: Get all JSer weeks
   - `jser_weeks_between`: Get JSer weeks between two dates
   - `jser_week_with_item_url`: Get JSer week containing an item
   - `jser_item_with_item_url`: Get JSer item by URL

### Available Tools

JSer.info MCP provides the following tools.

#### jser_search_items

Searches items by title, description, URL, and tags. Multiple keywords separated by spaces are searched with OR logic.

Parameters:
- `query`: Search query (1-100 characters). Multiple keywords separated by spaces are searched with OR logic.
- `limit`: Maximum number of results to return (1-100, default: 10)
- `offset`: Offset of the results (0 or greater, default: 0)
- `order`: Sort order
  - `desc`: Newest first (default)
  - `asc`: Oldest first

Return Value:
- Array of items
  - `title`: Title of the item
  - `url`: URL of the item
  - `content`: Description of the item
  - `tags`: Array of tags
  - `date`: Registration date and time
  - `relatedLinks`: Array of related links

#### jser_search_posts

Searches posts by title, description, URL, and tags.

Parameters:
- `query`: Search query (1-100 characters)
- `limit`: Maximum number of results to return (1-100, default: 10)
- `offset`: Offset of the results (0 or greater, default: 0)
- `sort`: Sort criteria
  - `relevance`: By relevance (default)
  - `date`: By date
- `order`: Sort order
  - `desc`: Newest first / highest relevance (default)
  - `asc`: Oldest first / lowest relevance

Return Value:
- Array of posts
  - `title`: Title of the post
  - `url`: URL of the post
  - `content`: Content of the post
  - `tags`: Array of tags
  - `date`: Posting date and time

#### jser_product_name

Gets the product name from a URL.

Parameters:
- `url`: URL of the product (required)

Return Value:
- Product information object
  - `name`: Product name
  - `url`: URL of the product
  - `releaseNoteProbability`: Probability that it is a release note
  - `releaseNoteVersion`: Version information of the release note (if applicable)- `releaseNoteURL`: URL of the release note (if applicable)

#### jser_week

Retrieves a JSer week by its number.

Parameters:
- `number`: The number of the JSer week (required)

Return Value:
- A JSer week object
  - `number`: The number of the JSer week
  - `startDate`: Start date
  - `endDate`: End date
  - `items`: List of items for that week
  - `posts`: List of posts for that week

#### jser_weeks

Retrieves all JSer weeks.

Return Value:
- An array of JSer week objects
  - `number`: The number of the JSer week
  - `startDate`: Start date
  - `endDate`: End date
  - `items`: List of items for that week
  - `posts`: List of posts for that week

#### jser_weeks_between

Retrieves JSer weeks within a specified period.

Parameters:
- `beginDate`: Start date of the period (required)
- `endDate`: End date of the period (required)

Return Value:
- An array of JSer week objects
  - `number`: The number of the JSer week
  - `startDate`: Start date
  - `endDate`: End date
  - `items`: List of items for that week
  - `posts`: List of posts for that week
  - `itemsCount`: Number of items
  - `postsCount`: Number of posts

#### jser_week_with_item_url

Retrieves a JSer week containing an item with the specified URL.

Parameters:
- `item_url`: URL of the item (required)

Return Value:
- A JSer week object
  - `number`: The number of the JSer week
  - `startDate`: Start date
  - `endDate`: End date
  - `items`: List of items for that week
  - `posts`: List of posts for that week

#### jser_item_with_item_url

Retrieves an item with the specified URL.

Parameters:
- `url`: URL of the item (required)

Return Value:
- An item object
  - `title`: Title
  - `url`: URL
  - `description`: Description
  - `tags`: Array of tags
  - `date`: Date
  - `relatedLinks`: Array of related links

## Source

Data retrieval is done using `@jser/data-fetcher`.

- Data is fetched again if one minute has passed since the last fetch.
- In other words, cached data is used for up to one minute.

For searching, [DataSet](https://github.com/jser/dataset) is utilized.


Item: Refers to the site being introduced
    1 Item = 1 Site
    This is the origin of all data.
    Each site includes a title, URL, registration date, and tags.
    API: https://jser.info/source-data/items.json
Post: Refers to articles posted on JSer.info
    1 Post = 1 Article
    Each article includes a title, URL, tags, and date.
    Using @jser/stat, you can search for articles that i…

