chat-share
Officialchat-share
Share AI agent conversations via unique public links. Self-hosted, with a REST API + MCP server for agents, and an admin panel protected by OIDC login (via PocketID).
It's like ChatGPT's "Share" feature, but self-hosted and designed so AI agents themselves (Hermes, Claude, Codex, etc.) publish and manage the links.
โจ Features
REST API + MCP for AI agents to publish conversations and get a
/s/<id>link.Public link rendered as nice HTML (markdown, syntax highlighting, role-styled bubbles).
Optional password (argon2-hashed) to protect the link.
Optional expiration (
1h,24h,7d,30d, or never).Admin panel with OIDC (PocketID) login: view all chats, view counts, expiration, revoke/delete links.
View counter and status (active / expired / revoked).
SQLite (WAL), no external dependencies. Small multi-arch Docker image.
Related MCP server: Stela
๐ Docker quickstart
docker run -d --name chat-share \
-p 3000:3000 \
-v chat-share-data:/app/data \
-e BASE_URL="https://share.yourdomain.cl" \
-e SESSION_SECRET="$(openssl rand -hex 32)" \
-e AGENT_API_KEY="a-secret-key" \
-e OIDC_ISSUER="https://id.yourdomain.cl" \
-e OIDC_CLIENT_ID="chat-share" \
-e ADMIN_ALLOWED_SUBS="<user-sub>" \
ghcr.io/<your-user>/chat-share:latestOr with docker-compose.yml (see docker-compose.yml in the repo root):
services:
chat-share:
image: ghcr.io/<your-user>/chat-share:latest
restart: unless-stopped
ports: ["3000:3000"]
volumes: ["chat-share-data:/app/data"]
env_file: .env
volumes:
chat-share-data:Copy .env.example to .env, fill it in, and run docker compose up -d.
โ๏ธ Environment variables
Variable | Required | Default | Description |
| no |
| HTTP port |
| yes (prod) |
| Public base URL used to generate links |
| no |
| SQLite path (mount a volume) |
| yes | โ | Agent keys (comma-separated) |
| yes | โ | HMAC secret for cookies (โฅ32 random chars) |
| yes* | โ | PocketID issuer (e.g. |
| yes* | โ | Admin panel client ID |
| no | โ | Client secret (if the client is confidential) |
| no | โ | Audience required when validating MCP OAuth access tokens |
| no | โ | OIDC subs allowed in the admin panel (comma-separated) |
| no |
|
|
| no |
| Request body limit in bytes for API/MCP/unlock |
* OIDC is optional: without OIDC_ISSUER/OIDC_CLIENT_ID the admin panel is disabled,
but the API and public links keep working.
๐ค Publishing from an AI agent
Via REST API (curl)
curl -X POST https://share.yourdomain.cl/api/chats \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"title": "Network issue fix",
"agent": "hermes-agent",
"messages": [
{"role": "user", "content": "How do I configure DNS?"},
{"role": "assistant", "content": "Edit `/etc/resolv.conf`..."}
],
"password": "optional-123",
"expires_in": "7d"
}'Response:
{
"id": "mWqq9mPEdrRZ",
"url": "https://share.yourdomain.cl/s/mWqq9mPEdrRZ",
"expires_at": "2026-08-09T19:39:52.728Z",
"password_protected": true
}Via MCP
The /mcp endpoint is an MCP Streamable HTTP server (stateless). Tools:
Tool | Description |
| Publishes a conversation โ returns a URL. Asks the user about password/expiration if they didn't specify any. |
| Revokes a link ( |
| Link metadata ( |
MCP authentication โ two mechanisms are supported:
API key (same as the REST API): header
Authorization: Bearer <AGENT_API_KEY>.OAuth 2.0 against PocketID: the server acts as a resource server that delegates authorization to PocketID. Standard discovery flow:
Metadata:
https://share.yourdomain.cl/.well-known/oauth-protected-resource/mcpThe client does an OAuth login at PocketID and receives an access token sent as
Authorization: Bearer <access_token>.The server validates the token against PocketID's JWKS (
OIDC_ISSUERconfig).
Configure in Hermes (config.yaml or hermes mcp add):
mcp:
servers:
chat-share:
transport: streamable-http
url: https://share.yourdomain.cl/mcp
headers:
Authorization: "Bearer YOUR_API_KEY"If you prefer OAuth over an API key, point the MCP client at the metadata URL above and Hermes/Claude/Codex will perform the OAuth login against PocketID automatically.
When the MCP authenticates via OAuth, the agent field of published chats reflects the
user's identity (PocketID email/sub) instead of a generic name.
๐ Admin panel
Create an OIDC client in PocketID with redirect URI
https://share.yourdomain.cl/admin/callback.Configure
OIDC_ISSUERandOIDC_CLIENT_ID(plusOIDC_CLIENT_SECRETif applicable).Go to
/admin. You'll see all shared chats: title, agent, date, expiration, views, password protection, status, and actions (copy URL / revoke).
The flow uses Authorization Code + PKCE, validates the id_token against the issuer's JWKS
and creates a signed stateless session (HMAC).
๐ณ Docker image / CI
Multi-stage Dockerfile โ small runtime image (
oven/bun:1-alpine).GitHub Actions (
.github/workflows/docker.yml): on every push tomainor tagv*it builds forlinux/amd64andlinux/arm64and publishes to GHCR (ghcr.io/<repo>/chat-share).
๐งช Development
bun install
bun run src/index.ts # requires SESSION_SECRET and AGENT_API_KEY
bunx tsc --noEmit # typecheck
bun test # tests๐ License
MIT
This server cannot be deployed
Maintenance
Related MCP Connectors
MCP server for building and testing AI agents with multi-model experimentation and insights.
MCP server for secureFlows: token-free URL builders and integration-linting tools for AI agents.
Publish and share access-controlled Markdown documents from any MCP-enabled AI tool.
MCP server connecting AI agents to 100+ apps (Gmail, Slack, Notion, GitHub) via one-click OAuth.
Related MCP Servers
- AlicenseNot gradedqualityAmaintenanceMCP server for one-time secret sharing, enabling AI agents to securely claim and store secrets (e.g., API keys) via claim codes without exposing them in chat transcripts.6MIT
- AlicenseNot gradedqualityCmaintenanceSelf-hosted MCP server for publishing, sharing, and reviewing AI agent artifacts with version history and pinned comments.MIT
- AlicenseNot gradedqualityCmaintenanceMCP server that provides AI agents with persistent memory, cross-agent sharing, and context management, enabling them to remember conversations, track complex tasks, and evolve skills across tools.2MIT
- AlicenseNot gradedqualityBmaintenanceA public chat platform for AI agents with MCP and A2A support, enabling agent-to-agent communication across channels via a single-file Python server.MIT