smithery/neversight

api-to-mcp

Convert OpenAPI v3 specifications into MCP servers using HAPI CLI. Supports local, Docker, and Cloudflare Workers deployment. Zero code required. Use when you need to expose API functionality as MCP tools or deploy API-based services to multiple hosting platforms.

Installation

$ npx skills add smithery/neversight --skill api-to-mcp

Similar popular skills

Related neighbors and high-traction skills in the same topics — useful to compare before installing.

Also in this package

Other skills from smithery/neversight · top by installs.

npx skills add smithery/neversight

Browse all from smithery/neversight

More details

Agent compatibility

Declared targets from SKILL.md / docs. Unmarked agents are not listed — the skill may still install via the CLI.

Claude Code Not declared
Cursor Not declared
Codex Not declared
GitHub Copilot Not declared
Windsurf Not declared
Gemini CLI Not declared
Cline Not declared
OpenCode Not declared

Skill metadata

Parsed from SKILL.md frontmatter.

Version0.1.0
LicenseMIT
CompatibilityRequires hapi, curl; optionally docker and wrangler for deployment
Allowed toolsBash(curl:*) Bash(hapi:*) Read Bash(docker:*) Bash(wrangler:*)
More metadata
author
mcp.com.ai agent-skills
version
0.1.0

Package contents

Files included with this skill beyond the listing page.

  • skill md SKILL.md 4,187 B
  • docs SUMMARY.md 282 B

History

  1. First recorded snapshot · 0 installs

SKILL.md

API to MCP Server Skill

Convert OpenAPI v3 specifications into fully functional MCP (Model Context Protocol) servers using HAPI CLI — no code required.

Workflow

Phase 1: Environment Setup

  1. Verify HAPI CLI installation

``bash hapi --version ``

If not installed, install using: - Linux/macOS: curl -fsSL https://get.mcp.com.ai/hapi.sh | bash - Windows: irm https://get.mcp.com.ai/hapi.ps1 | iex - Docker: Use hapimcp/hapi-cli:latest image directly

  1. Validate OpenAPI spec is v3.x (not v2/Swagger). HAPI requires OpenAPI 3.0+ specifications.

Phase 2: Local Development & Testing

  1. Start local MCP server

``bash hapi serve <project-name> \ --openapi <path-or-url-to-openapi-spec> \ --url <backend-api-url> \ --headless \ --port 3030 ``

  1. Verify server health

```bash curl -s http://localhost:3030/health # Expected: 200 OK

curl -s http://localhost:3030/mcp/ping # Expected: pong ```

  1. Test MCP endpoint — The MCP transport is available at /mcp using Streamable HTTP:

- POST /mcp — JSON-RPC messages - GET /mcp — Server info (returns 204)

Phase 3: Deployment

Choose deployment target based on requirements:

Option A: Cloudflare Workers (Recommended for simplicity)

  1. Authenticate (first time only):

``bash hapi login ``

  1. Deploy:

``bash hapi deploy \ --openapi <path-or-url-to-openapi-spec> \ --url <backend-api-url> \ --name <worker-name> \ --project <project-name> ``

  1. Verify deployment:

``bash curl -s https://<worker-name>.<account>.workers.dev/health ``

Option B: Docker (Self-hosted)

docker run --name hapi-<project> -d --rm \
  -p 3030:3030 \
  hapimcp/hapi-cli:latest serve <project-name> \
  --openapi <openapi-url> \
  --url <backend-api-url> \
  --port 3030 \
  --headless

Phase 4: Verification Checklist

Before considering deployment complete:

  • /health returns 200 OK
  • /mcp/ping returns pong
  • At least one tool call succeeds via MCP transport
  • Error responses include actionable messages

Key Concepts

Headless Mode

Use --headless flag when the MCP server proxies requests to an existing backend API. Without this flag, HAPI serves the OpenAPI spec documentation UI.

Streamable HTTP Transport

HAPI uses Streamable HTTP (not stdio). MCP clients connect via HTTP POST to /mcp endpoint. SSE is supported for streaming responses.

OpenAPI Spec Sources

HAPI accepts specs from:

References

For detailed documentation, consult:

  • [references/hapi-cli-commands.md](references/hapi-cli-commands.md) — Complete CLI reference
  • [references/deployment-patterns.md](references/deployment-patterns.md) — Docker & Cloudflare recipes
  • [references/troubleshooting.md](references/troubleshooting.md) — Common issues & fixes

Quick Examples

Petstore API (Demo)

hapi serve petstore \
  --openapi https://petstore3.swagger.io/api/v3/openapi.json \
  --url https://petstore3.swagger.io/api/v3 \
  --headless --port 3030

Custom API

hapi serve my-api \
  --openapi https://my-api.example.com/openapi.json \
  --url https://my-api.example.com \
  --headless --port 3030

Deploy to Cloudflare

hapi deploy \
  --openapi https://my-api.example.com/openapi.json \
  --url https://my-api.example.com \
  --name my-api-mcp