Skip to content

Context7 Platform -- Up-to-date docs for AI agents

feat: add server.json configuration for Context7 and update release workflow

enesgulesffee8c83ca3b
diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml
index 9548ad3f..82a4dafd 100644
--- a/.github/workflows/release.yml
+++ b/.github/workflows/release.yml
@@ -9,6 +9,9 @@ jobs:
release:
name: Release
runs-on: ubuntu-latest
+ permissions:
+ id-token: write # Required for OIDC authentication with MCP Registry
+ contents: read
steps:
- name: Checkout Repo
uses: actions/checkout@v3
@@ -58,3 +61,20 @@ jobs:
run: |
npm pkg delete scripts.prepare
npm publish --access public --tag=canary
+
+ - name: Validate server.json
+ if: "!github.event.release.prerelease"
+ run: npx mcp-registry-validator validate server.json
+
+ - name: Install MCP Publisher
+ if: "!github.event.release.prerelease"
+ run: |
+ curl -L "https://github.com/modelcontextprotocol/registry/releases/download/latest/mcp-publisher_$(uname -s | tr '[:upper:]' '[:lower:]')_$(uname -m | sed 's/x86_64/amd64/;s/aarch64/arm64/').tar.gz" | tar xz mcp-publisher
+
+ - name: Login to MCP Registry
+ if: "!github.event.release.prerelease"
+ run: ./mcp-publisher login github-oidc
+
+ - name: Publish to MCP Registry
+ if: "!github.event.release.prerelease"
+ run: ./mcp-publisher publish
diff --git a/server.json b/server.json
new file mode 100644
index 00000000..19ad68d9
--- /dev/null
+++ b/server.json
@@ -0,0 +1,44 @@
+{
+ "$schema": "https://static.modelcontextprotocol.io/schemas/2025-09-29/server.schema.json",
+ "name": "io.github.upstash/context7",
+ "title": "Context7",
+ "description": "Up-to-date code docs for any prompt",
+ "repository": {
+ "url": "https://github.com/upstash/context7",
+ "source": "github"
+ },
+ "version": "1.0.0",
+ "packages": [
+ {
+ "registryType": "npm",
+ "identifier": "@upstash/context7-mcp",
+ "version": "1.0.21",
+ "transport": {
+ "type": "stdio"
+ },
+ "environmentVariables": [
+ {
+ "description": "API key for authentication",
+ "isRequired": false,
+ "format": "string",
+ "isSecret": true,
+ "name": "CONTEXT7_API_KEY"
+ }
+ ]
+ }
+ ],
+ "remotes": [
+ {
+ "type": "streamable-http",
+ "url": "https://mcp.context7.com/mcp",
+ "headers": [
+ {
+ "name": "CONTEXT7_API_KEY",
+ "description": "API key for authentication",
+ "isRequired": false,
+ "isSecret": true
+ }
+ ]
+ }
+ ]
+}
\ No newline at end of file