Skip to content

feat: import OpenAPI and GraphQL specs as MCP tools#198

Open
daltoniam wants to merge 1 commit into
mainfrom
feat/spec-imports
Open

feat: import OpenAPI and GraphQL specs as MCP tools#198
daltoniam wants to merge 1 commit into
mainfrom
feat/spec-imports

Conversation

@daltoniam

Copy link
Copy Markdown
Owner

Summary

  • Adds a "bring your own spec" feature: paste an OpenAPI 3.x document or a GraphQL introspection result and its operations become searchable, executable MCP tools — no adapter code required.
  • New management page in the web UI (list / add / remove) with live status, plus live reload so imported tools appear without restarting the server.

How it works

  • New specimport/ package parses a spec into a runtime Integration (Load), and a Syncer reconciles the registry against config on startup and on every config change — it only ever touches integrations it registered, never built-ins.
  • Imports are stored in config under spec_imports and injected server-side credentials never reach the model.

Fixes bundled in

Two bugs discovered during live testing that made imported tools invisible to search/execute even though they showed as active in the UI:

  1. Config loading silently dropped imports on every read (they weren't carried through the defaults merge).
  2. The enabled-integration lookup used by search indexing and execute resolution didn't include imports.

Verification

Tested end-to-end against the live Swagger Petstore: search returns the imported tools and execute performs real upstream calls (valid IDs return data, invalid IDs return the upstream 404). Full CI passes (build, vet, race tests, lint).

💘 Generated with Crush

Let users bring their own API by pasting an OpenAPI 3.x document or a
GraphQL introspection result. Each import becomes a live integration
whose operations are exposed as searchable, executable MCP tools, with
a management page in the web UI and live reload so new tools appear
without a restart.

Also fixes two issues that prevented imported tools from being reachable:
config loading silently discarded imports on every read, and the
enabled-integration lookup used by search indexing and execute
resolution ignored imports entirely.

Co-Authored-By: Crush <noreply@anthropic.com>

@acmacalister acmacalister left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

CI/status checks all passing (build, test, lint, security). Clean PR — follows project conventions, comprehensive test coverage, no blocking issues found. LGTM.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants