M

MCP搜索

@jser/mcp
0 Stars 315 次浏览 jser 更新于 2026-08-23

一种模型上下文协议服务器,为JSer.info的JavaScript资源数据库提供搜索和检索功能,通过各种专业工具访问项目、帖子、产品信息和时间线数据。

该服务暂未提供标准配置,请参考 README 手动接入

服务介绍

@jser/mcp

An MCP Server for JSer.info

Usage

Usage in VSCode

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

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 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 introduce a specific site based on Items and Posts.
API: https://jser.info/posts.json
Post Item: Refers to the Item (site) within an article posted on JSer.info
1 Post Item = 1 Site
It is essentially the same as an Item, but a Post Item also includes the category (e.g., headline) in the context of the Post (article).
For the types of categories, refer to @jser/post-parser.
Since some Post Items may be edited at the time of posting, they do not necessarily match the original Items.
Limitation: Category distinctions are available only from 2014-08-03 onwards, so earlier data does not include this information.
All articles are included in Posts, but Post Item data is not included.
API: https://jser.info/public/data/post-details.json

For product name searches, the JSer.info Product Name API is used.

bash
$ curl "https://jser-product-name.deno.dev/?url=https://deno.com/blog/v1.19"
{"name":"Deno","url":"https://deno.com","releaseNoteProbability":0.7619047619047619,"releaseNoteVersion":"v1.19"}
$ curl "https://jser-product-name.deno.dev/?url=https://example.com"
null # status code is 400The logic for data extraction utilizes @jser/stat.

findItemsBetween(beginDate, endDate): JSerItem[]

return JSerItems between two dates

getJSerWeeks(): JSerWeek[]

return all JSerWeeks

findJSerWeeksBetween(beginDate, endDate): JSerWeek[]

return JSerWeeks between two dates

findJSerWeek(number): JSerWeek

number start with 1.

return JSerWeek at the number.

findWeekWithItem(itemObject): JSerWeek

return JSerWeek contain the itemObject.

findItemWithURL(URL): JSerItem

return JSerItem match the URL.

Changelog

See Releases page.

Running tests

Install devDependencies and Run pnpm test:

pnpm test

Contributing

Pull requests and stars are always welcome.

For bugs and feature requests, please create an issue.

  1. Fork it!
  2. Create your feature branch: git checkout -b my-new-feature
  3. Commit your changes: git commit -am 'Add some feature'
  4. Push to the branch: git push origin my-new-feature
  5. Submit a pull request :D

Author

License

MIT © azu

相关 MCP 服务