A wrapper around FastMCP servers that adds automatic citation capabilities for scientific transparency and attribution in MCP (Model Context Protocol) applications.
HatchMCP enhances FastMCP servers by automatically exposing citation information as standardized MCP resources. This enables proper attribution for both original research/algorithms and MCP server implementations, which is critical for attribution in scientific computing and autonomous agent systems.
Key Features:
- 🔬 Scientific Attribution: Automatic citation resource registration
- 🔄 FastMCP Compatibility: Works with existing FastMCP servers
- 📋 Standardized URIs: Uses
citation://origin/andcitation://mcp/schemes - 🪶 Lightweight: Minimal overhead, zero configuration required
# Install directly from the repository
pip install git+https://github.com/CrackingShells/Hatch-MCP-Server.git
# Or install local copy
git clone https://github.com/CrackingShells/Hatch-MCP-Server.git
cd Hatch-MCP-Server
pip install .from hatch_mcp_server import HatchMCP
# Create an MCP server with citation capabilities
hatch_mcp = HatchMCP(
name="MyServer",
origin_citation="Smith, J. 'Original Algorithm', Nature, 2024",
mcp_citation="Your Name, 'MCP Implementation', GitHub, 2024"
)
# Add tools using FastMCP decorator syntax
@hatch_mcp.server.tool()
def process_data(data: str) -> str:
"""Process data using the wrapped algorithm."""
hatch_mcp.logger.info(f"Processing: {data}")
return f"Processed: {data}"
# Run the server
if __name__ == "__main__":
hatch_mcp.server.run()Assuming you have an existing FastMCP server (mcp_server.py)
from mcp.server.fastmcp import FastMCP
existing_server = FastMCP("my_existing_server")
@existing_server.tool()
def existing_function(data: str) -> str:
return f"Existing: {data}"You can wrap it with HatchMCP:
from mcp.server.fastmcp import FastMCP
from hatch_mcp_server import HatchMCP
from mcp_server import existing_server
# Wrap with HatchMCP for citation capabilities
hatch_mcp = HatchMCP(
name="my_existing_server",
fast_mcp=existing_server,
origin_citation="Original work citation",
mcp_citation="MCP implementation citation"
)
# Run the server
if __name__ == "__main__":
hatch_mcp.server.run()The server automatically exposes citation information through:
citation://origin/MyServer- Original algorithm citationcitation://mcp/MyServer- MCP implementation citation
📚 Complete Documentation - Full documentation table of contents and navigation guide
- Getting Started - Installation, setup, and first steps
- API Reference - Complete API documentation
- Citation System - Understanding scientific attribution features
- Examples - Practical usage patterns and code samples
- Contributing Guide - Complete development workflow and MCP-specific requirements
- Architecture Overview - Design principles and implementation details
- 🚀 Get started quickly → Installation & Quick Start
- 🔄 Wrap existing FastMCP servers → Basic Usage
- 📖 Learn about citations → Citation System Guide
- 🔍 Look up specific APIs → API Reference
- 💡 See examples → Examples & Patterns
- 🛠️ Contribute code → Contributing Guide
- 🏗️ Understand design → Architecture Overview
- 📋 Browse all docs → Documentation Table of Contents
# Citation information is automatically available to MCP clients
# citation://origin/ServerName -> "Smith, J. 'Algorithm X', Nature, 2024"
# citation://mcp/ServerName -> "Your Name, 'MCP Implementation', 2024"# Just wrap your server - citation resources are registered automatically
hatch_mcp = HatchMCP("server_name", origin_citation="...", mcp_citation="...")
# Use hatch_mcp.server exactly like FastMCP# Wrap existing FastMCP servers without changes
existing_server = FastMCP("my_server")
wrapped = HatchMCP("my_server", fast_mcp=existing_server, ...)We welcome contributions! Please see our comprehensive Contributing Guide for detailed guidelines covering development workflow, MCP compatibility requirements, and coding standards.
- Fork and clone the repository
- Install dependencies:
pip install -e .andnpm install - Create a feature branch:
git checkout -b feat/your-feature - Make changes and add tests
- Use conventional commits:
npm run commitfor guided commits - Create a pull request
For complete details on commit formats, testing requirements, and MCP-specific development guidelines, see the Contributing Guide.
- Python: 3.12+
- Dependencies:
mcp>=1.6.0 - Compatibility: FastMCP servers and MCP clients
AGPL v3: see LICENSE
Part of the Cracking Shells Ecosystem: Hatch! - A package management system for scientific MCP servers.