Skip to content

feat: add mcp server to expose SDK_CONTEXT file#4036

Merged
cpaulve-1A merged 1 commit intomainfrom
feat/mcp-server-sdk
Mar 13, 2026
Merged

feat: add mcp server to expose SDK_CONTEXT file#4036
cpaulve-1A merged 1 commit intomainfrom
feat/mcp-server-sdk

Conversation

@cpaulve-1A
Copy link
Contributor

Proposed change

Related issues

- No issue associated -

@cpaulve-1A cpaulve-1A requested a review from a team as a code owner March 6, 2026 14:53
@nx-cloud
Copy link
Contributor

nx-cloud bot commented Mar 6, 2026

View your CI Pipeline Execution ↗ for commit afe442d

Command Status Duration Result
nx run-many --target=test-e2e ✅ Succeeded 1m 54s View ↗
nx affected --target=lint --configuration ci ✅ Succeeded 16m 1s View ↗
nx run-many --tui=false --target=build --projec... ✅ Succeeded <1s View ↗
nx run-many --target=build,build-swagger ✅ Succeeded 14m 54s View ↗
nx affected --target=test --coverage --configur... ✅ Succeeded 6m 49s View ↗
nx run ama-sdk-schematics:build-swagger ✅ Succeeded 3m 14s View ↗
nx run-many --target=documentation ✅ Succeeded 1m 30s View ↗
nx affected --target=package-github-action ✅ Succeeded 1m 59s View ↗

☁️ Nx Cloud last updated this comment at 2026-03-13 14:53:13 UTC

@cpaulve-1A cpaulve-1A force-pushed the feat/mcp-server-sdk branch from 738fac0 to 7ba2f48 Compare March 6, 2026 15:27
@cpaulve-1A cpaulve-1A force-pushed the feat/mcp-server-sdk branch from 7ba2f48 to 559e903 Compare March 6, 2026 16:06
@codecov
Copy link

codecov bot commented Mar 10, 2026

Codecov Report

❌ Patch coverage is 76.78571% with 26 lines in your changes missing coverage. Please review.
✅ Project coverage is 70.93%. Comparing base (327b568) to head (afe442d).
⚠️ Report is 2 commits behind head on main.
✅ All tests successful. No failed tests found.

Files with missing lines Patch % Lines
packages/@ama-mcp/sdk/src/helpers/utils.ts 40.90% 13 Missing ⚠️
packages/@ama-mcp/sdk/src/server/mcp-server.ts 79.03% 12 Missing and 1 partial ⚠️

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Copy link
Contributor

@nx-cloud nx-cloud bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nx Cloud is proposing a fix for your failed CI:

These changes fix the test failures in ama-mcp-sdk:test:ci by providing a default logger when registerSdkContextToolAndResources is called without one. The function was using a non-null assertion on options.logger!, causing tests to fail with TypeError: Cannot read properties of undefined (reading 'info') when no logger was provided. We've aligned the implementation with the pattern used in createSdkContextServer, ensuring the function works correctly whether a logger is supplied or not.

Tip

We verified this fix by re-running ama-mcp-sdk:test:ci.

diff --git a/packages/@ama-mcp/sdk/src/server/mcp-server.ts b/packages/@ama-mcp/sdk/src/server/mcp-server.ts
index f8d4d7f72..af7e386e7 100644
--- a/packages/@ama-mcp/sdk/src/server/mcp-server.ts
+++ b/packages/@ama-mcp/sdk/src/server/mcp-server.ts
@@ -174,7 +174,7 @@ export const registerSdkContextToolAndResources = (
   options: SdkContextOptions = {}
 ): void => {
   const projectPath = options.projectPath ?? '.';
-  const logger = options.logger!;
+  const logger = options.logger ?? new MCPLogger('@ama-mcp/sdk');
   const sdkPackages = options.sdkPackages ?? loadSdkPackagesFromPackageJson(projectPath, logger);
   const contexts = loadSdkContexts(sdkPackages, SDK_CONTEXT_FILENAME, logger);
 

🔔 Heads up, your workspace has pending recommendations ↗ to auto-apply fixes for similar failures.

Apply fix via Nx Cloud  Reject fix via Nx Cloud


Or Apply changes locally with:

npx nx-cloud apply-locally wuHh-BfTG

Apply fix locally with your editor ↗   View interactive diff ↗



🎓 Learn more about Self-Healing CI on nx.dev

@cpaulve-1A cpaulve-1A force-pushed the feat/mcp-server-sdk branch 2 times, most recently from aa91b9f to 45937f0 Compare March 10, 2026 14:27
@cpaulve-1A cpaulve-1A force-pushed the feat/mcp-server-sdk branch 2 times, most recently from 8b7b337 to f3713e5 Compare March 11, 2026 16:04
@cpaulve-1A cpaulve-1A force-pushed the feat/mcp-server-sdk branch from f3713e5 to 5dfee4a Compare March 12, 2026 09:48
kpanot
kpanot previously approved these changes Mar 12, 2026
# Conflicts:
#	.yarn/sdks/eslint/package.json
@cpaulve-1A cpaulve-1A enabled auto-merge March 13, 2026 14:33
logger,
{
name,
version: '0.0.0'
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Shouldn't the version be aligned with the package version ?

@cpaulve-1A cpaulve-1A added this pull request to the merge queue Mar 13, 2026
Merged via the queue into main with commit cfa38ed Mar 13, 2026
40 checks passed
@cpaulve-1A cpaulve-1A deleted the feat/mcp-server-sdk branch March 13, 2026 17:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants