Meet mcpose v3More ways to compose. One familiar MCP endpoint.mcpose v3 is here.Explore what’s new →What’s new →
The programmable MCP proxy

Make MCP work your way.

Build an MCP gateway. Shape tools and results. See what happens on every call. A TypeScript proxy library you run and extend.

npm install mcpose @modelcontextprotocol/sdk
A request is approved and adapted. The MCP server responds, and middleware simplifies the response and masks a field before returning it.YOUR MIDDLEWAREFILTERTRANSFORMREQUEST →← RESPONSEMCPSERVER

A small function in the middle can change the whole interaction.

What will you build?

Start with a developer problem. Solve it in the space between client and server.

Build a gateway

Connect local and remote MCP servers through one endpoint, with distinct tool names and shared middleware.

Adapt your tools

Filter the tool catalog, transform results, and add local tools without forking upstream servers.

Debug calls

Inspect call timing, outcomes, and backend failures. Send events to your existing telemetry stack.

Your gateway. Your middleware.

Many servers. One MCP endpoint. Behavior you control in TypeScript.

Combine docs, CRM, and file tools behind one proxy. Add shared behavior once. Deploy the library in your own application.

docs__searchDocs server / search
crm__lookupCRM server / lookup
files__readFiles server / read

Make existing tools fit your app.

Transform results, filter discovery, or add audit. The same composable middleware.

Transform a response

search({ query: "deployment" })
ClientAgent / LLM
mcposeMiddleware proxy
UpstreamMCP server

Before middleware

The deployment guide is ready.

After middleware

The deployment guide is ready.
Source: internal docs

The response carries the extra context your middleware added.

Sample data · simulated trace
Learn more in docs →
TypeScript · configuration excerpt
proxy-config.ts
import { hasToolContent } from 'mcpose';
import type { ToolMiddleware } from 'mcpose';

const withSource: ToolMiddleware = async (req, next) => {
  const result = await next(req);
  if (!hasToolContent(result)) return result;
  return {
    ...result,
    content: [...result.content, {
      type: 'text',
      text: 'Source: internal docs',
    }],
  };
};
// In ProxyOptions:
toolMiddleware: [withSource]

Add capabilities as you need them.

Telemetry and persistence for operations. Optional policy, consent, redaction, and audit for sensitive workflows.

PackageDescription
mcposeProxy, transport, middleware.
@mcpose/otelConnect telemetry to OpenTelemetry.
@mcpose/store-redisPersistent SSE events.
@mcpose/store-postgresPersistent SSE events.
@mcpose/policyRole rules and per-session call budgets.
@mcpose/consentConsent resolved by the application.
@mcpose/auditChained events and signed session manifests.
@mcpose/testingAudit consistency assertions.
mcpose

Proxy, transport, middleware.

@mcpose/otel

Connect telemetry to OpenTelemetry.

@mcpose/store-redis

Persistent SSE events.

@mcpose/store-postgres

Persistent SSE events.

@mcpose/policy

Role rules and per-session call budgets.

@mcpose/consent

Consent resolved by the application.

@mcpose/audit

Chained events and signed session manifests.

@mcpose/testing

Audit consistency assertions.

The next layer is yours.

Your first gateway, tool adapter, or debugging layer starts with one proxy.