@altura_ma/onemcp 0.3.0 → 0.5.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 (144) hide show
  1. package/LICENSE +1 -1
  2. package/README.md +100 -77
  3. package/dist/api/keys.d.ts +30 -0
  4. package/dist/api/keys.d.ts.map +1 -0
  5. package/dist/api/keys.js +98 -0
  6. package/dist/api/keys.js.map +1 -0
  7. package/dist/api/openapi.d.ts +4 -0
  8. package/dist/api/openapi.d.ts.map +1 -0
  9. package/dist/api/openapi.js +108 -0
  10. package/dist/api/openapi.js.map +1 -0
  11. package/dist/api/rest.d.ts +4 -0
  12. package/dist/api/rest.d.ts.map +1 -0
  13. package/dist/api/rest.js +143 -0
  14. package/dist/api/rest.js.map +1 -0
  15. package/dist/api/status.d.ts +46 -0
  16. package/dist/api/status.d.ts.map +1 -0
  17. package/dist/api/status.js +44 -0
  18. package/dist/api/status.js.map +1 -0
  19. package/dist/cache/index.d.ts.map +1 -1
  20. package/dist/cache/index.js +2 -1
  21. package/dist/cache/index.js.map +1 -1
  22. package/dist/connectors/base.d.ts +2 -0
  23. package/dist/connectors/base.d.ts.map +1 -1
  24. package/dist/connectors/base.js +19 -2
  25. package/dist/connectors/base.js.map +1 -1
  26. package/dist/connectors/bodacc.d.ts +3 -2
  27. package/dist/connectors/bodacc.d.ts.map +1 -1
  28. package/dist/connectors/bodacc.js +17 -4
  29. package/dist/connectors/bodacc.js.map +1 -1
  30. package/dist/connectors/dvf.d.ts +0 -4
  31. package/dist/connectors/dvf.d.ts.map +1 -1
  32. package/dist/connectors/dvf.js +13 -10
  33. package/dist/connectors/dvf.js.map +1 -1
  34. package/dist/connectors/georisques.d.ts.map +1 -1
  35. package/dist/connectors/georisques.js +16 -27
  36. package/dist/connectors/georisques.js.map +1 -1
  37. package/dist/connectors/index.d.ts +3 -1
  38. package/dist/connectors/index.d.ts.map +1 -1
  39. package/dist/connectors/index.js +3 -1
  40. package/dist/connectors/index.js.map +1 -1
  41. package/dist/connectors/inpi-rne.d.ts.map +1 -1
  42. package/dist/connectors/inpi-rne.js +15 -8
  43. package/dist/connectors/inpi-rne.js.map +1 -1
  44. package/dist/connectors/insee-sirene.d.ts.map +1 -1
  45. package/dist/connectors/insee-sirene.js +7 -2
  46. package/dist/connectors/insee-sirene.js.map +1 -1
  47. package/dist/connectors/legifrance.d.ts +69 -0
  48. package/dist/connectors/legifrance.d.ts.map +1 -0
  49. package/dist/connectors/legifrance.js +137 -0
  50. package/dist/connectors/legifrance.js.map +1 -0
  51. package/dist/connectors/recherche-entreprises.d.ts +1 -0
  52. package/dist/connectors/recherche-entreprises.d.ts.map +1 -1
  53. package/dist/connectors/recherche-entreprises.js +4 -1
  54. package/dist/connectors/recherche-entreprises.js.map +1 -1
  55. package/dist/http.js +65 -5
  56. package/dist/http.js.map +1 -1
  57. package/dist/index.js +8 -2
  58. package/dist/index.js.map +1 -1
  59. package/dist/schemas/canonical.d.ts +28 -0
  60. package/dist/schemas/canonical.d.ts.map +1 -1
  61. package/dist/schemas/canonical.js +1 -0
  62. package/dist/schemas/canonical.js.map +1 -1
  63. package/dist/server.d.ts +2 -2
  64. package/dist/server.d.ts.map +1 -1
  65. package/dist/server.js +21 -68
  66. package/dist/server.js.map +1 -1
  67. package/dist/tools/admin-geo.d.ts.map +1 -1
  68. package/dist/tools/admin-geo.js +40 -0
  69. package/dist/tools/admin-geo.js.map +1 -1
  70. package/dist/tools/area-intel.d.ts +3 -0
  71. package/dist/tools/area-intel.d.ts.map +1 -0
  72. package/dist/tools/area-intel.js +109 -0
  73. package/dist/tools/area-intel.js.map +1 -0
  74. package/dist/tools/company-layer2.d.ts.map +1 -1
  75. package/dist/tools/company-layer2.js +7 -0
  76. package/dist/tools/company-layer2.js.map +1 -1
  77. package/dist/tools/company.d.ts.map +1 -1
  78. package/dist/tools/company.js +79 -3
  79. package/dist/tools/company.js.map +1 -1
  80. package/dist/tools/compound.d.ts +3 -0
  81. package/dist/tools/compound.d.ts.map +1 -0
  82. package/dist/tools/compound.js +108 -0
  83. package/dist/tools/compound.js.map +1 -0
  84. package/dist/tools/geo.d.ts.map +1 -1
  85. package/dist/tools/geo.js +70 -3
  86. package/dist/tools/geo.js.map +1 -1
  87. package/dist/tools/guide.d.ts +3 -0
  88. package/dist/tools/guide.d.ts.map +1 -0
  89. package/dist/tools/guide.js +228 -0
  90. package/dist/tools/guide.js.map +1 -0
  91. package/dist/tools/identity.d.ts.map +1 -1
  92. package/dist/tools/identity.js +29 -1
  93. package/dist/tools/identity.js.map +1 -1
  94. package/dist/tools/index.d.ts +5 -1
  95. package/dist/tools/index.d.ts.map +1 -1
  96. package/dist/tools/index.js +9 -1
  97. package/dist/tools/index.js.map +1 -1
  98. package/dist/tools/legal-texts.d.ts +3 -0
  99. package/dist/tools/legal-texts.d.ts.map +1 -0
  100. package/dist/tools/legal-texts.js +95 -0
  101. package/dist/tools/legal-texts.js.map +1 -0
  102. package/dist/tools/legal.d.ts.map +1 -1
  103. package/dist/tools/legal.js +10 -2
  104. package/dist/tools/legal.js.map +1 -1
  105. package/dist/tools/public-contracts.d.ts.map +1 -1
  106. package/dist/tools/public-contracts.js +9 -2
  107. package/dist/tools/public-contracts.js.map +1 -1
  108. package/dist/tools/realestate.d.ts.map +1 -1
  109. package/dist/tools/realestate.js +64 -6
  110. package/dist/tools/realestate.js.map +1 -1
  111. package/dist/tools/sources.d.ts.map +1 -1
  112. package/dist/tools/sources.js +60 -2
  113. package/dist/tools/sources.js.map +1 -1
  114. package/dist/utils/byok.d.ts +49 -0
  115. package/dist/utils/byok.d.ts.map +1 -0
  116. package/dist/utils/byok.js +28 -0
  117. package/dist/utils/byok.js.map +1 -0
  118. package/dist/utils/circuit-breaker.d.ts +19 -0
  119. package/dist/utils/circuit-breaker.d.ts.map +1 -0
  120. package/dist/utils/circuit-breaker.js +43 -0
  121. package/dist/utils/circuit-breaker.js.map +1 -0
  122. package/dist/utils/env.d.ts +2 -1
  123. package/dist/utils/env.d.ts.map +1 -1
  124. package/dist/utils/env.js +14 -7
  125. package/dist/utils/env.js.map +1 -1
  126. package/dist/utils/http.d.ts.map +1 -1
  127. package/dist/utils/http.js +7 -2
  128. package/dist/utils/http.js.map +1 -1
  129. package/dist/utils/oauth.d.ts.map +1 -1
  130. package/dist/utils/oauth.js +8 -3
  131. package/dist/utils/oauth.js.map +1 -1
  132. package/dist/utils/siren.d.ts +4 -0
  133. package/dist/utils/siren.d.ts.map +1 -0
  134. package/dist/utils/siren.js +36 -0
  135. package/dist/utils/siren.js.map +1 -0
  136. package/dist/utils/zod-to-json.d.ts +3 -0
  137. package/dist/utils/zod-to-json.d.ts.map +1 -0
  138. package/dist/utils/zod-to-json.js +46 -0
  139. package/dist/utils/zod-to-json.js.map +1 -0
  140. package/package.json +7 -4
  141. package/dist/worker.d.ts +0 -16
  142. package/dist/worker.d.ts.map +0 -1
  143. package/dist/worker.js +0 -185
  144. package/dist/worker.js.map +0 -1
