Skip to content

examples(mcp): add ejentum_remote_example (authenticated streamable HTTP MCP)#3497

Closed
ejentum wants to merge 1 commit into
openai:mainfrom
ejentum:examples-mcp-ejentum-remote
Closed

examples(mcp): add ejentum_remote_example (authenticated streamable HTTP MCP)#3497
ejentum wants to merge 1 commit into
openai:mainfrom
ejentum:examples-mcp-ejentum-remote

Conversation

@ejentum
Copy link
Copy Markdown

@ejentum ejentum commented May 23, 2026

Summary

Adds a new example under examples/mcp/ejentum_remote_example/ that connects an Agent to the Ejentum cognitive harness MCP server (https://api.ejentum.com/mcp) over the Streamable HTTP transport with bearer auth.

The repo already has streamable_http_remote_example/ against DeepWiki. That precedent uses no auth and a single-purpose remote tool surface. This example adds two pieces not yet shown in any existing examples/mcp/ entry:

  1. Bearer auth via headers in MCPServerStreamableHttpParams. The headers field is documented in the params TypedDict at src/agents/mcp/server.py but no example demonstrates it for an authenticated third-party server.
  2. An instructions block that tells the agent when to reach for each of the four scaffold tools. The Ejentum server exposes harness_reasoning, harness_code, harness_anti_deception, and harness_memory; the example instructions clarify when each one applies, so the agent's tool-selection trajectory is interpretable.

The demo question is a software-architecture trade-off (adding a NOT NULL column to a 50M-row table) so the agent has a plausible reason to call harness_reasoning before generating.

Files added

  • examples/mcp/ejentum_remote_example/main.py (61 lines)
  • examples/mcp/ejentum_remote_example/README.md (26 lines)

Two files, ~87 lines, no changes outside the new directory.

Affiliation

I maintain ejentum-mcp. Submitting this as a teaching example for the auth-headers path; the same shape works for any authenticated streamable-HTTP MCP server, and the README explicitly notes which two lines to change for repointing. Ejentum has free and paid tiers; the README links to the dashboard for a key, not to a checkout flow.

Test plan

  • Mirrors the structure of streamable_http_remote_example (main.py + README.md, same MCPServerStreamableHttp context manager + Runner.run + gen_trace_id/trace pattern).
  • Uses MCPServerStreamableHttpParams headers field as documented in src/agents/mcp/server.py.
  • Voice scrubbed (no em dashes).
  • DCO sign-off on the commit.
  • Local uv run (cannot run the full SDK harness in this environment; happy to follow up if CI surfaces an issue).

…TTP MCP)

A new example under examples/mcp/ that connects an Agent to the Ejentum
cognitive harness MCP server at https://api.ejentum.com/mcp over the
streamable HTTP transport with bearer auth.

Adds the two pieces not yet shown in the existing streamable_http_remote_example
(DeepWiki, no auth):

- Bearer auth via the headers field in MCPServerStreamableHttpParams
- An instructions block that tells the agent when to reach for each of
  the four harness_* scaffold tools (reasoning, code, anti_deception, memory)

The demo question is a software-architecture trade-off so the agent has a
plausible reason to call harness_reasoning before generating.

Signed-off-by: Ejentum <info@ejentum.com>
@seratch
Copy link
Copy Markdown
Member

seratch commented May 23, 2026

Thanks for sharing this. While we won't have this example within this repo, please feel free to share it in your own repo / resources.

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