Graft

•
5
•

Unify API exposure by defining tools once and making them accessible as both HTTP endpoints and Model Context Protocol (MCP) tools.

Graft simplifies the development of agent-ready APIs by allowing developers to define business logic and capabilities as "tools" just once. These tools are then automatically exposed as both standard HTTP REST endpoints for any client and Model Context Protocol (MCP) tools for AI agents. This eliminates the need to maintain separate server models or API definitions for different consumers, ensuring consistent authentication, validation, and middleware across all access points. Graft also automates the generation of discovery documents, OpenAPI specifications, and interactive API references, streamlining the developer experience for both human and agent integrators.

Key Features

01Provide a single, consistent pipeline for authentication, validation, and middleware.
02Define unified APIs for both human clients and AI agents from a single server model.
03Automatically generate OpenAPI specifications and interactive API documentation.
04Expose read-only resources and reusable prompts for AI agent consumption.
051 GitHub stars
06Support wrapping existing APIs via OpenAPI or YAML configuration to expose them to agents.

Use Cases

01Creating a unified backend that simultaneously serves traditional web/mobile frontends and AI agents with consistent logic.
02Building new AI agent-ready APIs from scratch with integrated documentation and discovery.
03Wrapping existing REST APIs to expose their functionalities to AI agents without modifying the original codebase.