# FRAIM CONTEXT MCP β Project Manifest
> **Version**: 5.1.0
> **Created**: December 2025
> **Status**: Zero-to-One Build
> **LLM Access**: Pydantic AI Gateway
---
## πΊοΈ Quick Navigation
| Need To... | Go To |
|------------|-------|
| **Start building** | [DEVELOPMENT_PLAN.md](./DEVELOPMENT_PLAN.md) |
| **Understand constraints** | [.cursorrules](./.cursorrules) β copy to project root |
| **Read specifications** | [specs/](./specs/) (READ-ONLY) |
| **Setup environment** | [scripts/](./scripts/) |
| **Test the UI** | [ui/app.py](./ui/app.py) |
---
## π Target Project Structure
After setup, your project should look like:
```
fraim-context-mcp/
β
βββ .cursorrules β Copy from DNA/.cursorrules
βββ pyproject.toml β Copy from DNA/pyproject.toml
βββ CHANGELOG.md β Create as you progress
β
βββ DNA/ β THIS FOLDER (project DNA)
β βββ README.md β Bundle instructions
β βββ MANIFEST.md β YOU ARE HERE
β βββ DEVELOPMENT_PLAN.md β TDD stages & progress
β βββ .cursorrules β AI constraints (source)
β βββ pyproject.toml β Dependencies (source)
β β
β βββ specs/ β π READ-ONLY specifications
β β βββ README.md β How to use specs
β β βββ ARCHITECTURE.md β System design
β β βββ CONTRACTS.md β API/DB contracts
β β βββ DEPENDENCIES.md β Dependency matrix
β β βββ MCP_STATUS.md β MCP server availability
β β
β βββ scripts/ β Setup utilities
β β βββ setup_doppler.sh
β β βββ verify_env.py
β β βββ init_db.sql
β β
β βββ ui/
β βββ app.py β Streamlit test interface
β
βββ src/fraim_mcp/ β Implementation code (CREATE)
β βββ __init__.py
β βββ config.py
β βββ database/
β βββ retrieval/
β βββ ingestion/
β βββ llm/
β βββ cache/
β βββ observability/
β βββ server/
β
βββ tests/ β Test files by stage (CREATE)
β βββ stage_0/
β βββ stage_1/
β βββ stage_2/
β βββ stage_3/
β βββ stage_4/
β βββ stage_5/
β
βββ docs/ β Documentation (CREATE)
```
---
## π Protected Files (READ-ONLY)
The following files are **specifications** and should **NOT be modified** during development:
```
specs/ARCHITECTURE.md β System design decisions
specs/CONTRACTS.md β API schemas, DB models
specs/DEPENDENCIES.md β Pinned dependency versions
specs/MCP_STATUS.md β MCP server availability
```
**Why?** These files define the architectural decisions. Changing them mid-build creates inconsistency. If you believe a spec is wrong, document the issue in `docs/SPEC_ISSUES.md` instead.
---
## π§ͺ Development Workflow (TDD)
### Stage Gate Process
```
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β TDD STAGE GATE PROCESS β
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ€
β β
β 1. Read stage requirements in DEVELOPMENT_PLAN.md β
β 2. Write tests FIRST (tests/stage_N/) β
β 3. Implement code to pass tests β
β 4. Run: doppler run -- uv run pytest tests/stage_N/ -v β
β 5. All tests pass? β Update DEVELOPMENT_PLAN.md checkbox β
β 6. Proceed to next stage β
β β
β β οΈ DO NOT skip stages. Each depends on the previous. β
β β
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
```
### Current Progress
Check [DEVELOPMENT_PLAN.md](./DEVELOPMENT_PLAN.md) for:
- β
Completed stages
- π Current stage
- β¬ Upcoming stages
---
## π Secrets Management (Doppler β Gateway)
**NEVER create `.env` files. All secrets come from Doppler.**
```bash
# First time setup
doppler login
doppler setup # Select: fraim-context β dev
# Run any command with secrets
doppler run -- <command>
# Example: run tests
doppler run -- uv run pytest tests/stage_0/ -v
```
### Required Secrets
| Secret | Purpose | Get From |
|--------|---------|----------|
| `DATABASE_URL` | PostgreSQL connection | Railway, Supabase, Docker |
| `REDIS_URL` | Redis connection | Upstash, Railway, Docker |
| `PYDANTIC_AI_GATEWAY_API_KEY` | LLM access (all providers) | https://gateway.pydantic.dev |
| `OBSERVABILITY_LOGFIRE_TOKEN` | Observability (optional) | https://logfire.pydantic.dev |
### Secrets Flow
```
Doppler β PYDANTIC_AI_GATEWAY_API_KEY β Pydantic AI β LLM Providers
βββ OpenAI
βββ Anthropic
βββ Google Vertex
βββ Groq/Bedrock
```
See [scripts/setup_doppler.sh](./scripts/setup_doppler.sh) for full setup.
---
## π¦ Dependencies (Audited December 2025)
All dependencies are pinned in `pyproject.toml`. Critical versions:
| Package | Version | Status |
|---------|---------|--------|
| pydantic | 2.13.0 | β
UPGRADED |
| pydantic-ai | 1.32.0 | β
Current (Gateway support) |
| logfire | 4.16.0 | β
Current |
| asyncpg | 0.31.0 | β
Current |
| redis | 7.1.0 | π΄ CRITICAL upgrade |
| mcp | 1.24.0 | π΄ CRITICAL upgrade |
| litellm | 1.80.10 | β
UPGRADED |
| fastapi | 0.124.0 | β
UPGRADED |
| sse-starlette | 3.0.3 | π΄ CRITICAL upgrade |
See [specs/DEPENDENCIES.md](./specs/DEPENDENCIES.md) for full matrix and rationale.
---
## π MCP Server Status
| Service | Official MCP | Alternative |
|---------|--------------|-------------|
| PostgreSQL | β
`@modelcontextprotocol/server-postgres` | β |
| Filesystem | β
`@modelcontextprotocol/server-filesystem` | β |
| GitHub | β
`@modelcontextprotocol/server-github` | β |
| Logfire | β
`pydantic-logfire-mcp` | β |
| Pydantic AI Gateway | β
Native `pydantic-ai` | β |
| Doppler | β None | CLI wrapper |
| Railway | β None | CLI wrapper |
| Upstash | β None | redis-cli |
See [specs/MCP_STATUS.md](./specs/MCP_STATUS.md) for details.
---
## π Quick Start
```bash
# 1. Clone and enter directory
cd fraim-context-mcp
# 2. Setup Doppler (first time only)
./scripts/setup_doppler.sh
# 3. Install dependencies
uv sync
# 4. Verify environment
doppler run -- uv run python scripts/verify_env.py
# 5. Start Stage 0 tests
doppler run -- uv run pytest tests/stage_0/ -v
# 6. Follow DEVELOPMENT_PLAN.md
```
---
## π Help
- **Stuck on a stage?** Re-read the stage requirements in DEVELOPMENT_PLAN.md
- **Test failing?** Check the test file for hints
- **Spec seems wrong?** Document in docs/SPEC_ISSUES.md
- **Environment issue?** Run `doppler run -- uv run python scripts/verify_env.py`
---
**Last Updated**: December 2025
**Maintained By**: Cursor AI (guided by specifications)