Repository navigation
feat: MCP server for trueforge - #1047
heerambavi1998 wants to merge 17 commits into
Conversation
🦋 Changeset detectedLatest commit: 9ccf905 The changes in this PR will be included in the next version bump. This PR includes changesets to release 3 packages
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
There was a problem hiding this comment.
We can define a trueforge mcp like:
{
"type": ...,
"name": "trueforge"
"url": localhost,
"auth" :{
"type": "header",
"headers: "user_token"
}
}
Now from all the mcp stores(tfy, postgres and sqlite) we will inject the above.
So fronend will add trueforge in the inilne agent spec, and we can have custom logic in all the store to handle the trueforge mcp case. This way we will not need to spread the logic
This would simply the design(this is what being done for the default environment case in sandbox environments)
cc @chiragjn
We are doing the exact same approach ( except naming). Persistence store should not resolve this mcp though, since those are pure DB reads. It can cause issues later in sorting , pagination. |
5c0f7ba to
b5803c9
Compare
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes using default effort and found 1 potential issue.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit b5803c9. Configure here.
Trusted MCP fetches now live on the connection network policy, so the outbound options no longer accept trustedEndpoint. Co-authored-by: Cursor <cursoragent@cursor.com>
5cb5bea to
9ccf905
Compare

Summary
MCP server for trueforge
Changes
How was this tested?
manual testing
Checklist
pnpm build,pnpm test,pnpm typecheck,pnpm lint:ci, andpnpm format:checkpass locallypackages/trueforge-sdk,python/trueforge_sdk,.github/fern/openapi/openapi.json,docs/openapi.json) — fork PRs omit SDK regen; maintainers regenerate after merge.env.exampleupdated if configuration or behavior changedNote
Medium Risk
Introduces a new authenticated MCP surface and refactors MCP resolution/remote networking; misconfiguration could affect turn-time MCP auth or internal fetch policy, though draft-only gating and manifest persistence guards limit blast radius.
Overview
Adds a built-in
trueforgeMCP server (Streamable HTTP at/mcp) so browser draft sessions can configure agents and related resources via MCP tools (agents, schedules, sandbox envs, models, MCP servers, skills). Access is gated byx-trueforge-client: browseron both the/mcpendpoint and the frontend’screateAuthAwareFetch.Draft vs saved agents: the UI adapter auto-attaches the
trueforgeMCP to inline/draft session specs and strips it on save; the agents API rejects persisting that connector in stored manifests. Validation treatstrueforgeas a virtual server that does not need a DB row.MCP plumbing refactor: persistence (
IMcpServerStore), OAuth client storage, and invoke/auth behavior are split behindIMcpServerResolver/McpServerResolver, with a request-scopedTrueForgeMcpServerResolverfor the built-in connector. Remote MCP connections now use aRemoteMcpEndpointplus optionaltrusted-internalnetwork policy (mTLS-aware fetch, no redirects) for loopback to the first-party MCP. Reserved resource names now includetrueforge/truefoundry.Reviewed by Cursor Bugbot for commit 9ccf905. Bugbot is set up for automated code reviews on this repo. Configure here.