agentleFS
shailesh17shailesh17/mcp-httpserver-proxy/AGENTS.md

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.

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
  1. Distinctive:

    If the SSE backend fails or closes, the proxy must gracefully exit or signal failure without leaving orphaned stdio loops.

    line 31
  2. Very specific:

    Always use pnpm as the package manager (pnpm install, pnpm run build, pnpm run format, pnpm run check).

    line 36
  3. Very specific:

    Never introduce npm or yarn lockfiles.

    line 37
  4. Distinctive:

    All commit messages and PR titles must follow Conventional Commits:

    line 44
  5. Distinctive:

    When instructed to open a Pull Request, use the create-pr skill:

    line 54
  6. Very specific:

    Pre-flight: Run pnpm run build, pnpm run format, and pnpm run check.

    line 56
  7. Very specific:

    Testing: Run mock SSE verification if transport was touched (node .agents/skills/mock-sse-server/scripts/mock-server.js).

    line 57
  8. Very specific:

    Branch & Push: Create a feature branch and push to remote (git push -u origin <branch>).

    line 58

≈ “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.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
AGENTS.md

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:

  1. An MCP Client communicating over stdio (StdioServerTransport from @modelcontextprotocol/sdk).
  2. An MCP HTTP Server communicating over Server-Sent Events (SSEClientTransport from @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 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 client session.

All logging, informational messages, and diagnostics MUST be routed to process.stderr via console.error().

2. Transport Lifecycle Order

  • The proxy must establish and confirm the SSE backend connection (sseTransport.start()) before starting stdioTransport.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 pnpm as the package manager (pnpm install, pnpm run build, pnpm run format, pnpm run check).
  • Never introduce npm or yarn lockfiles.
  • Standard formatting and linting is managed by Trunk:
    • Format: pnpm run format (trunk fmt)
    • Lint/Check: pnpm run check (trunk check)

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.
  • 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:

  1. Pre-flight: Run pnpm run build, pnpm run format, and pnpm run check. Ensure 0 errors.
  2. Testing: Run mock SSE verification if transport was touched (node .agents/skills/mock-sse-server/scripts/mock-server.js).
  3. Branch & Push: Create a feature branch and push to remote (git push -u origin <branch>).
  4. 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

🛠️ 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 check

Download now (ZIP)

Does 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
What did you use it for? e.g. Reviewing pull requests in a Rails app

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.