Cover image
Try Now
2025-03-16

MCP服务器可让Claude轻松访问拔出文档

3 years

Works with Finder

1

Github Watches

2

Github Forks

0

Github Stars

Hackage Documentation MCP

Overview

This Machine-Controlled Program (MCP) provides an interface for AI assistants to access Haskell documentation from Hackage. It allows AI models to retrieve precise, up-to-date documentation for specific Haskell modules, improving the AI's ability to assist with Haskell programming despite limited training data in this domain.

Problem Statement

AI language models often have insufficient training data on Haskell compared to more mainstream programming languages. This results in:

  • Less accurate code generation for Haskell
  • Difficulty understanding Haskell's unique features and abstractions
  • Inaccurate or outdated information about Haskell libraries and modules

This tool bridges that gap by enabling AI to retrieve authoritative documentation from Hackage in real-time.

Features

  • Retrieve documentation for specific modules from any package on Hackage
  • Specify exact package versions to ensure accuracy
  • Clean, text-based output that's easily consumable by AI assistants

Installation

  1. Ensure you have Python 3.7+ installed
  2. Install the required dependencies:
    pip install httpx beautifulsoup4 fastmcp
    

Usage

You can use this MCP with any AI assistant that supports the MCP protocol.

Running the Server

python main.py

This will start the MCP server using stdio transport.

API

The MCP exposes the following tool:

get_docs(package, version, module)

Retrieves documentation for a specific Haskell module.

Parameters:

  • package (string): The Hackage package name (e.g., "lens", "yesod-persistent")
  • version (string): The package version (e.g., "5.0.0", "2.10.0")
  • module (string): The module name to look up (e.g., "Control.Lens", "Database.Persist")

Returns:

  • The extracted documentation text for the specified module, or an error message if retrieval fails

Examples:

# Get documentation for Control.Lens from lens 5.0.0
get_docs("lens", "5.0.0", "Control.Lens")

# Get documentation for Data.Vector.Algorithms from vector-algorithms 0.8.0
get_docs("vector-algorithms", "0.8.0", "Data.Vector.Algorithms")

Use Cases

  1. Learning Haskell libraries: Get detailed information about specific modules while working with the AI
  2. Understanding type signatures: Access accurate type information for functions in Haskell modules
  3. Exploring module hierarchies: Understand how modules are organized within Haskell packages
  4. Verifying AI-generated code: Compare AI suggestions with official documentation

Benefits

  • Provides AI with access to accurate, up-to-date Haskell documentation
  • Improves the quality of AI-generated Haskell code
  • Enhances the AI's ability to explain Haskell concepts with authoritative references
  • Reduces hallucinations when discussing Haskell libraries

Limitations

  • Requires an internet connection to access Hackage
  • Only provides documentation content, not the implementation code
  • Documentation quality varies between Haskell packages

Contributing

Contributions to improve this tool are welcome! Some potential areas for enhancement:

  • Adding support for downloading and parsing package source code
  • Implementing caching to reduce network requests
  • Expanding to support other Haskell documentation sources

License

[Specify your license here]

相关推荐

  • NiKole Maxwell
  • I craft unique cereal names, stories, and ridiculously cute Cereal Baby images.

  • Bora Yalcin
  • Evaluator for marketplace product descriptions, checks for relevancy and keyword stuffing.

  • Joshua Armstrong
  • Confidential guide on numerology and astrology, based of GG33 Public information

  • https://suefel.com
  • Latest advice and best practices for custom GPT development.

  • Alexandru Strujac
  • Efficient thumbnail creator for YouTube videos

  • Callycode Limited
  • A geek-themed horoscope generator blending Bitcoin prices, tech jargon, and astrological whimsy.

  • Emmet Halm
  • Converts Figma frames into front-end code for various mobile frameworks.

  • Khalid kalib
  • Write professional emails

  • Beniyam Berhanu
  • Therapist adept at identifying core issues and offering practical advice with images.

  • Elijah Ng Shi Yi
  • Advanced software engineer GPT that excels through nailing the basics.

  • https://maiplestudio.com
  • Find Exhibitors, Speakers and more

  • apappascs
  • 发现市场上最全面,最新的MCP服务器集合。该存储库充当集中式枢纽,提供了广泛的开源和专有MCP服务器目录,并提供功能,文档链接和贡献者。

  • ShrimpingIt
  • MCP系列GPIO Expander的基于Micropython I2C的操作,源自ADAFRUIT_MCP230XX

  • OffchainLabs
  • 进行以太坊的实施

  • huahuayu
  • 统一的API网关,用于将多个Etherscan样区块链Explorer API与对AI助手的模型上下文协议(MCP)支持。

  • deemkeen
  • 用电源组合控制您的MBOT2:MQTT+MCP+LLM

    Reviews

    2 (1)
    Avatar
    user_UGgvJIK2
    2025-04-15

    As an avid user of MCP applications, I highly recommend the MCP Server for Qdrant. This server is incredibly user-friendly and integrates seamlessly with Qdrant, boosting performance and reliability. It's clear that MCP-Mirror has put a lot of thought into crafting this product. The setup was straightforward, and the welcoming information provided was very helpful. For anyone looking to enhance their server capabilities, this is a must-try. More details can be found at the link below.