Skip to content

docs: add deed.page Streamable HTTP MCP publishing example - #119

Merged
wxai-space merged 2 commits into
wanxingai:mainfrom
f-o-x11:add-deed-page
Oct 28, 2026
Merged

wxai-space merged 2 commits into
wanxingai:mainfrom
f-o-x11:add-deed-page

Conversation

@f-o-x11

@f-o-x11 f-o-x11 commented Oct 27, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Add example/deed_page_mcp.py, an optional example that lets an agent publish a page it wrote (HTML, or a few static files) and get back a public URL, using the existing transport: "streamable-http" support against https://deed.page/mcp. It adds no dependency and does no network work at import time.
  • Add docs/deed_page_mcp.md (configuration, a --direct connection check that needs no model, security notes, and compatibility evidence) and a one-line README pointer next to the Tools Guide.
  • Add tests/test_deed_page_mcp_example.py: offline tests with fakes, no network or credentials.

Affiliation: this comes from the deed.page team (Avatar 8 LLC), which operates the service. Service docs: https://deed.page/docs. There is also an MIT-licensed agent skill for the same API: https://github.com/f-o-x11/deed-page-skill.

Two things in the example are about LightAgent behavior rather than the service, and may be useful for other remote MCP servers too:

  • setup_mcp registers every tool a server lists. deed.page lists 26 (including delete_site and rotate_token), so restrict_new_tools() removes the MCP tools registered by that call except publish_site and get_site, using only the public ToolRegistry dicts and leaving local tools alone.
  • Without DEEDPAGE_TOKEN, the first publish returns a one-time owner token in the tool result. protect_publish_token() wraps the registered publish_site so the token is written to a 0600 file and replaced by "token_saved": true before the model sees it. With the header set, the service returns no token.

Compatibility

  • Existing agent.run("hello") behavior is unchanged, or the change is documented. (No library code changed.)
  • Existing stream=True behavior is unchanged, or the change is documented.

Tests

  • python -m compileall -q LightAgent (also example tests)
  • PYTHONPATH=. python -m pytest -q tests/test_v065_core.py tests/test_v070_tracing.py tests/test_memory_policy.py — 57 passed (6 existing datetime.utcnow() deprecation warnings on Python 3.12).

Also: full suite PYTHONPATH=. pytest -q 373 passed, 1 skipped; the new test file 8 passed; ruff check clean on the new files; git diff --check clean. Environment: poetry install --with dev from the lock file (mcp 1.12.4).

Live-service validation, kept separate from the offline tests: against https://deed.page/mcp, MCPClientManager registered the server's tools over Streamable HTTP; after restrict_new_tools() only publish_site and get_site were left in openai_function_schemas; the wrapped publish_site returned a URL that served HTTP 200, with the token absent from the result and saved with mode 0600; a call with the Authorization header returned no token; python example/deed_page_mcp.py --direct published and served 200. All test pages were deleted afterwards and returned 404. The agent mode's model call was not part of this run.

Notes

Security: the example reads the token from the environment or a local 0600 file and never embeds it. Published pages are public URLs, which the docs page says plainly. No migration impact. Happy to trim it (for example drop the agent mode and keep only the config and the token/tool helpers), or move it under example/connectors/ if that fits better.

f-o-x11 and others added 2 commits October 27, 2026 13:23
Adds an optional example, docs page and offline tests for publishing agent-written pages to deed.page over LightAgent's existing Streamable HTTP MCP transport. Contributed by the deed.page team (Avatar 8 LLC).
@wxai-space

Copy link
Copy Markdown
Collaborator

The original example and contributor commits are preserved in follow-up PR #122. It adds private no-clobber token storage, symlink/race and file-permission checks, per-connection token reuse, server-scoped credentials, a reserved tool namespace, and protection after refresh/partial discovery failures. Full offline suite: 391 passed, 1 opt-in backend test skipped; 26 focused example/security tests passed. No live publication or model API was invoked. Please review #122 together with SDK compatibility follow-up #121 before merging; no merge or release has been performed.

@wxai-space

Copy link
Copy Markdown
Collaborator

The completed fixes have now been appended directly to this original contributor branch at 0957291, preserving the existing commits and attribution. The newly triggered CI run passed all 4 checks: https://github.com/wanxingai/LightAgent/actions/runs/40616543427 . Supplemental PR #122 has been closed as redundant. This original PR remains open and unmerged for your review; main has not been modified.

@wxai-space
wxai-space merged commit e9f5732 into wanxingai:main Oct 28, 2026
8 checks passed
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