Skip to content

fix: use user-provided name for MCP server k8s resources#284

Merged
peterj merged 1 commit intoagentregistry-dev:mainfrom
optimus-fulcria:fix/mcp-user-provided-name-146
Mar 7, 2026
Merged

fix: use user-provided name for MCP server k8s resources#284
peterj merged 1 commit intoagentregistry-dev:mainfrom
optimus-fulcria:fix/mcp-user-provided-name-146

Conversation

@optimus-fulcria
Copy link
Copy Markdown
Contributor

@optimus-fulcria optimus-fulcria commented Mar 6, 2026

Description

  • When agent.yaml specifies a name for a registry-type MCP server (e.g. name: my-mcp-server), that name is now used as the k8s service/resource name instead of the full registry name (user/my-mcp-serveruser-my-mcp-server)
  • Ensures the k8s service name matches what gets written to mcp-servers.json, allowing the agent to connect
  • Falls back to registry server name when no user-provided name is set (backward compatible)

Fixes #146

Change Type

/kind fix

Changelog

use user-provided name for MCP server (not the registry name)

Test plan

  • New unit test: TestCreateResolvedMCPServerConfigs_UsesUserProvidedName
  • Existing tests pass unchanged
  • Build succeeds

🤖 Generated with Claude Code

…ry-dev#146)

When an agent.yaml specifies a `name` for a registry-type MCP server,
that name is now used as the Kubernetes service/resource name instead
of the full registry server name (e.g. "my-mcp-server" instead of
"user-my-mcp-server").

This ensures the k8s service name matches what gets written to
mcp-servers.json, so the agent can actually connect to its MCP servers.

- Add Name field to MCPServerRunRequest for user-provided name override
- Populate it from mcpServer.Name in resolveAgentManifestMCPServers
- Use it in both translateRemoteMCPServer and translateLocalMCPServer
- Use it in createResolvedMCPServerConfigs for mcp-servers.json

Co-Authored-By: Claude Opus 4.6 <[email protected]>
@peterj peterj added this pull request to the merge queue Mar 6, 2026
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to no response for status checks Mar 7, 2026
@peterj peterj added this pull request to the merge queue Mar 7, 2026
Merged via the queue into agentregistry-dev:main with commit 8cb6c14 Mar 7, 2026
8 of 10 checks passed
christian-posta pushed a commit to christian-posta/agentregistry that referenced this pull request Mar 9, 2026
…ry-dev#284)

# Description

- When `agent.yaml` specifies a `name` for a registry-type MCP server
(e.g. `name: my-mcp-server`), that name is now used as the k8s
service/resource name instead of the full registry name
(`user/my-mcp-server` → `user-my-mcp-server`)
- Ensures the k8s service name matches what gets written to
`mcp-servers.json`, allowing the agent to connect
- Falls back to registry server name when no user-provided name is set
(backward compatible)

Fixes agentregistry-dev#146

# Change Type 

```
/kind fix
```

# Changelog

```release-note
use user-provided name for MCP server (not the registry name)
```

## Test plan
- [x] New unit test:
`TestCreateResolvedMCPServerConfigs_UsesUserProvidedName`
- [x] Existing tests pass unchanged
- [x] Build succeeds

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-authored-by: Claude Opus 4.6 <[email protected]>
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.

use the name user provided, not the mcp server name from the registry as the k8s service name

2 participants