Skip to content

Commit 09a550f

Browse files
update doc
1 parent f4dea00 commit 09a550f

File tree

1 file changed

+47
-1
lines changed

1 file changed

+47
-1
lines changed

README.md

Lines changed: 47 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,49 @@
11
# OpenAPI MCP Server
22

3-
Convert OpenAPI spec to MCP server, OpenAPI operations as tools
3+
Convert OpenAPI spec to MCP server, OpenAPI operations as tools
4+
5+
## CLI Options
6+
7+
When running the MCP server, an OpenAPI spec is required. It can be either a file path or URL.
8+
9+
The MCP server also provides options to filter operations to be converted as MCP tools.
10+
11+
Currently supported filter conditions:
12+
13+
|Condition|CLI option|Example|
14+
|---|---|---|
15+
|HTTP method| `--include-http-method` | `--include-http-method=GET` |
16+
|Path| `--include-path` | `--include-path=/holidays` |
17+
|Operation Id| `--include-operation-id` | `--include-operation-id=Root` |
18+
19+
20+
You can run the JAR file to see the CLI help.
21+
22+
```
23+
Usage: openapi-mcp [-hV] [--include-http-method=<includeHttpMethods>[,
24+
<includeHttpMethods>...]]...
25+
[--include-operation-id=<includeOperationIds>[,
26+
<includeOperationIds>...]]... [--include-path=<includePaths>
27+
[,<includePaths>...]]... <openapiSpec>
28+
Run OpenAPI MCP server
29+
<openapiSpec> File path or URL of OpenAPI spec
30+
-h, --help Show this help message and exit.
31+
--include-http-method=<includeHttpMethods>[,<includeHttpMethods>...]
32+
Include operations with HTTP methods (comma separated)
33+
--include-operation-id=<includeOperationIds>[,<includeOperationIds>...]
34+
Include operations with id (comma separated)
35+
--include-path=<includePaths>[,<includePaths>...]
36+
Include operations with paths (comma separated)
37+
-V, --version Print version information and exit.
38+
```
39+
40+
41+
## How to Run
42+
43+
### Container
44+
45+
Use Docker or Podman to run the container.
46+
47+
```sh
48+
podman run -i ghcr.io/javaaidev/openapi-mcp-server https://api.apis.guru/v2/specs/canada-holidays.ca/1.8.0/openapi.json
49+
```

0 commit comments

Comments
 (0)