Skip to content

feat: support a second Datadog organization (two org slots)#19

Draft
IliaFeldgun wants to merge 1 commit into
datadog-labs:mainfrom
pinecone-io:feat/multi-org-support
Draft

feat: support a second Datadog organization (two org slots)#19
IliaFeldgun wants to merge 1 commit into
datadog-labs:mainfrom
pinecone-io:feat/multi-org-support

Conversation

@IliaFeldgun

@IliaFeldgun IliaFeldgun commented Jun 16, 2026

Copy link
Copy Markdown

Draft if anyone needs, probably adding support to n orgs
Screenshot 2026-06-16 at 14 20 36

Add a second MCP server entry (plugin:datadog:mcp-2) so the plugin can connect to two Datadog organizations at once, each with its own OAuth session. Slot 2 defaults to not-setup and stays inert until the user adds a second org, so single-org installs are unaffected. Slot 2's URL carries a distinguishing org_slot=2 query param so same-domain slots keep unique URLs.

What does this PR do?

Checklist

  • Tests added or updated where applicable
  • Documentation updated where applicable
  • No secrets, internal URLs, or other internal references included

Add a second MCP server entry (plugin:datadog:mcp-2) so the plugin can
connect to two Datadog organizations at once, each with its own OAuth
session. Slot 2 defaults to not-setup and stays inert until the user adds
a second org, so single-org installs are unaffected. Slot 2's URL carries
a distinguishing org_slot=2 query param so same-domain slots keep unique URLs.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@IliaFeldgun IliaFeldgun requested a review from a team as a code owner June 16, 2026 10:53
@IliaFeldgun IliaFeldgun marked this pull request as draft June 16, 2026 10:57
@m-paternostro

Copy link
Copy Markdown
Contributor

Thank you for the idea and PR. I see it is still in draft, but I couldn’t resist taking a look.

I think the idea has merit, but one concern comes to mind around server selection when multiple identical (same tools, instructions, ...) Datadog servers are enabled simultaneously.

For example, if a user asks:

“Show me the latest logs for service foo”

it may be ambiguous which server should handle the request. In practice, this means one of three things needs to happen:

  1. The user must explicitly specify the target server.
  2. The agent must ask a clarifying question.
  3. The agent must make a routing decision on its own.

The third option worries me a bit because different prompts within the same conversation could end up being routed to different servers. This could lead to inconsistent results, fragmented context, or situations where the agent appears to “switch environments” midway through a session without the user realizing it.

Have you thought about how server selection would work once both servers are active?

Another angle, I suspect this may place additional burden on the agent as well, since it would need to continuously infer which environment/server the user intends to interact with. Even if the initial request is routed correctly, maintaining that choice consistently across a long conversation may be challenging.

@IliaFeldgun

IliaFeldgun commented Jun 17, 2026

Copy link
Copy Markdown
Author

Thank you for your reply,
It looks almost if you tried the skill,
The agent usually asks which should we use, but right now if it didn't find something it tries both.
Otherwise it remembers and has no problems in the same session (surprisingly)
WHEN you're in a single repo it remembers your choices by context, even if you use both in the same repo.

Transitioning repos is where it becomes confusing (using Claude right now, inherent issue that is not unique to this plugin in my opinion).

First things I plan:

  • N orgs
  • Mandatory nicknames during setup (my concern is it changes the design of this repo a bit)
    This will make it more logical to maybe start merging this. (2 orgs is just weird)

Ideas about your concerns:

Show me the latest logs for service foo

First time: Asks but I have no guarantee
Additional time, same session: Will not look at second slot as long as Claude can find data
First time, Second repo: Asks but I have no guarantee

User asked for second slot: Will usually stay in slot unless can't find data

User asks which slot is service foo: generally successful.

User asks "/ddtoolsets add profiling": somewhat bugged &toolsets=${DD_MCP_TOOLSETS:-core,profiling}"... /opt/claude/plugins/datadog/claude-code-plugin/.dd_claude-code_mcp.json` is the wrong place I think. (SKILL fault not tooling fault I think)

So in general this is reliable as long as claude has a single path (i.e. user knows which slot foo is)
BUT user always sees which slot he's using and needs to confirm (unless on autopilot, need to check the use case separately)

I believe "The agent must ask a clarifying question."
Technically:

PS frankly trying to find a way to unit test SKILLS online, but no idea, this PR is AI but this comment isn't 🔢

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants