Alayman MCP Server

Alayman MCP Server

Enables access to articles from alayman.io, allowing users to fetch, search, and filter technical content through natural language. It supports pagination and keyword-based filtering for specific topics like React, Angular, and TypeScript.

Category
访问服务器

README

Alayman MCP Server

A Model Context Protocol (MCP) server that provides access to articles from alayman.io via STDIO transport for use with Claude Code and other MCP clients.

Features

  • Tool: fetch-articles - Fetch articles from the alayman.io API with optional filtering
  • STDIO Transport - Compatible with Claude Code and other STDIO-based MCP clients
  • Type-safe - Built with TypeScript and Zod validation

Installation

npm install

Building

npm run build

Adding to Claude Code

Follow these steps to add the Alayman MCP server to Claude Code:

Step 1: Build the Project

First, clone the repository and build the project:

git clone <repository-url>
cd alayman-mcp-ts
npm install
npm run build

Step 2: Locate Your Claude Code Configuration File

The configuration file location depends on your operating system:

  • macOS/Linux: ~/.config/claude/config.json
  • Windows: %APPDATA%\claude\config.json

If the file doesn't exist, create it with an empty JSON object: {}

Step 3: Add the MCP Server Configuration

Edit the configuration file and add the mcpServers section. Important: Use the absolute path to your project's build directory.

{
  "mcpServers": {
    "alayman": {
      "command": "node",
      "args": [
        "/absolute/path/to/alayman-mcp-ts/build/index.js"
      ]
    }
  }
}

Example for macOS/Linux:

{
  "mcpServers": {
    "alayman": {
      "command": "node",
      "args": [
        "/Users/yourname/Projects/alayman-mcp-ts/build/index.js"
      ]
    }
  }
}

Example for Windows:

{
  "mcpServers": {
    "alayman": {
      "command": "node",
      "args": [
        "C:\\Users\\yourname\\Projects\\alayman-mcp-ts\\build\\index.js"
      ]
    }
  }
}

Step 4: Restart Claude Code

Completely restart Claude Code (quit and reopen) for the changes to take effect.

Step 5: Verify Installation

You can verify the MCP server is working by asking Claude:

  • "List all alayman's articles"
  • "Fetch articles about React"
  • "Show me the latest 5 articles from alayman"

Usage

Once the MCP server is configured, you can interact with it naturally through Claude Code. The server provides the fetch-articles tool that Claude can use automatically based on your requests.

Example Queries

Get all articles:

List all articles from alayman.io

Search for specific topics:

Find all Angular articles from alayman

Limit results:

Show me the 10 most recent articles

Pagination:

Get articles 20-40 from alayman

How It Works

When you make a request related to alayman.io articles, Claude Code will automatically:

  1. Recognize that it should use the fetch-articles tool
  2. Call the MCP server with appropriate parameters
  3. Format and present the results to you

You don't need to manually invoke the tool - just ask naturally!

Available Tools

fetch-articles

Fetches articles from the alayman.io API with optional filtering and pagination.

Parameters:

Parameter Type Required Description
limit number No Maximum number of articles to return (default: 20)
offset number No Number of articles to skip for pagination (default: 0)
search string No Search term to filter articles by title, subtitle, or content

Usage Examples:

  1. Fetch all articles (default):

    {}
    
  2. Search for specific topics:

    {
      "search": "Angular"
    }
    
  3. Limit results:

    {
      "limit": 10
    }
    
  4. Pagination (get articles 20-40):

    {
      "limit": 20,
      "offset": 20
    }
    
  5. Combined search with limit:

    {
      "search": "React",
      "limit": 5
    }
    

Response Format:

{
  "articles": [
    {
      "id": 307,
      "title": "Article Title",
      "subtitle": "Article subtitle...",
      "image": "https://...",
      "url": "https://medium.com/...",
      "name": "Author Name",
      "time": "2025-08-23T06:07:28Z",
      "readtime": "5 min read",
      "category": 1,
      "description": "",
      "shareCount": 0,
      "checkCount": 3
    }
  ],
  "total": 30,
  "offset": 0,
  "limit": 20,
  "has_more": true
}

Response Fields:

  • articles: Array of article objects
  • total: Total number of articles matching the query
  • offset: Current pagination offset
  • limit: Maximum articles returned
  • has_more: Boolean indicating if more articles are available

Project Structure

alayman-mcp-ts/
├── src/
│   └── index.ts          # Main server implementation
├── build/                # Compiled JavaScript (generated)
├── package.json          # Project dependencies and scripts
├── tsconfig.json         # TypeScript configuration
├── .gitignore           # Git ignore rules
└── README.md            # This file

Development

Watch Mode

npm run watch

This will recompile TypeScript files automatically when they change.

Logging

All server logs are written to stderr (not stdout) to avoid corrupting MCP protocol messages. Look for logs prefixed with [MCP].

API Documentation

The server fetches data from: https://alayman.io/api/articles

Query parameters supported:

  • limit - Maximum results
  • offset - Pagination offset
  • search - Search filter

License

MIT

Contributing

Contributions are welcome! Please feel free to submit a Pull Request.

Troubleshooting

Server not appearing in Claude Code

  • Verify the path in your config.json is absolute, not relative
  • Make sure you ran npm run build after making changes
  • Restart Claude Code completely after configuration changes
  • Check Claude Code logs for MCP server errors

API errors

  • Verify that https://alayman.io/api/articles is accessible
  • Check your internet connection
  • Review server logs in stderr for detailed error messages

Quick Reference

Common Natural Language Queries

Once installed, you can use these natural language queries with Claude Code:

What you want Example query
All articles "List all alayman's articles"
Search by topic "Find all Angular articles from alayman"
Search by topic "Show me React articles"
Limited results "Get the latest 10 articles from alayman"
Pagination "Show me articles 20-30"
Recent articles "What are the newest articles on alayman.io?"

Direct Tool Usage

If you're building integrations or testing, you can also invoke the tool directly:

// Through MCP client
const result = await client.callTool("fetch-articles", {
  search: "TypeScript",
  limit: 5
});

Resources

推荐服务器

Baidu Map

Baidu Map

百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。

官方
精选
JavaScript
Playwright MCP Server

Playwright MCP Server

一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。

官方
精选
TypeScript
Magic Component Platform (MCP)

Magic Component Platform (MCP)

一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。

官方
精选
本地
TypeScript
Audiense Insights MCP Server

Audiense Insights MCP Server

通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。

官方
精选
本地
TypeScript
VeyraX

VeyraX

一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。

官方
精选
本地
graphlit-mcp-server

graphlit-mcp-server

模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。

官方
精选
TypeScript
Kagi MCP Server

Kagi MCP Server

一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。

官方
精选
Python
e2b-mcp-server

e2b-mcp-server

使用 MCP 通过 e2b 运行代码。

官方
精选
Neon MCP Server

Neon MCP Server

用于与 Neon 管理 API 和数据库交互的 MCP 服务器

官方
精选
Exa MCP Server

Exa MCP Server

模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。

官方
精选