mcp-httpserver-proxy
AGENTS.md2 starsChanged 3 months agoMITView on GitHub
Welcome, AI agent! This document details the technical architecture, development workflows, strict constraints, coding standards, and Pull Request procedures for this repository. mcp-httpserver-proxy is a transparent bridge between: The primary entry point is src/index.ts, which compiles to dist/index.js as an executable Node.js CLI. [!IMPORTANT] NEVER use console.log() or write arbitrary text to process.stdout! The client (Claude Desktop, Cursor, etc.) parses stdout strictly as JSON-RPC Model Context Protocol messages. Any non-protocol output on stdout will corrupt the transport and crash the…
- Installs packages
- Commits and pushes
Where files are headingNew AGENTS.md files have more rules about keeping secrets out of the code, and fewer about code style.
Of the AGENTS.md files we read, the 31,439 first seen in the last six months, against the older ones: the kind of rule that gained most share, and the kind that lost most. About files like this in general, not this one, and an estimate, since a kind is a pattern in the words.
In this repository4 other files it gives its agents.
- CLAUDE.mdCLAUDE.md
- .github/copilot-instructions.mdCopilot instructions
- create-prSkill
- mock-sse-serverSkill
The file
We split this AGENTS.md into the rules it gives an agent
8 rules. About 0 are common, 3 are distinctive, and 5 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈3
Distinctive · estimate
This author's own choices. Worth a look.
5
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 31
If the SSE backend fails or closes, the proxy must gracefully exit or signal failure without leaving orphaned stdio loops.
- Very specific: line 36
Always use pnpm as the package manager (pnpm install, pnpm run build, pnpm run format, pnpm run check).
- Very specific: line 37
Never introduce npm or yarn lockfiles.
- Distinctive: line 44
All commit messages and PR titles must follow Conventional Commits:
- Distinctive: line 54
When instructed to open a Pull Request, use the create-pr skill:
- Very specific: line 56
Pre-flight: Run pnpm run build, pnpm run format, and pnpm run check.
- Very specific: line 57
Testing: Run mock SSE verification if transport was touched (node .agents/skills/mock-sse-server/scripts/mock-server.js).
- Very specific: line 58
Branch & Push: Create a feature branch and push to remote (git push -u origin <branch>).
≈ “Common” is an estimate: at least 1 in 5 of the 40,246 AGENTS.md files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Agent Guidelines for mcp-httpserver-proxy
Welcome, AI agent! This document details the technical architecture, development workflows, strict constraints, coding standards, and Pull Request procedures for this repository.
🎯 Repository Overview
mcp-httpserver-proxy is a transparent bridge between:
- An MCP Client communicating over
stdio(StdioServerTransportfrom@modelcontextprotocol/sdk). - An MCP HTTP Server communicating over Server-Sent Events (
SSEClientTransportfrom@modelcontextprotocol/sdk).
The primary entry point is src/index.ts, which compiles to dist/index.js as an executable Node.js CLI.
⚠️ Critical Constraints & Rules
1. Standard Output (stdout) is Sacred
[!IMPORTANT] NEVER use
console.log()or write arbitrary text toprocess.stdout! The client (Claude Desktop, Cursor, etc.) parsesstdoutstrictly as JSON-RPC Model Context Protocol messages. Any non-protocol output onstdoutwill corrupt the transport and crash the client session.All logging, informational messages, and diagnostics MUST be routed to
process.stderrviaconsole.error().
2. Transport Lifecycle Order
- The proxy must establish and confirm the SSE backend connection (
sseTransport.start()) before startingstdioTransport.start(). - If the SSE backend fails or closes, the proxy must gracefully exit or signal failure without leaving orphaned stdio loops.
- Handle process termination signals (
SIGINT,SIGTERM) to clean up open transport connections.
3. Package Management & Tooling
- Always use
pnpmas the package manager (pnpm install,pnpm run build,pnpm run format,pnpm run check). - Never introduce
npmoryarnlockfiles. - Standard formatting and linting is managed by Trunk:
- Format:
pnpm run format(trunk fmt) - Lint/Check:
pnpm run check(trunk check)
- Format:
4. Git & Commit Standards
- All commit messages and PR titles must follow Conventional Commits:
- Format:
<type>(<scope>): <description> - Types:
feat,fix,docs,style,refactor,perf,test,build,ci,chore,revert.
- Format:
- Commits are verified locally via Trunk git hooks (
commitlint). - PR titles are verified in CI via GitHub Actions (
semantic-pr.yml).
🤖 AI Pull Request Workflow
When instructed to open a Pull Request, use the create-pr skill:
- Pre-flight: Run
pnpm run build,pnpm run format, andpnpm run check. Ensure 0 errors. - Testing: Run mock SSE verification if transport was touched (
node .agents/skills/mock-sse-server/scripts/mock-server.js). - Branch & Push: Create a feature branch and push to remote (
git push -u origin <branch>). - Open PR via
gh pr create:- Title: Conventional Commit (e.g.
feat(cli): add version and help flags). - Body: Rich Markdown format including:
📋 Description & What Changed💡 Motivation & Why🧪 How to Test🔍 Testing Evidence & Execution Logs🤖 AI Agent & Model🛡️ Contributor Checklist
- Title: Conventional Commit (e.g.
🛠️ Common Commands
# Install dependencies
pnpm install
# Compile TypeScript
pnpm run build
# Development watch mode
pnpm run dev
# Format code
pnpm run format
# Run linters & static analysis
pnpm run checkDoes it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

