OpenAPI to MCP Server
mcp-use/mcp-use
Turns an OpenAPI or Swagger spec into an MCP server with the mcp-use TypeScript SDK, mapping each operation to a tool, wiring auth, testing and deploying.
The contract every new or modified API endpoint must follow so it is correct for the public OpenAPI spec, the MCP server (npm @trycompai/mcp-server), the ValidationPipe, and the docs.
$ npx skills add trycompai/comp --skill api-endpoint-contract -a claude-codeProject install by default; add -g for ~/.claude/skills/.
$ gh skill install trycompai/comp api-endpoint-contract --agent claude-codeProject scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).
$ git clone --depth 1 https://github.com/trycompai/comp.git skills-src && mkdir -p .claude/skills && cp -r skills-src/.claude/skills/api-endpoint-contract .claude/skills/api-endpoint-contract && rm -rf skills-srcUse ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.
Claude Code skills documentation · loads skills from .claude/skills/
Install the "api-endpoint-contract" agent skill from https://github.com/trycompai/comp/tree/main/.claude/skills/api-endpoint-contract into .claude/skills/api-endpoint-contract/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "api-endpoint-contract", then confirm the skill loads.Claude Code copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$skill-installer install https://github.com/trycompai/comp/tree/main/.claude/skills/api-endpoint-contractType this inside Codex. $skill-installer <name> installs a curated skill from openai/skills. The installer writes to $CODEX_HOME/skills (default ~/.codex/skills). Restart Codex if the skill does not show up.
$ npx skills add trycompai/comp --skill api-endpoint-contract -a codexProject install goes to .agents/skills/; add -g for ~/.codex/skills/.
$ gh skill install trycompai/comp api-endpoint-contract --agent codexProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/trycompai/comp.git skills-src && mkdir -p .agents/skills && cp -r skills-src/.claude/skills/api-endpoint-contract .agents/skills/api-endpoint-contract && rm -rf skills-srcUse ~/.agents/skills/ instead of .agents/skills for a personal install.
Codex skills documentation · loads skills from .agents/skills/
Install the "api-endpoint-contract" agent skill from https://github.com/trycompai/comp/tree/main/.claude/skills/api-endpoint-contract into .agents/skills/api-endpoint-contract/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "api-endpoint-contract", then confirm the skill loads.Codex copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ npx skills add trycompai/comp --skill api-endpoint-contract -a cursorProject install goes to .agents/skills/; add -g for ~/.cursor/skills/.
$ gh skill install trycompai/comp api-endpoint-contract --agent cursorProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/trycompai/comp.git skills-src && mkdir -p .cursor/skills && cp -r skills-src/.claude/skills/api-endpoint-contract .cursor/skills/api-endpoint-contract && rm -rf skills-srcUse ~/.cursor/skills/ instead of .cursor/skills for a personal install.
Cursor skills documentation · loads skills from .cursor/skills/, .agents/skills/, .claude/skills/, .codex/skills/
Install the "api-endpoint-contract" agent skill from https://github.com/trycompai/comp/tree/main/.claude/skills/api-endpoint-contract into .cursor/skills/api-endpoint-contract/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "api-endpoint-contract", then confirm the skill loads.Cursor copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ gemini skills install https://github.com/trycompai/comp.git --path .claude/skills/api-endpoint-contract--scope user (default) or --scope workspace; --path is the subfolder of the repo that holds the skill; --consent skips the security confirmation prompt.
$ npx skills add trycompai/comp --skill api-endpoint-contract -a gemini-cliProject install goes to .agents/skills/; add -g for ~/.gemini/skills/.
$ gh skill install trycompai/comp api-endpoint-contract --agent gemini-cliProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/trycompai/comp.git skills-src && mkdir -p .gemini/skills && cp -r skills-src/.claude/skills/api-endpoint-contract .gemini/skills/api-endpoint-contract && rm -rf skills-srcUse ~/.gemini/skills/ instead of .gemini/skills for a personal install, then run /skills reload.
Gemini CLI skills documentation · loads skills from .gemini/skills/, .agents/skills/
Install the "api-endpoint-contract" agent skill from https://github.com/trycompai/comp/tree/main/.claude/skills/api-endpoint-contract into .gemini/skills/api-endpoint-contract/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "api-endpoint-contract", then confirm the skill loads.Gemini CLI copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ gh skill install trycompai/comp api-endpoint-contractInstalls for Copilot at project scope by default; add --scope user for a personal install. Preview a skill first with gh skill preview. Needs GitHub CLI 2.90.0 or later (public preview).
$ npx skills add trycompai/comp --skill api-endpoint-contract -a github-copilotProject install goes to .agents/skills/; add -g for ~/.copilot/skills/.
$ git clone --depth 1 https://github.com/trycompai/comp.git skills-src && mkdir -p .github/skills && cp -r skills-src/.claude/skills/api-endpoint-contract .github/skills/api-endpoint-contract && rm -rf skills-srcUse ~/.copilot/skills/ instead of .github/skills for a personal install. Commit .github/skills so cloud agent and code review can use it.
GitHub Copilot skills documentation · loads skills from .github/skills/, .claude/skills/, .agents/skills/
Install the "api-endpoint-contract" agent skill from https://github.com/trycompai/comp/tree/main/.claude/skills/api-endpoint-contract into .github/skills/api-endpoint-contract/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "api-endpoint-contract", then confirm the skill loads.GitHub Copilot copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ npx skills add trycompai/comp --skill api-endpoint-contract -a opencodeOpenCode documents no install command of its own. Project install goes to .agents/skills/; add -g for ~/.config/opencode/skills/.
$ gh skill install trycompai/comp api-endpoint-contract --agent opencodeProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/trycompai/comp.git skills-src && mkdir -p .opencode/skills && cp -r skills-src/.claude/skills/api-endpoint-contract .opencode/skills/api-endpoint-contract && rm -rf skills-srcUse ~/.config/opencode/skills/ instead of .opencode/skills for a personal install.
OpenCode skills documentation · loads skills from .opencode/skills/, .claude/skills/, .agents/skills/
Install the "api-endpoint-contract" agent skill from https://github.com/trycompai/comp/tree/main/.claude/skills/api-endpoint-contract into .opencode/skills/api-endpoint-contract/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "api-endpoint-contract", then confirm the skill loads.OpenCode copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
api-endpoint-contractThe contract every new or modified API endpoint must follow so it is correct for the public OpenAPI spec, the MCP server (npm @trycompai/mcp-server), the ValidationPipe, and the docs.
API Endpoint Contract is an agent skill from trycompai/comp. The contract every new or modified API endpoint must follow so it is correct for the public OpenAPI spec, the MCP server (npm @trycompai/mcp-server), the ValidationPipe, and the docs. Triggers on "new endpoint", "add API", "new DTO", "@Body", "@RequirePermission", "MCP tool", "edit controller in apps/api", "OpenAPI", or whenever editing controllers under apps/api/src/.
Its SKILL.md is about 2.7k tokens, which your agent loads only when the skill is triggered. It is a single SKILL.md file with no bundled scripts.
It sits in Backend & APIs, covering OpenAPI specifications, REST APIs and MCP servers. It works with OpenAPI, Model Context Protocol and npm. The repository describes itself as: AI Native platform to get companies compliant - Vanta & Drata Alternative. The licence is AGPL-3.0.
11 steps, taken from the step headings in SKILL.md.
Read from SKILL.md and the folder at commit 1bf4d52. It shows what the files ask for, not the result of running them.
Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.
From allowed-tools in the SKILL.md frontmatter.
Shell commands in SKILL.md call:
nodebungitFrom the folder's file list and the shell code blocks in SKILL.md.
No URLs in SKILL.md. Its commands use git, which can reach the network depending on how they are called.
From URLs in SKILL.md, links to its own repository left out.
Names no API keys, tokens, secrets or passwords.
From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.
API Endpoint Contract loads about 2.7k tokens when it runs. Until then it costs about 98 tokens; SKILL.md has 1,008 words of instructions outside code blocks.
Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.
The automated check found no risky patterns in SKILL.md.
Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.
The full file from trycompai/comp at commit 1bf4d52, republished under its AGPL-3.0 licence (© trycompai). 1,008 words, ~2,748 tokens.
.claude/skills/api-endpoint-contract/SKILL.md (or your agent's skills folder).Every customer-facing endpoint in apps/api/src/ ends up in three places:
packages/docs/openapi.json) — regenerated on every dev boot, consumed by Speakeasy.apps/mcp-server/, published as @trycompai/mcp-server on npm) — generated daily from the OpenAPI spec.If any one of these three is wrong, the endpoint either silently breaks for agents (Claude Desktop, Cursor, Codex, etc.) or fails validation at runtime. Follow this contract on every body-accepting endpoint.
// ❌ erased at runtime → empty MCP schema → agents blind-guess the body
interface CreateConnectionDto {
providerSlug: string;
credentials?: Record<string, string | string[]>;
}
// ❌ same problem
async updateConnection(@Body() body: { metadata?: Record<string, unknown> }) { ... }
// ✅ class — survives to runtime, @nestjs/swagger can introspect it
class CreateConnectionDto {
@ApiProperty({ description: '...', example: 'aws' })
@IsString()
providerSlug!: string;
}The global ValidationPipe runs with whitelist: true, forbidNonWhitelisted: true. A class with @ApiProperty but no class-validator decorator has zero "known" properties — the pipe rejects every field with "property X should not exist". The reverse (class-validator without @ApiProperty) generates an empty MCP schema and agents blind-guess the body.
class FooDto {
// ✅ both stacks
@ApiProperty({ description: 'Name', example: 'foo' })
@IsString()
name!: string;
@ApiPropertyOptional({ description: 'Optional tag', example: 'beta' })
@IsOptional()
@IsString()
tag?: string;
@ApiPropertyOptional({ type: 'object', additionalProperties: true })
@IsOptional()
@IsObject()
metadata?: Record<string, unknown>;
@ApiProperty({ type: 'array', items: { type: 'string' } })
@IsArray()
@IsString({ each: true })
services!: string[];
}@ApiBody({ type: DtoClass }) on the endpoint@nestjs/swagger does NOT reliably infer the body type from @Body() body: DtoClass alone. Always declare it explicitly so the OpenAPI requestBody.content.application/json.schema.$ref resolves correctly.
@Post()
@RequirePermission('integration', 'create')
@ApiOperation({ summary: 'Create an integration connection' })
@ApiBody({ type: CreateConnectionDto })
async createConnection(
@Body() body: CreateConnectionDto,
@OrganizationId() organizationId: string,
) { ... }apps/api/src/openapi/seo-text.ts:71 (toOperationDescription) trims every @ApiOperation.description to 240 chars at a word boundary for SEO/docs consistency. Anything longer gets cut mid-sentence and the trailing words are stripped — including the actionable step at the end of your description. Count chars; keep the key instruction in the first 240.
Tool names are auto-derived from controller method names by applyMcpToolNames in apps/api/src/openapi/public-docs-metadata.ts. If the auto-name is generic or ugly, override:
@Post(':id/auto-answer')
@ApiExtension('x-speakeasy-mcp', { name: 'generate-questionnaire-answers' })
async triggerAutoAnswer(@Param('id') id: string) { ... }Tool name budget: 52 chars max, kebab-case.
SessionOnlyGuardIf your endpoint uses @UseGuards(HybridAuthGuard, SessionOnlyGuard, PermissionGuard), API-key callers get a 403 — meaning the MCP tool exists but fails for every customer call. Either:
SessionOnlyGuard if the endpoint should be agent-callable, ORapps/mcp-server/.speakeasy/mcp-uploads-overlay.yaml with x-speakeasy-mcp: { disabled: true }.Anything taking > ~30s should not block on a single tool call. Return a run handle and let the agent poll:
// Trigger: returns immediately
@Post(':id/auto-answer')
async triggerAutoAnswer(@Param('id') id: string): Promise<TriggerResponseDto> {
const handle = await tasks.trigger('auto-answer-task', { id, ... });
return { runId: handle.id, status: 'generating', totalQuestions, answeredQuestions };
}
// Agent polls find-by-id until counts convergeThe @ApiOperation.description should tell the agent the poll target (e.g. "Poll GET /v1/X/:id until answeredQuestions equals totalQuestions").
Base64-through-LLM is catastrophically slow and overflows the context window. For any endpoint that needs file bytes:
// Endpoint accepts both for the web UI (fileData) and agents (s3Key):
class UploadAndParseDto {
@ApiPropertyOptional({ description: 'Base64 — web UI only. AI clients use s3Key.' })
@IsOptional() @IsString()
fileData?: string;
@ApiPropertyOptional({ description: 'Key returned by /v1/uploads/presign.' })
@IsOptional() @IsString()
s3Key?: string;
}
// Service resolves whichever was provided:
const bytes = dto.fileData
?? (dto.s3Key ? await uploadsService.readUploadAsBase64(orgId, dto.s3Key) : null);The MCP overlay then strips fileData from the MCP tool input so agents are forced into the presigned path. Pattern is in apps/mcp-server/.speakeasy/mcp-uploads-overlay.yaml.
apps/api/src/openapi/public-docs-quality.ts strips paths matching /\/credentials(?:\/|$)/ and similar from packages/docs/openapi.json. Endpoints for rotating credentials, raw secrets, etc. intentionally do not appear in MCP. Add new sensitive paths to that deny-list if they handle secrets.
SSE streams (@ApiProduces('text/event-stream')) and binary file responses (@Res() res.send(buffer)) cannot be consumed by a single JSON-RPC tool call. Disable them for MCP only (HTTP endpoint stays for the web UI):
# apps/mcp-server/.speakeasy/mcp-uploads-overlay.yaml
- target: "$.paths['/v1/questionnaire/auto-answer'].post"
update:
x-speakeasy-mcp:
disabled: true@ApiOperation({ summary, description }) is not optional. openapi-docs.spec.ts (via collectPublicOpenApiIssues in apps/api/src/openapi/public-docs-quality.ts) fails CI if any non-excluded operation has:
summary → missingSummariesdescription or SEO metadata → missingMetadatainvalidSeoThis matters more now that the hosted MCP (Gram) uses dynamic toolsets: with 300+ tools the agent never sees them all — it runs a semantic search over tool names + descriptions and only loads matches. A tool with a weak or missing description is effectively undiscoverable. The description is the tool's only chance of being found.
@ApiOperation({
summary: 'List compliance policies', // concise tool title
description:
"Returns the organization's compliance policies (SOC 2, ISO 27001, …) " +
'with status and owner. Use to review or audit policy coverage.', // what it does + when to use it
})Write the description for the agent deciding whether to call this tool: state what it does and when to use it. (Keep it ≤ 240 chars — see Rule 4.)
class DTO. Two decorator stacks on every field. Add @ApiBody({ type: DtoClass }) on the endpoint.@ApiOperation({ summary, description }) — both required, CI-enforced by openapi-docs.spec.ts, and they power MCP dynamic-toolset discovery (Rule 11). Keep the description ≤ 240 chars (Rule 4).@ApiExtension('x-speakeasy-mcp', { name: '...' }).SessionOnlyGuard, or disable it for MCP via the overlay.s3Key and read via UploadsService.readUploadAsBase64.bun run --filter '@trycompai/api' dev — your dev server regenerates packages/docs/openapi.json on boot.git add packages/docs/openapi.json — commit the regenerated spec alongside your API change. The daily Speakeasy CI reads from this file; if it's stale, your new tool never reaches customers.node -e 'const o=require("./packages/docs/openapi.json"); console.log(o.paths["/v1/your-path"]?.post?.requestBody?.content?.["application/json"]?.schema)'undefined or has empty properties, stop — fix the DTO before merging.Every bug below was a real customer-visible MCP failure caught during the May 2026 audit:
| Bug | Root cause | Rule that prevents it |
|---|---|---|
PDF upload crashed with Cannot read properties of undefined (reading 'replace') | Inline @Body() type → empty schema → agent guessed wrong body | Rule 1 + 3 |
| Auto-answer "schema is just an empty object" | DTO had class-validator only, no @ApiProperty | Rule 2 |
create-connection "Provider undefined not found" | DTO was an interface, not a class | Rule 1 |
create-connection "property X should not exist" 400 | Class converted, but I forgot class-validator decorators | Rule 2 |
create-upload-url description cut at "...then." | Description was 330 chars; seo-text.ts truncates at 240 | Rule 4 |
| Agent uploads stuck for 15+ min on base64 encoding | Tool accepted fileData as the only file input | Rule 8 |
| Agent calls SSE auto-answer and hangs | Tool was generated from @ApiProduces('text/event-stream') | Rule 10 |
| Agent tries to start OAuth and gets 403 | Endpoint was behind SessionOnlyGuard but generated as MCP tool | Rule 6 |
| Agent can't find a tool that exists (dynamic toolsets) | Endpoint had a missing/weak description → invisible to semantic search | Rule 11 |
Follow the 10 rules and you avoid every one of these.
© trycompai, AGPL-3.0. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file
Just SKILL.md in .claude/skills/api-endpoint-contract of trycompai/comp.
Open the folder on GitHubat commit 1bf4d52
API Endpoint Contract next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.
| Skill | Stars | Used in | Tokens | Auto-check | Licence | Repo updated |
|---|---|---|---|---|---|---|
| API Endpoint Contract this skilltrycompai/comp | 2k | — | ~2.7k | Automated safety check: Pass | AGPL-3.0 | |
| OpenAPI to MCP Servermcp-use/mcp-use | 11k | — | ~5.2k | Automated safety check: Pass | Apache-2.0 | |
| Dashclaw Shipucsandman/DashClaw | 310 | — | ~7.2k | Automated safety check: Pass | MIT | |
| OpenAPI CLI CallerEvilFreelancer/openapi-to-cli | 265 | — | ~879 | Automated safety check: Pass | MIT | |
| SpikardGoldziher/spikard | 123 | — | ~799 | Automated safety check: Pass | MIT | |
| Kingdee MCP DevWaHaiLong/KingdeeMCP | 103 | — | ~853 | Automated safety check: Pass | MIT |
mcp-use/mcp-use
Turns an OpenAPI or Swagger spec into an MCP server with the mcp-use TypeScript SDK, mapping each operation to a tool, wiring auth, testing and deploying.
ucsandman/DashClaw
The single command that gets a DashClaw change ON MAIN AND LIVE — it resolves everything blocking production, never defers, and never hands back a checklist.
EvilFreelancer/openapi-to-cli
Turns an OpenAPI, Swagger or OpenRPC spec into CLI commands the agent can search and call, with no MCP server or code generation.
Goldziher/spikard
Scaffold Spikard projects and generate code from OpenAPI, AsyncAPI, OpenRPC, GraphQL, and Protobuf schemas using the Spikard CLI or its MCP server.
WaHaiLong/KingdeeMCP
Knowledge base for the Kingdee MCP Dev Squad. An agent skill from WaHaiLong/KingdeeMCP.
agentfront/frontmcp
A skill your agent uses when building any FrontMCP server component other than a tool (for tools, use create-tool).
trycompai/comp
How to reuse ANY integration check's results in a feature via the universal CheckResultsService (apps/api integration-platform).
trycompai/comp
A skill your agent uses when implementing data fetching, API calls, server/client components, or SWR hooks
trycompai/comp
A skill your agent uses when SDK generation failed or seeing errors.
trycompai/comp
A skill your agent uses when building forms - covers React Hook Form, Zod validation, and form patterns
trycompai/comp
A skill your agent uses when writing TypeScript/React code - covers type safety, component patterns, and file organization
trycompai/comp
A skill your agent uses when generating an MCP server from an OpenAPI spec with Speakeasy.
Works with
Categories
The contract every new or modified API endpoint must follow so it is correct for the public OpenAPI spec, the MCP server (npm @trycompai/mcp-server), the ValidationPipe, and the docs. API Endpoint Contract is an agent skill from trycompai/comp. The contract every new or modified API endpoint must follow so it is correct for the public OpenAPI spec, the MCP server (npm @trycompai/mcp-server), the ValidationPipe, and the docs.
API Endpoint Contract fits situations like: @RequirePermission; edit controller in apps/api; whenever editing controllers under apps/api/src/.
Run `npx skills add trycompai/comp --skill api-endpoint-contract -a claude-code`. Or copy the skill folder (.claude/skills/api-endpoint-contract in trycompai/comp) into .claude/skills/api-endpoint-contract in your project. Claude Code loads it when a task matches its description.
Run `npx skills add trycompai/comp --skill api-endpoint-contract -a codex`. Or copy the skill folder (.claude/skills/api-endpoint-contract in trycompai/comp) into .agents/skills/api-endpoint-contract in your project. Codex loads it when a task matches its description.
Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add trycompai/comp --skill api-endpoint-contract -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/api-endpoint-contract, .gemini/skills/api-endpoint-contract, .github/skills/api-endpoint-contract and .opencode/skills/api-endpoint-contract in your project.
Going by SKILL.md and its folder, API Endpoint Contract needs the command-line tools its instructions call (node, bun and git).
SKILL.md contains no URLs. Its commands use git, which can reach the network depending on how they are called. This is read from the text; nothing was executed.
Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.
API Endpoint Contract is published under the AGPL-3.0 licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.
About 2.7k tokens (SKILL.md is roughly 11k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.
Skills that share tags, products or a category with API Endpoint Contract: OpenAPI to MCP Server (mcp-use/mcp-use, 11k stars), Dashclaw Ship (ucsandman/DashClaw, 310 stars), OpenAPI CLI Caller (EvilFreelancer/openapi-to-cli, 265 stars) and Spikard (Goldziher/spikard, 123 stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.
trycompai (a GitHub organization) maintains it in trycompai/comp, which has 2,016 GitHub stars. The repository holds 31 skills in this directory. The repository was last updated on October 2, 2026.
Source: trycompai/comp on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.