sufetch
Provides type-safe API client and MCP tools for DigitalOcean's cloud platform API (200+ endpoints), allowing AI assistants to explore and generate code for managing droplets, domains, and other resources.
Provides type-safe API client and MCP tools for Hetzner Cloud API (100+ endpoints), allowing AI assistants to explore and generate code for managing cloud servers, networks, and other infrastructure.
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@sufetch Generate a DigitalOcean client to list all droplets"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
SuFetch
Type-safe OpenAPI clients with MCP server for AI-driven API exploration
Table of Contents
Related MCP server: apifable
What is SuFetch?
SuFetch combines two powerful tools:
Type-Safe API Clients - Generate fully-typed TypeScript clients from OpenAPI specifications
MCP Server - Let AI assistants (like Claude) explore your APIs and generate code
Built with apiful for type-safe OpenAPI clients.
Features
✨ Fully Type-Safe - Autocomplete and type checking for all API calls
🤖 MCP Integration - AI assistants can explore and generate code for your APIs
🔄 Auto-Discovery - Automatic service detection and type generation
🛠️ Modern Stack - TypeScript 5.7, ESNext, strict mode
🧪 Well-Tested - 76+ tests with >60% coverage
Installation
For Using the API Client
# npm
npm install sufetch
# pnpm
pnpm add sufetch
# yarn
yarn add sufetchFor MCP Server (Global)
# Install globally
npm install -g sufetch
# Verify installation
sufetch-mcp --versionFor Development
git clone https://github.com/productdevbook/sufetch.git
cd sufetch
pnpm install
pnpm buildQuick Start
Using the Type-Safe API Client
import { createClient, cloud } from 'sufetch/hetzner'
// Create a typed client
const client = createClient({
baseURL: 'https://api.hetzner.cloud/v1',
headers: {
'Authorization': 'Bearer your-api-token'
}
}).with(cloud)
// Fully typed requests and responses
const servers = await client('/servers', {
method: 'GET' // ✅ Type-checked
})
// TypeScript knows the response type
console.log(servers.servers) // ✅ Autocomplete worksSee Supported APIs for all available services.
Type Helpers for Advanced Type Safety
Extract specific types from endpoints for maximum type safety:
import type { HetznerCloud } from 'sufetch/hetzner'
// Extract request body type
type CreateServerBody = HetznerCloud<'/servers', 'post'>['request']
// Extract response type
type GetServerResponse = HetznerCloud<'/servers/{id}', 'get'>['response']
// Extract query parameters
type ListServersQuery = HetznerCloud<'/servers', 'get'>['query']
// Extract path parameters
type ServerPathParams = HetznerCloud<'/servers/{id}', 'get'>['path']
// Use in functions for type safety
function processServer(server: GetServerResponse) {
console.log(server.server.id) // ✅ Full autocomplete
console.log(server.server.name) // ✅ Type-checked
}
function createServer(body: CreateServerBody) {
// TypeScript enforces correct structure
return client('/servers', {
method: 'POST',
body // ✅ Type-safe
})
}Available properties:
['request']- Request body type['response']- Success response (200/201)['query']- Query parameters['path']- Path parameters['responses'][status]- Specific status code response
Works with all APIs: HetznerCloud, DigitalOcean, OryKaratos, OryHydra.
Using with AI Assistants (MCP)
See the MCP Server Setup section below.
Supported APIs
SuFetch currently includes:
API | Description | Endpoints | Import |
DigitalOcean | Complete cloud platform API | 200+ |
|
Hetzner Cloud | Cloud infrastructure management | 100+ |
|
Ory Kratos | Identity & user management | 50+ |
|
Ory Hydra | OAuth 2.0 & OpenID Connect | 40+ |
|
Want to add more? See Adding New APIs.
MCP Server Setup
Quick Setup
1. Install (choose one):
npm install -g sufetch # Global
npx sufetch-mcp # No install2. Configure:
Edit config file:
macOS:
~/Library/Application Support/Claude/claude_desktop_config.jsonWindows:
%APPDATA%\Claude\claude_desktop_config.json
{
"mcpServers": {
"sufetch": {
"command": "sufetch-mcp"
}
}
}Restart Claude Desktop.
claude mcp add --transport stdio --scope project sufetch -- sufetch-mcpOr create .mcp.json:
{
"mcpServers": {
"sufetch": {
"command": "sufetch-mcp"
}
}
}3. Test: Ask Claude: "List available APIs using sufetch"
Available MCP Tools
Tool | Description |
| List all available APIs |
| Get API metadata |
| Search by path/method/description |
| Get full endpoint specs |
| Get data schemas |
| Generate TypeScript code |
| Get API quickstart guide |
Adding New APIs
Create directory:
mkdir -p openapi-specs/myapiAdd your
myapi.jsonOpenAPI specCopy
apiful.config.tsandindex.tsfromopenapi-specs/ory/as templateRun
pnpm build
Done! Your API is now available as sufetch/myapi and in the MCP server.
See CLAUDE.md for detailed instructions.
Development
pnpm install # Install
pnpm build # Build
pnpm test # Test
pnpm lint:fix # LintSee CLAUDE.md for architecture, build pipeline, and contribution guide.
Troubleshooting
# Test server works
sufetch-mcp # Should output: "SuFetch MCP server running on stdio"
# Check config
claude mcp list # For Claude Code
cat .mcp.json # Check file exists
# Restart Claude Desktop (if using Desktop)rm -rf node_modules pnpm-lock.yaml dist
pnpm install && pnpm buildStill stuck? Open an issue with your Node version and error message.
Contributing
Contributions welcome! See CONTRIBUTING.md.
git clone https://github.com/productdevbook/sufetch.git
cd sufetch
pnpm install && pnpm build
# Make changes, run `pnpm test && pnpm lint:fix`Links
CLAUDE.md - Architecture & development guide
Model Context Protocol - MCP docs
License
MIT © 2025
Available Tools
7 toolsgenerate_code_exampleB
Generate a complete TypeScript code example for an endpoint
Inputs: api_name (required), path (required), method (required).
get_api_infoC
Get detailed information about a specific API
Inputs: api_name (required).
get_endpoint_detailsA
Get complete details and usage example for a specific endpoint
Inputs: api_name (required), path (required), method (required).
get_quickstartA
Generate a quickstart guide with common operations for an API
Inputs: api_name (required).
get_schema_detailsC
Get details about a schema/model definition
Inputs: api_name (required), schema_name (required).
list_apisA
List all available API specifications with their metadata
Inputs: no named parameters.
search_endpointsC
Search for API endpoints by query, method, or tags
Inputs: api_name (required), query, method, limit.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 7 tools
Each tool has a clear and distinct purpose: code generation, API info, endpoint details, quickstart, schema details, listing, and searching. No overlapping functionality that would confuse an agent.
All tool names follow a consistent verb_noun pattern using lowercase and underscores (e.g., generate_code_example, list_apis). The naming is predictable and easy to understand.
With 7 tools, the server is well-scoped. It covers all necessary operations for exploring API documentation without being bloated or too minimal.
The tool surface covers listing, searching, and retrieving details for APIs, endpoints, schemas, code examples, and quickstarts. However, there is no tool to list all schemas directly, which is a minor gap.
Maintenance
Related MCP Connectors
MCP server for AI agents to plan, verify, and deploy Cloudflare-native apps.
MCP server that lets AI assistants use all OneSchema features exposed via the public API.
MCP server for building and testing AI agents with multi-model experimentation and insights.
MCP server that lets your AI assistant build and deploy apps, hosting each one at a live URL.
Related MCP Servers
- -licenseAqualityNot gradedmaintenanceA TypeScript-based MCP server that generates API clients from OpenAPI specifications, allowing automated code generation through natural language.144 npm1-
- AlicenseAqualityBmaintenanceMCP server that helps AI agents explore OpenAPI specs, search endpoints, and generate TypeScript types.781 npm10MIT
- AlicenseNot gradedqualityDmaintenanceConverts any OpenAPI specification into an MCP server, allowing AI assistants to interact with REST APIs through natural language.11 npm1MIT
- FlicenseNot gradedqualityCmaintenanceMulti-cloud MCP server that exposes cloud AI models as tools for AI CLI agents, supporting streaming, conversation history, parallel multi-model queries, and dynamic model discovery.2-