Use With MCP
Gestalt exposes one MCP endpoint at /mcp.
Expose OpenAPI Operations As MCP Tools
Assume you already have a local OpenAPI file such as ./openapi/httpbin.yaml.
openapi: 3.0.3
info:
title: HTTPBin
version: 1.0.0
servers:
- url: https://httpbin.org
paths:
/ip:
get:
operationId: get_ip
responses:
"200":
description: OKproviders:
httpbin:
mcp:
enabled: true
tool_prefix: httpbin_
connections:
public:
mode: none
auth:
type: none
surfaces:
openapi:
document: ./openapi/httpbin.yaml
connection: publicStart the server and /mcp is mounted automatically.
Add An Upstream MCP Surface
Assume you already have a local OpenAPI file such as ./openapi/notion.yaml.
providers:
notion:
mcp:
enabled: true
tool_prefix: notion_
connections:
REST:
mode: user
auth:
type: bearer
credentials:
- name: token
label: API Token
MCP:
mode: user
auth:
type: mcp_oauth
surfaces:
openapi:
document: ./openapi/notion.yaml
connection: REST
mcp:
url: https://mcp.notion.com/mcp
connection: MCPThis gives you:
- REST-backed tools from the OpenAPI catalog
- passthrough MCP tools from the upstream MCP server
Authenticate MCP Clients
Use the same credentials as the HTTP API:
- session cookie
Authorization: Bearer gst_api_...
If auth.provider is none, no extra MCP client credential is required.
Verify The Endpoint
curl http://localhost:8080/ready
curl -X POST http://localhost:8080/mcp \
-H "Content-Type: application/json" \
-d '{"jsonrpc":"2.0","id":1,"method":"tools/list","params":{}}'