Skip to content

Commit 2ec45d8

Browse files
committed
init
1 parent 2bbead0 commit 2ec45d8

19 files changed

Lines changed: 4706 additions & 2 deletions

.eslintrc.json

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
{
2+
"env": {
3+
"es6": true,
4+
"node": true
5+
},
6+
"extends": [
7+
"eslint:recommended",
8+
"plugin:@typescript-eslint/eslint-recommended",
9+
"plugin:@typescript-eslint/recommended",
10+
"plugin:prettier/recommended"
11+
],
12+
"globals": {
13+
"Atomics": "readonly",
14+
"SharedArrayBuffer": "readonly"
15+
},
16+
"parser": "@typescript-eslint/parser",
17+
"parserOptions": {
18+
"ecmaVersion": 2018,
19+
"sourceType": "module"
20+
},
21+
"plugins": ["@typescript-eslint"],
22+
"rules": {
23+
"indent": ["error", 2],
24+
"linebreak-style": ["error", "unix"],
25+
"quotes": ["error", "single"],
26+
"semi": ["error", "always"],
27+
"@typescript-eslint/explicit-function-return-type": "off",
28+
"@typescript-eslint/no-explicit-any": "error",
29+
"@typescript-eslint/no-unused-vars": [
30+
"warn",
31+
{
32+
"argsIgnorePattern": "^_"
33+
}
34+
],
35+
"no-console": "warn"
36+
}
37+
}

.github/workflows/publish.yml

Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
name: Publish to NPM
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
8+
jobs:
9+
build:
10+
runs-on: ubuntu-latest
11+
steps:
12+
- name: Checkout code
13+
uses: actions/checkout@v4
14+
15+
- name: Setup Node.js
16+
uses: actions/setup-node@v4
17+
with:
18+
node-version: "24"
19+
registry-url: "https://registry.npmjs.org"
20+
21+
- name: Install pnpm
22+
uses: pnpm/action-setup@v4
23+
with:
24+
version: 8
25+
26+
- name: Get pnpm store directory
27+
id: pnpm-cache
28+
shell: bash
29+
run: |
30+
echo "STORE_PATH=$(pnpm store path)" >> $GITHUB_OUTPUT
31+
32+
- name: Setup pnpm cache
33+
uses: actions/cache@v4
34+
with:
35+
path: ${{ steps.pnpm-cache.outputs.STORE_PATH }}
36+
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
37+
restore-keys: |
38+
${{ runner.os }}-pnpm-store-
39+
40+
- name: Install dependencies
41+
run: pnpm install --frozen-lockfile
42+
43+
- name: Build
44+
run: pnpm run build
45+
46+
- name: Publish to NPM
47+
run: pnpm publish --no-git-checks --access public
48+
env:
49+
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}

.gitignore

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
# OS
2+
.DS_Store
3+
Thumbs.db
4+
5+
# IDE
6+
.vscode/
7+
.idea/
8+
9+
# Node.js
10+
node_modules/
11+
dist/
12+
build/
13+
.env

.mcp/server.json

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
{
2+
"mcpServers": {
3+
"api-docs-mcp": {
4+
"command": "npx",
5+
"args": ["api-docs-mcp"],
6+
"env": {
7+
"MCP_API_SOURCES": "[{\"name\":\"GitHub\",\"type\":\"gql\",\"url\":\"https://docs.github.com/public/fpt/schema.docs.graphql\"}]"
8+
}
9+
}
10+
}
11+
}

.npmignore

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
# Source files
2+
src/
3+
*.ts
4+
!*.d.ts
5+
6+
# Configuration files
7+
tsconfig.json
8+
eslint.config.mjs
9+
.eslintrc.json
10+
11+
# Development files
12+
.vscode/
13+
.github/
14+
node_modules/
15+
.DS_Store
16+
17+
# Lock files
18+
pnpm-lock.yaml
19+
20+
# Test files
21+
test/
22+
tests/
23+
*.test.js
24+
*.spec.js
25+
26+
# Documentation
27+
README.md
28+
29+
# Schema (if not needed for runtime)
30+
schema.json

README.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,3 @@
1-
# api-map
2-
API MCP
1+
# API Docs MCP
2+
3+
MCP server for API and GraphQL documentation and search.

package.json

Lines changed: 57 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,57 @@
1+
{
2+
"name": "api-docs-mcp",
3+
"version": "1.0.0",
4+
"description": "MCP server for API and GraphQL documentation and search",
5+
"type": "module",
6+
"main": "build/index.js",
7+
"types": "build/index.d.ts",
8+
"bin": {
9+
"api-docs-mcp": "build/index.js"
10+
},
11+
"files": [
12+
"build",
13+
"LICENSE",
14+
"README.md"
15+
],
16+
"engines": {
17+
"node": ">=18.0.0"
18+
},
19+
"publishConfig": {
20+
"access": "public"
21+
},
22+
"scripts": {
23+
"build": "tsc && tsc-alias",
24+
"start": "node build/index.js",
25+
"dev": "tsc --watch"
26+
},
27+
"keywords": [
28+
"mcp",
29+
"graphql",
30+
"api-docs"
31+
],
32+
"author": "",
33+
"license": "Apache-2.0",
34+
"dependencies": {
35+
"@graphql-tools/graphql-file-loader": "8.1.2",
36+
"@graphql-tools/load": "8.1.2",
37+
"@graphql-tools/url-loader": "9.0.0",
38+
"@graphql-tools/utils": "10.9.1",
39+
"@modelcontextprotocol/sdk": "1.20.1",
40+
"graphql": "16.11.0",
41+
"module-alias": "^2.2.3",
42+
"zod": "^3.23.8"
43+
},
44+
"devDependencies": {
45+
"@modelcontextprotocol/inspector": "0.17.2",
46+
"@types/node": "^24.9.1",
47+
"@typescript-eslint/eslint-plugin": "^8.46.2",
48+
"@typescript-eslint/parser": "^8.46.2",
49+
"concurrently": "9.2.1",
50+
"cross-env": "10.1.0",
51+
"eslint": "^9.38.0",
52+
"eslint-config-prettier": "^10.1.8",
53+
"eslint-plugin-prettier": "^5.5.4",
54+
"tsc-alias": "^1.8.16",
55+
"typescript": "5.9.3"
56+
}
57+
}

0 commit comments

Comments
 (0)