Serveur MCP Cortex
Commit 6 oct. 2026Génère de la documentation API interactive, des SDK typés et des MCP servers à partir de spécifications OpenAPI, AsyncAPI, GraphQL, gRPC et Markdown.
Aussi connu sous cortex-docs/cortex
- Étoiles
- 3 294
- Outils
- —
- Téléchargements, 30 jours
- —
- Dernière version
- —
- Dernier commit
- 6 oct. 2026
- Licence
- MIT
Qu'est-ce que Cortex MCP ?
Cortex est un serveur MCP. Génère de la documentation API interactive, des SDK typés et des MCP servers à partir de spécifications OpenAPI, AsyncAPI, GraphQL, gRPC et Markdown.
Résumé généré à partir du README du projet
À propos du MCP server Cortex
Transformer les spécifications API en outils pour développeurs est ce que Cortex permet aux équipes d'ingénierie de réaliser. En utilisant une configuration de projet unique, les développeurs peuvent générer de la documentation interactive, des SDK typés et des MCP servers à partir de sources telles qu'OpenAPI, AsyncAPI, GraphQL, gRPC et Markdown. Cela permet aux équipes de maintenir une source unique de vérité qui sert à la fois les développeurs humains via des sites HTML statiques et les agents IA via des interfaces de serveur spécialisées.
Les utilisateurs gèrent le workflow via le @cortex-docs/cli en utilisant des commandes telles que cortex init, cortex generate et cortex mcp generate. Le système prend en charge un large éventail de langages de programmation pour la génération de SDK, notamment TypeScript, Python, Go, Java, Rust et C++. Pour l'intégration de l'IA, la commande mcp-serve connecte les clients à la documentation actuelle en utilisant un accès en lecture publique à un dépôt. Le MCP server résultant fournit des outils typés, des spécifications intégrées et la documentation du projet pour donner aux agents un contexte complet de l'environnement de l'API.
Ce que vous pouvez faire avec
- 1Générer des SDK multi-langagesCréez des clients typés pour différents langages de programmation à partir d'un seul fichier de spécification.
- 2Fournir du contexte aux agents IAÉquipez les clients IA d'outils typés et de spécifications API intégrées via un MCP server.
- 3Construire une documentation API interactiveProduisez des sites de documentation HTML statiques incluant des pages de référence API interactives.
- 4Automatiser le déploiement de la documentationPubliez un site de documentation gratuit directement depuis un dépôt GitHub public.
Extrait du README du projet. Chaque cas d'utilisation est vérifié par rapport à une citation du document.
Vérifications automatisées
Exécuté le 13 nov. 2026Rapport complet →Pas encore vérifié. Un serveur nécessite un score de 80, aucune faille sérieuse et suffisamment de données pour que nous puissions effectuer les vérifications. Fonctionnement des vérifications · Ce qu'il faut corriger pour gagner des points
- Dépôt source lié et accessibleRéussi
- Licence open source (OSI)Réussi
- Commit ou version publiée au cours de l'année écouléeRéussi
- Nom du package non proche d'un package populaireNon vérifié
- L'endpoint distant utilise HTTPSNon vérifié
- Les outils destructifs sont étiquetésNon vérifié
- Aucune instruction cachée destinée au modèleRéussi
- Aucun avis critique dans le package ou ses dépendancesNon vérifié
README
Voir sur GitHubCortex combines OpenAPI, AsyncAPI, GraphQL, Protocol Buffer, OpenRPC, and Markdown sources. Developers get interactive documentation, applications get typed SDKs, and AI agents get an MCP server with project context.
If Cortex helps your team, star this repository to support its development.
Try Cortex in 60 seconds
Start a local demo:
mkdir petstore
cd petstore
npm install --global @cortex-docs/cli
cortex init petstore
cortex docs serve
Open http://localhost:3012. Press Ctrl+C to stop the server.
We love open source
Keep your Markdown in Git. Add cortex.config.yml to the default branch of your public GitHub repository, then run:
npx -y @cortex-docs/cli deploy https://github.com/OWNER/REPO
npx -y @cortex-docs/cli mcp-serve https://github.com/OWNER/REPO
The first command publishes a free documentation site at PROJECT.cortexdocs.dev. The second connects AI clients to current documentation through local MCP.
Deploy requires repository write access. MCP works with public read access and checks for changes before each request.
See the open source hosting guide for configuration, custom domains, automatic updates, and limits.
Features
- Generate SDKs for TypeScript, Python, Go, Java, Kotlin, Ruby, PHP, C#, Rust, C++, and C.
- Combine multiple specification files in one generated SDK.
- Generate HTTP, WebSocket, GraphQL, gRPC, and JSON-RPC clients.
- Build static HTML documentation with interactive API reference pages.
- Generate an MCP server with typed tools, embedded specifications, SDK guides, and project documentation for AI agents.
- Add Markdown pages, SDK guides, and all API specifications to the MCP server.
- Customize generated output with sparse Eta template overrides.
- Publish generated packages and MCP servers to language registries and GitHub repositories.
Unlimited specs. Multiple ways to use it.
Generate interactive docs for exploration, typed SDKs for integration, and MCP servers for AI agents.
| Task | Split toolchain | Cortex Docs |
|---|---|---|
| Configuration | Configure SDK, documentation, and MCP generators | Declare all API sources in one project configuration |
| Generation | Coordinate separate commands and output directories | Generate all configured outputs with one command |
| Customization | Maintain templates for each generator | Override only the required Eta templates |
| Publishing | Maintain a release process for each package | Review one publish plan for registries and GitHub |
| Developer interface | Keep guides separate from API references | Combine Markdown, API references, and SDK guides |
| Agent interface | Maintain MCP servers and context separately | Generate MCP servers with specifications, SDK guides, and project documentation |
Requirements
- Node.js 20 or later
- npm 10 or later
Some generated SDKs require the normal compiler or package manager for their target language.
Configuration
cortex init creates cortex.config.yml. Relative paths start from the directory that contains this file.
project: my-api
title: My API Docs
logo: ./assets/logo.svg
theme: system
primaryColor: '#ffffff'
custom_head_html: |-
<meta name="theme-color" content="#ffffff">
<link rel="stylesheet" href="/assets/custom.css">
sources:
- title: REST API
type: openapi-spec
spec: ./specs/openapi.yaml
intro: ./docs/rest.md
languages:
- language: typescript
package_name: '@my-org/my-api'
- language: python
package_name: my-api
- title: Realtime API
type: asyncapi-spec
spec: ./specs/asyncapi.yaml
languages:
- language: typescript
package_name: '@my-org/my-api'
- title: GraphQL API
type: graphql-spec
spec: ./specs/schema.graphql
endpoint: https://api.example.com/graphql
languages:
- language: typescript
package_name: '@my-org/my-api'
output:
base_dir: ./generated
docs:
- section: Get started
sources:
- title: Quickstart
document: ./docs/quickstart.md
mcp:
package_name: '@my-org/my-api-mcp'
primaryColor sets the documentation accent color as a six-digit hex value.
custom_head_html adds trusted HTML to every documentation page. This field supports metadata, stylesheets, and analytics scripts.
Store local head resources in the project assets directory. Cortex serves these files from /assets/*.
Cortex does not sanitize this value. Add only HTML that you trust.
Add ?appearance=dark or ?appearance=light to any documentation URL to select its initial appearance. The parameter takes priority over the project theme and the visitor's stored preference.
For example, /docs/quickstart?appearance=dark opens the quickstart in dark mode. The theme button can change the appearance after the page loads.
Sources that use the same language and package_name are merged into one SDK. Cortex rejects duplicate operation and type names that would make a merge ambiguous.
See the configuration reference for all fields.
Commands
| Command | Result |
|---|---|
cortex init <name> |
Create a project and sample files. |
cortex validate |
Validate the config and every API source. |
cortex generate |
Generate configured SDKs and the MCP server. |
cortex generate --language typescript |
Generate one configured language. |
cortex generate --dry-run |
Show planned output without writing files. |
cortex docs serve |
Start the development server and watch project files. |
cortex docs build --output .cortex/docs |
Build static HTML documentation. |
cortex mcp generate |
Generate only the MCP server. |
cortex publish --dry-run |
Check package publication without uploading. |
cortex publish |
Publish enabled generated packages. |
Protocol support
| Source | Generated SDK | Documentation | Generated MCP server |
|---|---|---|---|
| OpenAPI | REST clients | Interactive API reference | Callable tools and embedded specs |
| AsyncAPI | WebSocket clients | Channel and message reference | Payload-preparation tools and specs |
| GraphQL SDL | Query, mutation, and subscription clients | Operation and type reference | Callable tools and embedded schema |
| Protocol Buffer | Unary and streaming gRPC clients | Service and message reference | Embedded .proto resources |
| OpenRPC | JSON-RPC clients | Method and schema reference | Callable tools and embedded specs |
The generated MCP server does not call gRPC methods. It exposes Protocol Buffer files as MCP resources so an agent can inspect the service contract.
Production documentation
The build command exports the documentation as static HTML, CSS, JavaScript, and data files.
cortex docs build --output .cortex/docs
Deploy the output directory to a static web host. Configure the host to resolve page URLs such as /docs/quickstart to /docs/quickstart.html.
The deployed site needs no Node.js server or access to the original configuration and specifications. Rebuild the site after source changes. Use cortex docs serve for a local preview with file watching.
MCP output
cortex mcp generate --output .cortex/mcp-server
cd .cortex/mcp-server
npm install
npm run build
npm start
The generated package contains local copies of every configured specification. It also embeds configured Markdown and generated SDK README files as tools.
Packages
The release workflow publishes @cortex-docs/cli and @cortex-docs/mcp. The CLI tarball includes the internal runtime workspaces.
| Package | Distribution | Purpose |
|---|---|---|
@cortex-docs/cli |
npm | Command-line interface and project workflow |
@cortex-docs/mcp |
npm | MCP server for the Cortex documentation |
@cortex-docs/core |
Included in CLI | Configuration loader and specification parsers |
@cortex-docs/codegen |
Included in CLI | SDK generation engine and language templates |
@cortex-docs/mcp-gen |
Included in CLI | MCP server generator |
@cortex-docs/docs-ui |
Included in CLI | Documentation runtime used by the CLI |
Documentation
Contributing and security
Read CONTRIBUTING.md and DEVELOPMENT.md before you open a pull request.
Report vulnerabilities through the private process in SECURITY.md.
License
Cortex Docs is available under the MIT License.
If Cortex saves you time, give the repository a star. It helps more developers find the project.
Questions sur Cortex MCP
Que peut générer Cortex à partir de spécifications API ?
Cortex peut générer de la documentation interactive, des SDK typés pour plusieurs langages et des MCP servers pour les agents IA.
Quels langages de programmation sont pris en charge pour la génération de SDK ?
Vous pouvez générer des SDK pour TypeScript, Python, Go, Java, Kotlin, Ruby, PHP, C#, Rust, C++ et C.
Le MCP server généré prend-il en charge les appels gRPC ?
Non, le MCP server n'appelle pas directement les méthodes gRPC ; il expose plutôt les fichiers Protocol Buffer en tant que ressources afin que les agents puissent inspecter le contrat de service.
Comment lancer une démo locale de Cortex ?
Vous pouvez lancer une démo locale en installant le CLI via npm, en exécutant cortex init, puis en utilisant cortex docs serve.