opamcp 1.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (3) hide show
  1. package/README.md +149 -0
  2. package/dist/index.js +175 -0
  3. package/package.json +51 -0
package/README.md ADDED
@@ -0,0 +1,149 @@
1
+ # opamcp
2
+
3
+ OpenAPI MCP Server - OpenAPI 스펙을 MCP 도구로 노출하여 AI 어시스턴트가 API를 탐색할 수 있게 합니다.
4
+
5
+ ## 설치 및 사용법
6
+
7
+ ```bash
8
+ # npx로 바로 실행
9
+ npx -y opamcp <openapi-url>
10
+
11
+ # 예시
12
+ npx -y opamcp https://petstore3.swagger.io/api/v3/openapi.json
13
+ ```
14
+
15
+ ## MCP 클라이언트 설정
16
+
17
+ ### Claude Desktop / Cursor
18
+
19
+ MCP 클라이언트 설정에 다음을 추가하세요:
20
+
21
+ ```json
22
+ {
23
+ "mcpServers": {
24
+ "my-api": {
25
+ "command": "npx",
26
+ "args": [
27
+ "-y",
28
+ "opamcp",
29
+ "https://petstore3.swagger.io/api/v3/openapi.json"
30
+ ]
31
+ }
32
+ }
33
+ }
34
+ ```
35
+
36
+ ## 제공되는 도구
37
+
38
+ | 도구 | 설명 | 파라미터 |
39
+ | ---------------------- | ----------------------------------------------------------- | -------------------------------- |
40
+ | `get_api_info` | API 기본 정보 조회 (title, version, description, servers) | - |
41
+ | `list_tags` | 모든 태그(API 그룹) 목록 조회 | - |
42
+ | `list_endpoints` | 모든 엔드포인트 요약 목록 조회 | - |
43
+ | `get_endpoints_by_tag` | 특정 태그에 속한 엔드포인트 조회 | `tag: string` |
44
+ | `get_endpoint_detail` | 엔드포인트 상세 정보 조회 (파라미터, 요청, 응답, 스키마 등) | `path: string`, `method: string` |
45
+ | `list_schemas` | components/schemas의 모든 스키마 이름 조회 | - |
46
+ | `get_schema` | 특정 스키마 정의 조회 | `name: string` |
47
+ | `search_endpoints` | path, summary, operationId로 엔드포인트 검색 | `query: string` |
48
+
49
+ ## 권장 사용 흐름
50
+
51
+ 1. **`get_api_info`** - API가 무엇인지 파악
52
+ 2. **`list_tags`** - API 구조 파악
53
+ 3. **`list_endpoints`** 또는 **`get_endpoints_by_tag`** - 관련 엔드포인트 찾기
54
+ 4. **`get_endpoint_detail`** - 특정 엔드포인트 상세 정보 확인
55
+ 5. **`list_schemas`** → **`get_schema`** - 데이터 타입 탐색
56
+
57
+ ## 개발
58
+
59
+ ```bash
60
+ # 의존성 설치
61
+ bun install
62
+
63
+ # 로컬 실행
64
+ bun run dev https://petstore3.swagger.io/api/v3/openapi.json
65
+
66
+ # 배포용 빌드
67
+ bun run build
68
+ ```
69
+
70
+ ## 라이선스
71
+
72
+ MIT
73
+
74
+ ---
75
+
76
+ # English
77
+
78
+ OpenAPI MCP Server - Expose OpenAPI specs as MCP tools for AI assistants.
79
+
80
+ This MCP server parses an OpenAPI specification and provides semantic tools that allow AI assistants to explore and understand APIs step by step.
81
+
82
+ ## Installation & Usage
83
+
84
+ ```bash
85
+ # Run directly with npx
86
+ npx -y opamcp <openapi-url>
87
+
88
+ # Example
89
+ npx -y opamcp https://petstore3.swagger.io/api/v3/openapi.json
90
+ ```
91
+
92
+ ## MCP Client Configuration
93
+
94
+ ### Claude Desktop / Cursor
95
+
96
+ Add to your MCP client configuration:
97
+
98
+ ```json
99
+ {
100
+ "mcpServers": {
101
+ "my-api": {
102
+ "command": "npx",
103
+ "args": [
104
+ "-y",
105
+ "opamcp",
106
+ "https://petstore3.swagger.io/api/v3/openapi.json"
107
+ ]
108
+ }
109
+ }
110
+ }
111
+ ```
112
+
113
+ ## Available Tools
114
+
115
+ | Tool | Description | Parameters |
116
+ | ---------------------- | --------------------------------------------------------------- | -------------------------------- |
117
+ | `get_api_info` | Get API basic info (title, version, description, servers) | - |
118
+ | `list_tags` | List all tags (API groups) | - |
119
+ | `list_endpoints` | List all endpoints with summary | - |
120
+ | `get_endpoints_by_tag` | Get endpoints filtered by tag | `tag: string` |
121
+ | `get_endpoint_detail` | Get detailed endpoint info (params, request, response, schemas) | `path: string`, `method: string` |
122
+ | `list_schemas` | List all schema names in components/schemas | - |
123
+ | `get_schema` | Get full schema definition | `name: string` |
124
+ | `search_endpoints` | Search endpoints by path, summary, or operationId | `query: string` |
125
+
126
+ ## Recommended Usage Flow
127
+
128
+ 1. **`get_api_info`** - Understand what the API is about
129
+ 2. **`list_tags`** - See how the API is organized
130
+ 3. **`list_endpoints`** or **`get_endpoints_by_tag`** - Find relevant endpoints
131
+ 4. **`get_endpoint_detail`** - Get detailed information about a specific endpoint
132
+ 5. **`list_schemas`** → **`get_schema`** - Explore data types
133
+
134
+ ## Development
135
+
136
+ ```bash
137
+ # Install dependencies
138
+ bun install
139
+
140
+ # Run locally
141
+ bun run dev https://petstore3.swagger.io/api/v3/openapi.json
142
+
143
+ # Build for distribution
144
+ bun run build
145
+ ```
146
+
147
+ ## License
148
+
149
+ MIT