package/LICENSE CHANGED
@@ -1,6 +1,6 @@
1
1
  MIT License
2
2
 
3
- Copyright (c) 2026 money-maker
3
+ Copyright (c) 2026 OneMCP
4
4
 
5
5
  Permission is hereby granted, free of charge, to any person obtaining a copy
6
6
  of this software and associated documentation files (the "Software"), to deal
package/README.md CHANGED
@@ -2,11 +2,13 @@
2
2
 
3
3
  > Serveur MCP unifié pour les données business publiques France & Europe.
4
4
  > Un seul connecteur, des dizaines de sources officielles, agrégation gratuite (sources sans auth) ou avec vos clés.
5
- > 🌐 [onemcp.fr](https://onemcp.fr)
5
+ > [onemcp.fr](https://onemcp.fr)
6
6
 
7
7
  [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](LICENSE)
8
8
  [![Node](https://img.shields.io/badge/node-%3E%3D20-brightgreen)]()
9
9
 
10
+ **v0.5.0 — 41 tools, 16 sources**
11
+
10
12
  ## Pourquoi
11
13
 
12
14
  Les agents IA ont besoin de données business françaises fiables. Aujourd'hui :
@@ -15,57 +17,22 @@ Les agents IA ont besoin de données business françaises fiables. Aujourd'hui :
15
17
 
16
18
  **Ce serveur agrège tout ça en un seul connecteur MCP avec un schéma canonique unique.**
17
19
 
18
- ## Sources couvertes (v0.1 — Layer 1, sans auth)
19
-
20
- | Source | Type | Licence |
21
- |---|---|---|
22
- | **Recherche d'entreprises (DINUM)** | SIREN/SIRET, dirigeants, finances, BE | Licence Ouverte 2.0 |
23
- | **BODACC** | Annonces légales, procédures collectives | Licence Ouverte 2.0 |
24
- | **BAN** | Géocodage adresses françaises | Licence Ouverte 2.0 / ODbL |
25
- | **Géorisques** | Risques naturels/technologiques par adresse | Licence Ouverte 2.0 |
26
- | **DVF** | Transactions immobilières (5 ans) | Licence Ouverte 2.0 |
27
- | **VIES (UE)** | Validation TVA intracommunautaire | Données publiques EU |
28
- | **GLEIF** | Identifiants LEI mondiaux | CC0 1.0 |
29
-
30
- ## Tools MCP exposés
31
-
32
- Groupés par domaine (13 tools) :
33
-
34
- **Entreprise**
35
- - `company_search` — recherche full-text (nom, dirigeant, SIREN, NAF, dépt)
36
- - `company_get` — fiche complète par SIREN/SIRET
37
- - `company_enrich` — fiche + annonces légales + risques + LEI
20
+ ## Quick Start
38
21
 
39
- **Légal**
40
- - `legal_announcements_search` — annonces BODACC par SIREN ou nom
41
- - `legal_procedures_check` — procédures collectives en cours
22
+ ### 1. npx (le plus simple)
42
23
 
43
- **Géo**
44
- - `address_search` — géocodage texte → coordonnées
45
- - `address_reverse` — coordonnées → adresse
46
- - `address_risks` — risques majeurs à une adresse
47
-
48
- **Immobilier**
49
- - `realestate_transactions` — transactions DVF par commune ou code postal
50
-
51
- **Identité**
52
- - `vat_validate` — validation TVA UE (VIES)
53
- - `lei_lookup` — fiche LEI par code
54
- - `lei_search` — recherche LEI par nom
55
-
56
- **Méta**
57
- - `sources_list` — toutes les sources et leurs licences
58
-
59
- ## Installation
24
+ ```bash
25
+ npx -y @altura_ma/onemcp
26
+ ```
60
27
 
61
- ### Claude Desktop / Claude Code (stdio local)
28
+ ### 2. Claude Desktop / Claude Code
62
29
 
63
30
  ```json
64
31
  {
65
32
  "mcpServers": {
66
33
  "business-fr": {
67
34
  "command": "npx",
68
- "args": ["-y", "@altura_ma/mcp-business-fr"]
35
+ "args": ["-y", "@altura_ma/onemcp"]
69
36
  }
70
37
  }
71
38
  }
@@ -74,44 +41,89 @@ Groupés par domaine (13 tools) :
74
41
  Fichiers de config :
75
42
  - macOS : `~/Library/Application Support/Claude/claude_desktop_config.json`
76
43
  - Windows : `%APPDATA%\Claude\claude_desktop_config.json`
77
- - Claude Code : `claude mcp add business-fr -- npx -y @altura_ma/mcp-business-fr`
78
-
79
- ### Cursor
44
+ - Claude Code : `claude mcp add business-fr -- npx -y @altura_ma/onemcp`
80
45
 
81
- `.cursor/mcp.json` :
46
+ ### 3. API hébergée (Streamable HTTP)
82
47
 
83
48
  ```json
84
49
  {
85
50
  "mcpServers": {
86
51
  "business-fr": {
87
- "command": "npx",
88
- "args": ["-y", "@altura_ma/mcp-business-fr"]
52
+ "url": "https://api.onemcp.fr/mcp",
53
+ "headers": {
54
+ "Authorization": "Bearer mk_live_xxx"
55
+ }
89
56
  }
90
57
  }
91
58
  }
92
59
  ```
93
60
 
94
- ### Mode hébergé (Streamable HTTP)
61
+ ## Endpoints publics
95
62
 
96
- ```json
97
- {
98
- "mcpServers": {
99
- "business-fr": {
100
- "url": "https://mcp.business-fr.dev/mcp",
101
- "headers": {
102
- "Authorization": "Bearer mk_xxx"
103
- }
104
- }
105
- }
106
- }
63
+ - `https://api.onemcp.fr/openapi.json` — spec REST complète
64
+ - `https://api.onemcp.fr/openapi-gpt.json` — spec compacte Custom GPT
65
+ - `https://api.onemcp.fr/status.json` — statut machine-readable
66
+ - `https://api.onemcp.fr/status/checks` — checks détaillés
67
+ - `https://api.onemcp.fr/api/user/keys` — gestion des clés du tenant (auth clé)
68
+ - `https://api.onemcp.fr/api/keys` — admin keys
69
+
70
+ ## Gestion des clés API
71
+
72
+ - Dashboard utilisateur : `https://onemcp.fr/dashboard`
73
+ - Console admin : `https://onemcp.fr/keys`
74
+ - Guide repo : `docs/api-keys.md`
75
+
76
+ Vous pouvez maintenant :
77
+ - créer des clés nommées
78
+ - régénérer, désactiver, réactiver, supprimer une clé
79
+ - définir un quota mensuel par clé, en plus du quota global du tenant
80
+
81
+ ## Tools par groupe
82
+
83
+ | Groupe | Tools | Description |
84
+ |---|---|---|
85
+ | **Méta** | `mcp_guide`, `sources_list` | Routing + liste des sources |
86
+ | **Entreprise** | `company_search`, `company_get`, `company_enrich`, `company_batch`, `company_deep_profile` | Recherche, fiche, enrichissement, batch, profil complet |
87
+ | **Layer 2 (BYOK)** | `company_sirene`, `company_rne`, `company_uk` | INSEE, INPI RNE, UK Companies House |
88
+ | **Légal** | `legal_announcements_search`, `legal_procedures_check` | BODACC, procédures collectives |
89
+ | **Textes légaux (BYOK)** | `law_search`, `jurisprudence_search`, `code_table_of_contents` | Légifrance, jurisprudence |
90
+ | **Géo** | `address_search`, `address_reverse`, `address_risks` | BAN, Géorisques |
91
+ | **Géo admin** | `admin_commune_search`, `admin_commune_get`, `admin_departement_list`, `admin_departement_communes`, `admin_region_list`, `admin_epci_list`, `admin_epci_communes` | Communes, départements, régions, EPCIs |
92
+ | **Immobilier** | `realestate_transactions` | DVF — transactions par commune/code postal |
93
+ | **Identité** | `vat_validate`, `lei_lookup`, `lei_search` | VIES, GLEIF |
94
+ | **Brevets** | `patents_search`, `patent_get` | EPO Open Patent Services |
95
+ | **Emploi (BYOK)** | `jobs_search`, `rome_search` | France Travail |
96
+ | **Marchés publics** | `public_contracts_search` | DECP — données essentielles contrats publics |
97
+ | **Intelligence zone** | `area_business_intelligence` | Analyse business d'une zone géographique |
98
+
99
+ **Total : 41 tools**
100
+
101
+ ## BYOK (Bring Your Own Keys)
102
+
103
+ Certains connecteurs nécessitent des credentials. Configurez-les en variables d'environnement :
104
+
105
+ | Connecteur | Variables | Docs |
106
+ |---|---|---|
107
+ | **INSEE Sirene** | `INSEE_CLIENT_ID`, `INSEE_CLIENT_SECRET` | [api.insee.fr](https://api.insee.fr) |
108
+ | **INPI RNE** | `INPI_USERNAME`, `INPI_PASSWORD` | [data.inpi.fr](https://data.inpi.fr) |
109
+ | **UK Companies House** | `COMPANIES_HOUSE_API_KEY` | [developer.company-information.service.gov.uk](https://developer.company-information.service.gov.uk) |
110
+ | **Légifrance (PISTE)** | `PISTE_CLIENT_ID`, `PISTE_CLIENT_SECRET` | [piste.gouv.fr](https://piste.gouv.fr) |
111
+ | **France Travail** | `FRANCE_TRAVAIL_CLIENT_ID`, `FRANCE_TRAVAIL_CLIENT_SECRET` | [francetravail.io](https://francetravail.io/data/api) |
112
+ | **EPO Patents** | `EPO_OPS_KEY`, `EPO_OPS_SECRET` | [ops.epo.org](https://ops.epo.org) |
113
+
114
+ Vérifiez votre configuration :
115
+
116
+ ```bash
117
+ npm run check-env
107
118
  ```
108
119
 
109
120
  ## Développement
110
121
 
111
122
  ```bash
112
- git clone <repo>
113
- cd money-maker
123
+ git clone <repo-url>
124
+ cd onemcp
114
125
  npm install
126
+ npm run check-env # vérifier les credentials optionnels
115
127
  npm run build
116
128
  npm test
117
129
 
@@ -123,6 +135,9 @@ PORT=3000 npm run start:http
123
135
 
124
136
  # Inspector officiel pour tester les tools
125
137
  npm run inspector
138
+
139
+ # Smoke test tous les connecteurs
140
+ ./scripts/smoke-test.sh
126
141
  ```
127
142
 
128
143
  ## Schéma canonique
@@ -149,27 +164,35 @@ Toutes les réponses retournent un format normalisé avec champ `provenance` :
149
164
  }
150
165
  ```
151
166
 
152
- ## Architecture
153
-
154
- Voir [`docs/architecture.md`](docs/architecture.md).
155
-
156
- ## Monétisation
157
-
158
- Voir [`docs/monetization.md`](docs/monetization.md).
167
+ ## Sources couvertes (16 sources)
168
+
169
+ | Source | Type | Auth | Licence |
170
+ |---|---|---|---|
171
+ | **Recherche d'entreprises (DINUM)** | SIREN/SIRET, dirigeants, finances | Non | Licence Ouverte 2.0 |
172
+ | **BODACC** | Annonces légales, procédures collectives | Non | Licence Ouverte 2.0 |
173
+ | **BAN** | Géocodage adresses françaises | Non | LO 2.0 / ODbL |
174
+ | **Géorisques** | Risques naturels/technologiques | Non | Licence Ouverte 2.0 |
175
+ | **DVF** | Transactions immobilières (5 ans) | Non | Licence Ouverte 2.0 |
176
+ | **VIES (UE)** | Validation TVA intracommunautaire | Non | Données publiques EU |
177
+ | **GLEIF** | Identifiants LEI mondiaux | Non | CC0 1.0 |
178
+ | **Geo-France (IGN)** | Communes, départements, régions | Non | Licence Ouverte 2.0 |
179
+ | **DECP** | Marchés publics, contrats | Non | Licence Ouverte 2.0 |
180
+ | **EPO OPS** | Brevets européens | BYOK | EPO OPS Terms |
181
+ | **INSEE Sirene** | Registre officiel entreprises | BYOK | Licence Ouverte 2.0 |
182
+ | **INPI RNE** | Registre national entreprises + UBO | BYOK | Licence Ouverte 2.0 |
183
+ | **Légifrance (PISTE)** | Codes, lois, jurisprudence | BYOK | LO 2.0 |
184
+ | **France Travail** | Offres d'emploi, codes ROME | BYOK | France Travail CGU |
185
+ | **UK Companies House** | Entreprises britanniques | BYOK | OGL v3 |
186
+ | **GLEIF LEI** | Identifiants LEI + relations groupe | Non | CC0 1.0 |
159
187
 
160
188
  ## Conformité
161
189
 
162
190
  - **RGPD** : ce serveur n'expose que des données publiques. Les données personnelles (dirigeants) sont systématiquement minimisées (date de naissance tronquée à `YYYY-MM`). Documenter votre base légale (intérêt légitime) et l'origine des données auprès des personnes concernées (RGPD Art. 14).
163
191
  - **Licences sources** : préservées dans chaque réponse (champ `provenance.license`). Mention obligatoire dans toute réutilisation.
164
192
 
165
- ## Roadmap
193
+ ## Architecture
166
194
 
167
- - [ ] **Layer 2** : connecteurs avec auth (INSEE Sirene, INPI RNE, PISTE/Légifrance, France Travail, Companies House UK, EPO Patents)
168
- - [ ] **Layer 3** : registres EU (KBO Belgique, Handelsregister DE, KVK NL, BORME ES)
169
- - [ ] **Mode hébergé multi-tenant** sur Cloudflare Workers + Durable Objects
170
- - [ ] **Auth & billing** : API keys, Stripe metering
171
- - [ ] **OAuth 2.1** pour clients enterprise
172
- - [ ] **Distribution** : Smithery, mcp.so, PulseMCP, npm
195
+ Voir [`docs/architecture.md`](docs/architecture.md).
173
196
 
174
197
  ## Licence
175
198
 
@@ -0,0 +1,30 @@
1
+ export interface ApiKey {
2
+ key: string;
3
+ label: string;
4
+ created_at: string;
5
+ last_used?: string;
6
+ }
7
+ export interface ApiKeyMasked {
8
+ key_preview: string;
9
+ label: string;
10
+ created_at: string;
11
+ last_used?: string;
12
+ }
13
+ declare class KeyStore {
14
+ private keys;
15
+ private flushTimer;
16
+ constructor();
17
+ private load;
18
+ private persist;
19
+ private scheduledFlush;
20
+ isValid(key: string): boolean;
21
+ isAdmin(key: string): boolean;
22
+ create(label: string): ApiKey;
23
+ list(): ApiKey[];
24
+ listMasked(): ApiKeyMasked[];
25
+ revoke(key: string): boolean;
26
+ touch(key: string): void;
27
+ }
28
+ export declare const keyStore: KeyStore;
29
+ export {};
30
+ //# sourceMappingURL=keys.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"keys.d.ts","sourceRoot":"","sources":["../../src/api/keys.ts"],"names":[],"mappings":"AAWA,MAAM,WAAW,MAAM;IACrB,GAAG,EAAE,MAAM,CAAC;IACZ,KAAK,EAAE,MAAM,CAAC;IACd,UAAU,EAAE,MAAM,CAAC;IACnB,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED,MAAM,WAAW,YAAY;IAC3B,WAAW,EAAE,MAAM,CAAC;IACpB,KAAK,EAAE,MAAM,CAAC;IACd,UAAU,EAAE,MAAM,CAAC;IACnB,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAID,cAAM,QAAQ;IACZ,OAAO,CAAC,IAAI,CAAkC;IAC9C,OAAO,CAAC,UAAU,CAA8C;;IAWhE,OAAO,CAAC,IAAI;IAUZ,OAAO,CAAC,OAAO;IAYf,OAAO,CAAC,cAAc;IAQtB,OAAO,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO;IAI7B,OAAO,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO;IAK7B,MAAM,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM;IAQ7B,IAAI,IAAI,MAAM,EAAE;IAIhB,UAAU,IAAI,YAAY,EAAE;IAS5B,MAAM,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO;IAQ5B,KAAK,CAAC,GAAG,EAAE,MAAM,GAAG,IAAI;CAOzB;AAED,eAAO,MAAM,QAAQ,UAAiB,CAAC"}
@@ -0,0 +1,98 @@
1
+ import { readFileSync, writeFileSync, mkdirSync, renameSync, existsSync } from "node:fs";
2
+ import { timingSafeEqual } from "node:crypto";
3
+ import { dirname } from "node:path";
4
+ function safeEqual(a, b) {
5
+ const bufA = Buffer.from(a);
6
+ const bufB = Buffer.from(b);
7
+ if (bufA.length !== bufB.length)
8
+ return false;
9
+ return timingSafeEqual(bufA, bufB);
10
+ }
11
+ const KEYS_FILE = process.env.ONEMCP_KEYS_FILE ?? "./data/keys.json";
12
+ class KeyStore {
13
+ keys = new Map();
14
+ flushTimer = null;
15
+ constructor() {
16
+ this.load();
17
+ const adminKey = process.env.ONEMCP_API_KEY;
18
+ if (adminKey && !this.keys.has(adminKey)) {
19
+ this.keys.set(adminKey, { key: adminKey, label: "admin", created_at: new Date().toISOString() });
20
+ this.persist();
21
+ }
22
+ }
23
+ load() {
24
+ if (!existsSync(KEYS_FILE))
25
+ return;
26
+ try {
27
+ const entries = JSON.parse(readFileSync(KEYS_FILE, "utf8"));
28
+ for (const entry of entries)
29
+ this.keys.set(entry.key, entry);
30
+ }
31
+ catch (err) {
32
+ console.error("[onemcp] keys.json read error:", err);
33
+ }
34
+ }
35
+ persist() {
36
+ try {
37
+ mkdirSync(dirname(KEYS_FILE), { recursive: true });
38
+ const tmp = KEYS_FILE + ".tmp";
39
+ writeFileSync(tmp, JSON.stringify([...this.keys.values()], null, 2), "utf8");
40
+ renameSync(tmp, KEYS_FILE); // atomic on POSIX
41
+ }
42
+ catch (err) {
43
+ console.error("[onemcp] keys.json write error:", err);
44
+ }
45
+ }
46
+ // Debounced flush: last_used updated in memory immediately, written to disk at most every 30s
47
+ scheduledFlush() {
48
+ if (this.flushTimer)
49
+ return;
50
+ this.flushTimer = setTimeout(() => {
51
+ this.flushTimer = null;
52
+ this.persist();
53
+ }, 30_000);
54
+ }
55
+ isValid(key) {
56
+ return this.keys.has(key);
57
+ }
58
+ isAdmin(key) {
59
+ const adminKey = process.env.ONEMCP_API_KEY;
60
+ return !!adminKey && safeEqual(key, adminKey);
61
+ }
62
+ create(label) {
63
+ const key = `mk_live_${crypto.randomUUID().replace(/-/g, "")}`;
64
+ const entry = { key, label, created_at: new Date().toISOString() };
65
+ this.keys.set(key, entry);
66
+ this.persist();
67
+ return entry;
68
+ }
69
+ list() {
70
+ return [...this.keys.values()];
71
+ }
72
+ listMasked() {
73
+ return [...this.keys.values()].map(({ key, label, created_at, last_used }) => ({
74
+ key_preview: key.length > 16 ? `${key.slice(0, 12)}...${key.slice(-4)}` : "***",
75
+ label,
76
+ created_at,
77
+ ...(last_used ? { last_used } : {}),
78
+ }));
79
+ }
80
+ revoke(key) {
81
+ const adminKey = process.env.ONEMCP_API_KEY;
82
+ if (adminKey && safeEqual(key, adminKey))
83
+ return false;
84
+ const ok = this.keys.delete(key);
85
+ if (ok)
86
+ this.persist();
87
+ return ok;
88
+ }
89
+ touch(key) {
90
+ const entry = this.keys.get(key);
91
+ if (entry) {
92
+ entry.last_used = new Date().toISOString();
93
+ this.scheduledFlush();
94
+ }
95
+ }
96
+ }
97
+ export const keyStore = new KeyStore();
98
+ //# sourceMappingURL=keys.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"keys.js","sourceRoot":"","sources":["../../src/api/keys.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,aAAa,EAAE,SAAS,EAAE,UAAU,EAAE,UAAU,EAAE,MAAM,SAAS,CAAC;AACzF,OAAO,EAAE,eAAe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,IAAI,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC;QACjC,IAAI,EAAE;YAAE,IAAI,CAAC,OAAO,EAAE,CAAC;QACvB,OAAO,EAAE,CAAC;IACZ,CAAC;IAED,KAAK,CAAC,GAAW;QACf,MAAM,KAAK,GAAG,IAAI,CAAC,IAAI,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC;QACjC,IAAI,KAAK,EAAE,CAAC;YACV,KAAK,CAAC,SAAS,GAAG,IAAI,IAAI,EAAE,CAAC,WAAW,EAAE,CAAC;YAC3C,IAAI,CAAC,cAAc,EAAE,CAAC;QACxB,CAAC;IACH,CAAC;CACF;AAED,MAAM,CAAC,MAAM,QAAQ,GAAG,IAAI,QAAQ,EAAE,CAAC"}
@@ -0,0 +1,4 @@
1
+ import type { AnyTool } from "../tools/types.js";
2
+ export declare function generateOpenApiSpec(tools: AnyTool[], serverUrl: string): Record<string, unknown>;
3
+ export declare function generateCompactOpenApiSpec(tools: AnyTool[], serverUrl: string): Record<string, unknown>;
4
+ //# sourceMappingURL=openapi.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"openapi.d.ts","sourceRoot":"","sources":["../../src/api/openapi.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,mBAAmB,CAAC;AAGjD,wBAAgB,mBAAmB,CAAC,KAAK,EAAE,OAAO,EAAE,EAAE,SAAS,EAAE,MAAM,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAyDhG;AAED,wBAAgB,0BAA0B,CAAC,KAAK,EAAE,OAAO,EAAE,EAAE,SAAS,EAAE,MAAM,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAoDvG"}
@@ -0,0 +1,108 @@
1
+ import { zodToJsonSchema } from "../utils/zod-to-json.js";
2
+ export function generateOpenApiSpec(tools, serverUrl) {
3
+ const paths = {};
4
+ for (const tool of tools) {
5
+ const schema = zodToJsonSchema(tool.inputSchema);
6
+ paths[`/api/${tool.name}`] = {
7
+ post: {
8
+ operationId: tool.name,
9
+ summary: tool.description.slice(0, 100),
10
+ description: tool.description,
11
+ security: [{ bearerAuth: [] }],
12
+ requestBody: {
13
+ required: true,
14
+ content: {
15
+ "application/json": {
16
+ schema: { ...schema, additionalProperties: false },
17
+ },
18
+ },
19
+ },
20
+ responses: {
21
+ "200": {
22
+ description: "Résultat de l'outil",
23
+ content: {
24
+ "application/json": {
25
+ schema: { type: "object", additionalProperties: true, properties: { result: { type: "object", additionalProperties: true }, error: { type: "string" } } },
26
+ },
27
+ },
28
+ },
29
+ "400": { description: "Paramètres invalides" },
30
+ "401": { description: "Non autorisé — Bearer token manquant ou invalide" },
31
+ "404": { description: "Outil inconnu" },
32
+ "500": { description: "Erreur interne" },
33
+ },
34
+ },
35
+ };
36
+ }
37
+ return {
38
+ openapi: "3.1.0",
39
+ info: {
40
+ title: "OneMCP REST API",
41
+ description: "API REST pour accéder aux données business publiques France & Europe (SIREN, DVF, marchés publics, etc.).\n\n" +
42
+ "Authentification : Bearer token via `Authorization: Bearer <ONEMCP_API_KEY>`.",
43
+ version: "1.0.0",
44
+ },
45
+ servers: [{ url: serverUrl }],
46
+ components: {
47
+ securitySchemes: {
48
+ bearerAuth: {
49
+ type: "http",
50
+ scheme: "bearer",
51
+ },
52
+ },
53
+ },
54
+ paths,
55
+ };
56
+ }
57
+ export function generateCompactOpenApiSpec(tools, serverUrl) {
58
+ const toolNames = tools.map((tool) => tool.name).sort();
59
+ return {
60
+ openapi: "3.1.0",
61
+ info: {
62
+ title: "OneMCP GPT Action API",
63
+ description: "Spec compacte pour Custom GPT. Une seule action `call_onemcp_tool` qui appelle POST /api/call.\n\n" +
64
+ "Commencer par tool=sources_list pour tester connexion et sources BYOK.",
65
+ version: "1.0.0",
66
+ },
67
+ servers: [{ url: serverUrl }],
68
+ components: {
69
+ securitySchemes: {
70
+ bearerAuth: { type: "http", scheme: "bearer" },
71
+ },
72
+ schemas: {
73
+ ToolName: { type: "string", enum: toolNames },
74
+ ApiCallRequest: {
75
+ type: "object",
76
+ required: ["tool"],
77
+ additionalProperties: false,
78
+ properties: {
79
+ tool: { "$ref": "#/components/schemas/ToolName" },
80
+ params: { type: "object", additionalProperties: true, default: {} },
81
+ },
82
+ },
83
+ },
84
+ },
85
+ paths: {
86
+ "/api/call": {
87
+ post: {
88
+ operationId: "call_onemcp_tool",
89
+ summary: "Call any OneMCP tool",
90
+ description: "Use tool=sources_list first to verify connectivity and available BYOK sources.",
91
+ "x-openai-isConsequential": false,
92
+ security: [{ bearerAuth: [] }],
93
+ requestBody: {
94
+ required: true,
95
+ content: { "application/json": { schema: { "$ref": "#/components/schemas/ApiCallRequest" } } },
96
+ },
97
+ responses: {
98
+ "200": { description: "Tool result", content: { "application/json": { schema: { type: "object", additionalProperties: true, properties: { result: { type: "object", additionalProperties: true }, error: { type: "string" } } } } } },
99
+ "400": { description: "Invalid tool or params" },
100
+ "401": { description: "Missing or invalid Bearer API key" },
101
+ "429": { description: "Quota or burst rate limit exceeded" },
102
+ },
103
+ },
104
+ },
105
+ },
106
+ };
107
+ }
108
+ //# sourceMappingURL=openapi.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"openapi.js","sourceRoot":"","sources":["../../src/api/openapi.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,eAAe,EAAE,MAAM,yBAAyB,CAAC;AAE1D,MAAM,UAAU,mBAAmB,CAAC,KAAgB,EAAE,SAAiB;IACrE,MAAM,KAAK,GAA4B,EAAE,CAAC;IAE1C,KAAK,MAAM,IAAI,IAAI,KAAK,EAAE,CAAC;QACzB,MAAM,MAAM,GAAG,eAAe,CAAC,IAAI,CAAC,WAAW,CAAC,CAAC;QACjD,KAAK,CAAC,QAAQ,IAAI,CAAC,IAAI,EAAE,CAAC,GAAG;YAC3B,IAAI,EAAE;gBACJ,WAAW,EAAE,IAAI,CAAC,IAAI;gBACtB,OAAO,EAAE,IAAI,CAAC,WAAW,CAAC,KAAK,CAAC,CAAC,EA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AE,MAAM,EAAE,EAAE,MAAM,EAAE,qCAAqC,EAAE,EAAE,EAAE;qBAC/F;oBACD,SAAS,EAAE;wBACT,KAAK,EAAE,EAAE,WAAW,EAAE,aAAa,EAAE,OAAO,EAAE,EAAE,kBAAkB,EAAE,EAAE,MAAM,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE,oBAAoB,EAAE,IAAI,EAAE,UAAU,EAAE,EAAE,MAAM,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE,oBAAoB,EAAE,IAAI,EAAE,EAAE,KAAK,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE;wBACrO,KAAK,EAAE,EAAE,WAAW,EAAE,wBAAwB,EAAE;wBAChD,KAAK,EAAE,EAAE,WAAW,EAAE,mCAAmC,EAAE;wBAC3D,KAAK,EAAE,EAAE,WAAW,EAAE,oCAAoC,EAAE;qBAC7D;iBACF;aACF;SACF;KACF,CAAC;AACJ,CAAC"}
@@ -0,0 +1,4 @@
1
+ import type { IncomingMessage, ServerResponse } from "node:http";
2
+ import type { AnyTool } from "../tools/types.js";
3
+ export declare function handleRestRequest(req: IncomingMessage, res: ServerResponse, tools: AnyTool[]): Promise<boolean>;
4
+ //# sourceMappingURL=rest.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"rest.d.ts","sourceRoot":"","sources":["../../src/api/rest.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,cAAc,EAAE,MAAM,WAAW,CAAC;AACjE,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,mBAAmB,CAAC;AAqFjD,wBAAsB,iBAAiB,CACrC,GAAG,EAAE,eAAe,EACpB,GAAG,EAAE,cAAc,EACnB,KAAK,EAAE,OAAO,EAAE,GACf,OAAO,CAAC,OAAO,CAAC,CA0ElB"}