Skip to content

Add public read-only MCP server and registry, CORS/content-negotiation, docs, tests, and CI#37

Merged
Trailgenic merged 2 commits into
mainfrom
codex/upgrade-ellaentity-mcp-server-implementation-fvm1g2
Jul 13, 2026
Merged

Add public read-only MCP server and registry, CORS/content-negotiation, docs, tests, and CI#37
Trailgenic merged 2 commits into
mainfrom
codex/upgrade-ellaentity-mcp-server-implementation-fvm1g2

Conversation

@Trailgenic

Copy link
Copy Markdown
Owner

Motivation

  • Expose a native, read-only Streamable HTTP MCP endpoint for the canonical Ella entity graph and related resources with proper CORS and content negotiation controls.
  • Centralize registry data and provenance (entity graph, domains, frameworks, works, collaboration) and provide strict input/output schemas for MCP tooling.
  • Improve the human-facing MCP documentation page to reflect canonical identifiers, tools, and resources.
  • Add automated verification and deployment guidance to ensure consistent behavior and safe public exposure.

Description

  • Introduce a registry and provenance layer in lib/ella-registry.ts and JSON-LD consolidation via ellaEntityGraph() used by app/entity.json/route.ts.
  • Implement a read-only MCP server using @modelcontextprotocol/sdk in lib/ella-mcp-server.ts and Zod-based input/output schemas in lib/ella-mcp-schemas.ts registering tools and resources from the registry.
  • Replace previous ad-hoc /mcp route logic with app/mcp/route.ts that delegates to handleEllaMcpPost, adds origin-based CORS checks driven by MCP_ALLOWED_ORIGINS, enforces Accept/Content-Type negotiation, and supports OPTIONS/GET behavior.
  • Update the human documentation page app/system/mcp/page.tsx to use registry constants (server info, protocol versions, canonical ID) and render tool/resource lists and examples.
  • Add MCP_ALLOWED_ORIGINS to .env.example, a deployment checklist docs/mcp-deployment.md, and tests tests/mcp.test.ts that exercise CORS, content negotiation, tool and resource semantics, and canonical URL parity.
  • Update package.json to add test tooling and dependencies (@modelcontextprotocol/sdk, tsx, ajv, bump zod), and add a GitHub Actions CI workflow .github/workflows/ci.yml to run npm ci, lint, typecheck, test, and build on PRs and pushes to main.

Testing

  • Added tests/mcp.test.ts and ran the test suite with npm test which executes the Node test runner against the MCP behavior and schema assertions; the tests passed.
  • Linting and type checking were run (npm run lint, npm run typecheck) as part of CI and produced no errors.
  • Build was run (npm run build) in CI to ensure Next.js assets compile successfully and completed without failure.

Codex Task

@vercel

vercel Bot commented Jul 13, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
ellaentity Ready Ready Preview, Comment Jul 13, 2026 10:49pm

Request Review

@Trailgenic
Trailgenic merged commit 55fe826 into main Jul 13, 2026
2 of 3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant