Tether MCP
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@Tether MCP can I add moment.js, or does our dependency policy prefer date-fns?"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
AI agents like Cursor and Claude write code fast β but they suffer from Agent Drift: hallucinating dependencies, violating architectural boundaries, and creating spaghetti code. Tether is a persistent Senior Architect that your AI must consult before making structural changes.
Table of Contents
Related MCP server: MarkdownLM MCP Server
The Problem
You've been there. You ask an AI agent to add a feature and it:
π² Installs
moment.jswhen your project already usesdate-fnsποΈ Creates an Express server inside your Next.js app
π§© Adds Riverpod when your Flutter team agreed on BLoC
π Forgets the entire architecture after a few messages
Every session starts from zero. The AI has no memory of your rules, your stack decisions, or your architectural boundaries. This is Agent Drift, and it turns AI-assisted coding into a technical debt factory.
Quick Start
1. Initialize in Your Project
npx tether-mcp initTether scans your project manifest (package.json, pubspec.yaml, .csproj, pyproject.toml, go.mod, Cargo.toml, build.gradle, pom.xml, or Package.swift), auto-detects your framework across 8 ecosystems and 90 frameworks, and generates a tailored tether.config.json with smart defaults.
2. Connect to Your AI Agent
Add to ~/.claude/claude_desktop_config.json:
{
"mcpServers": {
"tether": {
"command": "npx",
"args": ["-y", "tether-mcp"]
}
}
}Add to .cursor/mcp.json in your project root:
{
"mcpServers": {
"tether": {
"command": "npx",
"args": ["-y", "tether-mcp"]
}
}
}Add to your Windsurf MCP configuration:
{
"mcpServers": {
"tether": {
"command": "npx",
"args": ["-y", "tether-mcp"]
}
}
}3. Done. Your AI Agent Now Has Guardrails β
Every time the AI starts working, it consults Tether first β reading your invariants, checking dependency policies, validating file placements, and logging structural decisions. No more drift.
How It Works
ββββββββββββββββ MCP Tools ββββββββββββββββ Local Files ββββββββββββββββββββ
β AI Agent β ββββββββββββββββΊ β Tether MCP β βββββββββββββββββββΊ β tether.config.jsonβ
β (Claude, β β Server β β ARCHITECTURE.md β
β Cursor) β β β β DECISIONS.md β
ββββββββββββββββ ββββββββββββββββ ββββββββββββββββββββTools (6 total)
Tool | When to Call | What It Does |
| Before any structural work | Feeds the AI your tech stack, architecture rules, and dependency policies |
| Before | Checks if the package is blocked, warned, allowed, or needs review |
| After creating a component or changing data flow | Appends a timestamped entry to |
| Before creating or moving files | Validates the proposed file path against project conventions |
| Before implementing a feature | Checks if the coding approach follows approved patterns and invariants |
| Diagnostics | Returns server status, registered tools, and session telemetry |
MCP Resources
Tether also exposes project context as MCP Resources that clients can auto-subscribe to:
Resource | URI | Description |
Config |
| The full |
Architecture |
| The project's |
Decisions |
| The |
Configuration
Edit tether.config.json to match your project:
{
"projectName": "my-app",
"techStack": {
"frontend": ["Next.js", "React"],
"backend": ["Node.js"],
"orm": ["Prisma"]
},
"invariants": [
"All API routes must validate input with Zod.",
"Database access must go through Prisma β no raw SQL.",
"Use Server Components by default β client components only when needed."
],
"dependencies": {
"blocked": [
{
"name": "moment",
"reason": "Use date-fns instead.",
"alternatives": ["date-fns"],
"severity": "block"
},
{
"name": "lodash",
"reason": "Tree-shaking issues. Use native JS or lodash-es.",
"alternatives": ["lodash-es", "remeda"],
"severity": "warn"
}
]
},
"fileStructure": [
{
"pattern": "component",
"allowedPaths": ["src/components/", "src/app/"],
"reason": "All React components must live in src/components/ or src/app/"
},
{
"pattern": "api-route",
"allowedPaths": ["src/app/api/"],
"reason": "API routes must use Next.js Route Handlers in app/api/"
}
],
"codePatterns": [
{
"name": "State Management",
"rule": "Use React Context + useReducer for complex state β no Redux or Zustand",
"scope": "frontend/state"
},
{
"name": "Data Fetching",
"rule": "Use Server Components for data fetching β no client-side fetch in components",
"scope": "frontend"
}
]
}CLI Commands
npx tether-mcp init # Scan project & generate tether.config.json
npx tether-mcp serve # Start the MCP server (stdio)
npx tether-mcp status # Show project config summary & health
npx tether-mcp validate # Validate tether.config.json against schema
npx tether-mcp --version # Show version
npx tether-mcp --help # Show all commandsDependency Severity Levels
Blocked dependencies now support severity levels:
Severity | Behavior |
| Hard stop β the AI is told the package is forbidden |
| Soft warning β the AI is discouraged but not blocked |
{
"dependencies": {
"blocked": [
{ "name": "moment", "reason": "Deprecated.", "alternatives": ["date-fns"], "severity": "block" },
{ "name": "axios", "reason": "Prefer native fetch.", "alternatives": ["fetch"], "severity": "warn" }
]
}
}What Gets Generated
When you run npx tether-mcp init in a Next.js + Prisma + Tailwind project, Tether generates:
{
"projectName": "my-next-app",
"techStack": {
"frontend": ["Next.js", "React"],
"styling": ["Tailwind CSS"],
"orm": ["Prisma"],
"language": ["TypeScript"]
},
"invariants": [
"Use Next.js App Router for all new routes β do not use the Pages Router.",
"All database access must go through Prisma β no raw SQL queries.",
"Use Tailwind utility classes for styling β no inline styles.",
"All new code must be written in TypeScript with strict mode enabled."
],
"dependencies": {
"blocked": [
{ "name": "express", "reason": "Next.js has built-in API routes.", "alternatives": ["Next.js Route Handlers"] },
{ "name": "moment", "reason": "Deprecated and large bundle size.", "alternatives": ["date-fns"] }
]
}
}The Decision Ledger
Every structural decision the AI makes is logged in DECISIONS.md:
## Added Redis caching layer
| Field | Value |
|-------|-------|
| **Date** | 2026-03-10T01:30:00.000Z |
| **Scope** | `api/cache` |
### Summary
Added Redis via ioredis for caching frequently accessed product data.
Chose Redis over Memcached for pub/sub support and persistence options.This creates an immutable audit trail of every architectural choice β visible to the next developer and the next AI session.
Session Telemetry
The health_check tool returns local-only session statistics:
{
"status": "healthy",
"session": {
"sessionStartedAt": "2026-03-12T10:00:00.000Z",
"totalCalls": 7,
"toolStats": {
"get_project_invariants": { "callCount": 3, "lastCalledAt": "...", "errors": 0 },
"verify_dependency_addition": { "callCount": 2, "lastCalledAt": "...", "errors": 0 }
}
}
}No data leaves your machine. Telemetry resets when the server restarts.
Supported Framework Detection
Tether auto-detects 90 frameworks across 8 ecosystems:
JavaScript / TypeScript (package.json)
Category | Detected |
Frontend | Next.js, React, Vue.js, Svelte, Angular, Nuxt, Remix, Astro, SolidJS |
Backend | Express, Fastify, NestJS, Hono, Koa, Elysia |
ORM / DB | Prisma, Drizzle, TypeORM, Sequelize, Mongoose |
Testing | Vitest, Jest, Playwright, Cypress |
Styling | Tailwind CSS, Styled Components, Emotion |
State | Zustand, Redux Toolkit |
Auth | NextAuth.js |
Build | Vite |
Language | TypeScript |
Python (pyproject.toml, requirements.txt)
Category | Detected |
Backend | Django, Flask, FastAPI |
ORM | SQLAlchemy |
Testing | pytest |
Validation | Pydantic |
Task Queue | Celery |
Data Science | NumPy, pandas |
ML | TensorFlow, PyTorch |
Frontend | Streamlit |
Dart / Flutter (pubspec.yaml)
Category | Detected |
Framework | Flutter |
State | BLoC, Riverpod, GetX, Provider |
HTTP | Dio |
Backend | Firebase |
Routing | GoRouter |
Codegen | Freezed |
C# / .NET (.csproj)
Category | Detected |
Backend | ASP.NET Core |
ORM | Entity Framework Core, Dapper |
Frontend | Blazor |
Mobile | .NET MAUI |
Testing | xUnit, NUnit |
Architecture | MediatR |
Logging | Serilog |
Validation | FluentValidation |
Go (go.mod)
Category | Detected |
Backend | Gin, Echo, Fiber, Chi |
ORM | GORM |
Testing | Testify |
Routing | Gorilla Mux |
Rust (Cargo.toml)
Category | Detected |
Backend | Actix Web, Axum, Rocket |
Async | Tokio |
ORM | Diesel, SeaORM |
Serialization | Serde |
Database | SQLx |
CLI | Clap |
Java / Kotlin (build.gradle, pom.xml)
Category | Detected |
Backend | Spring Boot, Ktor |
ORM | Hibernate |
Testing | JUnit 5 |
Frontend | Jetpack Compose |
Swift (Package.swift)
Category | Detected |
Backend | Vapor |
HTTP | Alamofire |
CLI | Swift Argument Parser |
Database | GRDB |
Each detection adds targeted invariants and smart blocked-package rules specific to your stack.
Config Reference
Field | Type | Description |
|
| Display name for the project |
|
| Your enforced technology stack by category |
|
| Immutable architectural rules the AI must follow |
|
| Pre-approved packages |
|
| Forbidden packages with reason, alternatives, and optional severity |
|
| Packages needing justification |
|
| File placement rules with pattern, allowedPaths, and reason |
|
| Code pattern rules with name, rule, and scope |
|
| Path to architecture doc (default: |
|
| Path to decision ledger (default: |
FAQ
No. Run npx tether-mcp init and it auto-generates tether.config.json by scanning your project. You can customize it afterward, but the defaults are smart enough out of the box.
No. MCP tools are auto-discovered. The AI sees Tether's tools in its toolbox and calls them when making structural changes β just like it uses file_read or terminal.
~500-1,500 tokens per session for guardrails vs. 5,000-20,000 tokens wasted fixing drift mistakes. Tether pays for itself in the first blocked bad dependency.
Smart β omniscient. Claude doesn't know your team decided on date-fns three months ago. It doesn't remember Session #1's decisions in Session #10. And when you close the tab, context is gone. Tether gives the AI persistent, file-based memory of your rules β across every session, every agent.
Each project gets its own tether.config.json in its own directory. Project A's rules never leak into Project B.
No. CLAUDE.md is passive β the AI may or may not read it. Tether is active β it validates dependencies, blocks bad packages with alternatives, checks file structure, verifies code patterns, and maintains an audit trail. It works across Claude, Cursor, Windsurf, and any MCP-compatible agent.
Contributing
Contributions are welcome! Here are some ways to help:
Add a framework signature β detect a new framework in
src/utils/detect-stack.tsImprove invariants β better defaults for existing frameworks
Bug reports β open an issue
Feature requests β ideas for new tools or resources
git clone https://github.com/MoayadEsam/tether-mcp.git
cd tether-mcp
npm install
npm run buildLicense
MIT β built with β₯ for developers who are tired of cleaning up after their AI agents.
Available Tools
6 toolscheck_file_structureARead-onlyIdempotent
Validates whether a proposed file path follows the project's file structure conventions. Call this BEFORE creating new files or moving existing files to ensure they are placed in the correct directory.
Inputs: filePath (required), fileType (required).
get_project_invariantsARead-onlyIdempotent
Reads the project's architectural invariants, tech stack rules, and dependency policies. Call this BEFORE making any structural changes, adding dependencies, or creating new components.
Inputs: no named parameters.
health_checkARead-onlyIdempotent
Returns the current status of the Tether MCP server, confirming it is operational.
Inputs: no named parameters.
log_architectural_decisionA
Records an architectural decision to the project's DECISIONS.md ledger. Call this AFTER creating a new core component, changing data flow, adding a service, or altering the module structure.
Inputs: scope (required), title (required), summary (required).
verify_code_patternARead-onlyIdempotent
Checks whether a proposed code approach follows the project's approved patterns. Call this BEFORE implementing a feature to verify you are using the correct patterns, libraries, and architectural approaches for the given scope.
Inputs: scope (required), approach (required).
verify_dependency_additionARead-onlyIdempotent
Validates whether a new npm package is allowed before adding it. Call this BEFORE running 'npm install '. Checks the package against blocked lists, existing dependencies, and review policies.
Inputs: reason (required), packageName (required).
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelogβ¦
TDQS
Scored across 6 tools
Each tool targets a clearly distinct governance action: health status, reading invariants, dependency validation, decision logging, file-structure validation, and code-pattern validation. Although several tools use verify/check language, their objects are different enough that an agent can select correctly.
Most tools follow a predictable snake_case verb_noun pattern such as get_project_invariants, verify_dependency_addition, log_architectural_decision, check_file_structure, and verify_code_pattern. health_check is the one minor deviation, using a noun-style name rather than a verb-first pattern.
Six tools is well-scoped for an architectural governance server. Each tool has a distinct preflight or recording responsibility, and none feels redundant or extraneous.
The set covers the main governance lifecycle: reading invariants, validating dependencies, checking file placement, verifying patterns, and logging decisions. The main minor gap is that there is no tool to read or list previously logged architectural decisions, though agents could potentially inspect DECISIONS.md directly.
Maintenance
Related MCP Connectors
Give your AI agent a persistent map of your project's structure, dependencies, and bugs.
Persistent engineering memory designed to follow developers across coding agents.
Project memory for coding agents: requirements, decisions, code graph and delivery telemetry.
Shared project memory for coding agents: decisions, lessons, guardrails and tasks per repository.
Related MCP Servers
- AlicenseNot gradedqualityDmaintenanceProvides AI agents with queryable, version-controlled project rules and coding standards. Enables validation, rule-based guidance, and task summaries to keep AI work aligned with your project's conventions without repeating context.2MIT

MarkdownLM MCP Serverofficial
AlicenseAqualityDmaintenanceProvides a persistent memory and governance layer that allows AI coding agents to query documented architecture rules and validate code against team standards. It enables agents to verify compliance across categories like security and testing before suggesting changes to ensure consistency across development sessions.317MIT- FlicenseNot gradedqualityDmaintenanceProvides AI agents with structured access to project conventions, technology stacks, and architectural patterns to ensure consistency across development teams.1-
- AlicenseNot gradedqualityBmaintenanceEnables AI agents to record and retrieve architectural decision records, check precedent before making decisions, and avoid repeating past mistakes or contradicting settled choices.25 PyPI4Apache 2.0