MCP Spec 2025-11-25

Build real MCP systems,
not just tools

Production-ready Go framework with security, observability, and resilience built in from day one.

16
Production Middleware
5
Transport Protocols
100%
MCP Compliant
MIT
Open Source

Production systems need more than protocol primitives

Most MCP libraries hand you protocol primitives and leave the rest to you. FineMCP treats the server as a system—security, observability, resilience, and correctness are built in from day one.

Security

RBAC per tool, token-bucket rate limiting, JSON Schema input validation, and execution sandbox. Control who can call what, when, and how.

Observability

OpenTelemetry traces and metrics, structured logging, audit logs, and cost tracking. Know exactly what's happening in production.

Resilience

Circuit breaker, retry with exponential backoff, and panic recovery. Handle failures gracefully and keep your system running.

Correctness

Auto JSON Schema generation, typed generic handlers, and compile-time safety. Catch errors before they reach production.

Testability

In-process test harness with assertion helpers and golden file diffing. Test your MCP servers without any network setup.

Running in minutes, not days

Install FineMCP and build your first MCP server with type-safe handlers, automatic schema generation, and production middleware.

$ go get github.com/finemcp/finemcp
package main

import (
    "context"
    "fmt"
    "log"

    "github.com/finemcp/finemcp"
    "github.com/finemcp/finemcp/middleware"
)

type GreetInput struct {
    Name string `json:"name" description:"Name to greet"`
}

func main() {
    s := finemcp.NewServer("myapp", "1.0")

    s.Use(middleware.Recovery())
    s.Use(middleware.Logging(finemcp.NopLogger))

    tool, _ := finemcp.NewTypedTool("greet",
        func(_ context.Context, in GreetInput) (string, error) {
            return fmt.Sprintf("Hello, %s!", in.Name), nil
        },
        finemcp.WithDescription("Greets someone"),
    )
    s.RegisterTool(tool)

    log.Fatal(s.StartHTTP(":8080"))
}

16 production-ready middleware

Compose the exact stack you need. Every tool call flows through an ordered, composable chain. Custom middleware is a single func(ToolHandler) ToolHandler.

Security

  • RBAC Per-tool role-based access control
  • RateLimit Token-bucket, per-tool and per-user
  • Validation JSON Schema input validation
  • Sandbox Execution timeout and output size limits
  • Auth Bearer token and API key validation
  • MultiTenant Per-tenant visibility, limits, and policies

Observability

  • Logging Request ID, tool name, duration
  • OTel OpenTelemetry spans, counters, histograms
  • AuditLog SHA-256 input hashing, compliance trail
  • CostTracking Per-call cost with custom cost functions

Resilience

  • Recovery Catches panics, returns clean JSON-RPC error
  • CircuitBreaker Three-state machine with configurable thresholds
  • Retry Exponential backoff with jitter

Developer

  • Async Background job execution with state machine
  • Caching LRU result cache with TTL and input hash keying
  • Simulation Dry-run mode via _meta.dryRun: true

5 transports for every deployment

Run your MCP server anywhere—from a local Claude Desktop plugin to a cloud-native microservice.

Stdio

Newline-delimited JSON-RPC with signal handling. The standard for Claude Desktop and local tooling.

HTTP

Embeddable http.Handler. Drop into any existing Go HTTP server. 204 responses for notifications.

SSE

Server-Sent Events with session management, keepalive, backpressure, and auto-cleanup.

Streamable HTTP

MCP spec 2025-03-26+ primary transport with Mcp-Session-Id and resumability.

WebSocket

Full-duplex with ping/pong and graceful close. Low-latency for interactive applications.

Ready to build production MCP servers?

Install FineMCP and go from zero to production-ready MCP server in minutes.
Full MCP spec compliance, compile-time type safety, and battle-tested middleware included.