Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,18 +10,27 @@ jobs:
runs-on: ubuntu-latest
permissions:
contents: write
id-token: write
env:
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 20
cache: npm
registry-url: https://registry.npmjs.org
- run: npm ci
- run: npm run check
- run: npm run build
- run: npm test
- run: npm run smoke
- run: npm pack
- name: Publish to npm
if: env.NPM_TOKEN != ''
run: npm publish --provenance --access public
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
- name: Create GitHub Release
uses: softprops/action-gh-release@v2
with:
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

Turn an OpenAPI 3.x spec into an MCP server. Each operation becomes an MCP tool; tool calls are validated, proxied to the upstream REST API, and the response is validated against the spec's response schemas.

> **Install from GitHub.** The `mcp-openapi` package on the npm registry is an unrelated third-party project. This project is installed as `github:evalops/mcp-openapi`.
> **Package name: `@evalops/mcp-openapi`.** The unscoped `mcp-openapi` package on the npm registry is an unrelated third-party project. Install this project from GitHub (`npm install github:evalops/mcp-openapi`) or from npm under the scoped name once a tagged release has been published.

## Quickstart

Expand Down Expand Up @@ -151,7 +151,7 @@ export default function transform({ operation, response }) {
## Library usage

```ts
import { parseSpec, generateToolsWithTags } from "mcp-openapi";
import { parseSpec, generateToolsWithTags } from "@evalops/mcp-openapi";

const spec = await parseSpec("./openapi.yaml");
const { tools } = generateToolsWithTags(spec, { prefix: "github" });
Expand Down
9 changes: 5 additions & 4 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

26 changes: 23 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,8 +1,28 @@
{
"name": "mcp-openapi",
"version": "0.4.0",
"name": "@evalops/mcp-openapi",
"version": "0.5.0",
"type": "module",
"description": "OpenAPI to MCP server bridge",
"description": "OpenAPI 3.x to MCP server bridge with stdio, StreamableHTTP, and SSE transports",
"license": "MIT",
"repository": {
"type": "git",
"url": "git+https://github.com/evalops/mcp-openapi.git"
},
"homepage": "https://github.com/evalops/mcp-openapi#readme",
"bugs": {
"url": "https://github.com/evalops/mcp-openapi/issues"
},
"keywords": [
"mcp",
"model-context-protocol",
"openapi",
"swagger",
"llm",
"tools"
],
"publishConfig": {
"access": "public"
},
"main": "./dist/index.js",
"types": "./dist/index.d.ts",
"exports": {
Expand Down
6 changes: 3 additions & 3 deletions src/server.ts
Original file line number Diff line number Diff line change
Expand Up @@ -638,8 +638,8 @@ async function scaffoldProject(targetDir: string): Promise<void> {
check: "tsc -p tsconfig.json --noEmit"
},
dependencies: {
// The npm package named "mcp-openapi" is an unrelated third-party project; install from GitHub.
"mcp-openapi": "github:evalops/mcp-openapi"
// The npm package named "mcp-openapi" is an unrelated third-party project; this package is @evalops/mcp-openapi.
"@evalops/mcp-openapi": "github:evalops/mcp-openapi"
},
devDependencies: {
"@types/node": "^22.13.4",
Expand Down Expand Up @@ -805,7 +805,7 @@ async function generateProjectFromSpec(targetDir: string, specPath: string, oper
build: "tsc -p tsconfig.json",
start: "node dist/server.js"
},
dependencies: { "mcp-openapi": "github:evalops/mcp-openapi" },
dependencies: { "@evalops/mcp-openapi": "github:evalops/mcp-openapi" },
devDependencies: { typescript: "^5.7.3", tsx: "^4.20.3", "@types/node": "^22.13.4" }
},
null,
Expand Down
2 changes: 1 addition & 1 deletion test/cli.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -97,5 +97,5 @@ test("scaffolds depend on the GitHub source, not the unrelated npm package", asy
const packageJson = JSON.parse(await readFile(resolve(outDir, "package.json"), "utf8")) as {
dependencies: Record<string, string>;
};
assert.equal(packageJson.dependencies["mcp-openapi"], "github:evalops/mcp-openapi");
assert.equal(packageJson.dependencies["@evalops/mcp-openapi"], "github:evalops/mcp-openapi");
});
Loading