{"id":44330354,"url":"https://github.com/kayacancode/infinite-context-mcp","last_synced_at":"2026-03-04T01:50:41.027Z","repository":{"id":325142623,"uuid":"1063748051","full_name":"kayacancode/infinite-context-mcp","owner":"kayacancode","description":"Unified Context MCP is a memory and retrieval layer for AI agents that turns conversations and tool outputs into structured, reusable context. It reduces prompt bloat by retrieving only relevant past knowledge, enabling agents to maintain continuity and grounding across chats, tools, and models.","archived":false,"fork":false,"pushed_at":"2026-01-28T17:37:47.000Z","size":166,"stargazers_count":10,"open_issues_count":0,"forks_count":2,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-01-29T08:11:55.146Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/kayacancode.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2025-09-25T04:17:49.000Z","updated_at":"2026-01-28T18:17:22.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/kayacancode/infinite-context-mcp","commit_stats":null,"previous_names":["kayacancode/infinite-context-mcp"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/kayacancode/infinite-context-mcp","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kayacancode%2Finfinite-context-mcp","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kayacancode%2Finfinite-context-mcp/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kayacancode%2Finfinite-context-mcp/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kayacancode%2Finfinite-context-mcp/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/kayacancode","download_url":"https://codeload.github.com/kayacancode/infinite-context-mcp/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kayacancode%2Finfinite-context-mcp/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29745111,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-23T07:44:07.782Z","status":"ssl_error","status_checked_at":"2026-02-23T07:44:07.432Z","response_time":90,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2026-02-11T10:00:28.448Z","updated_at":"2026-02-23T14:00:41.805Z","avatar_url":"https://github.com/kayacancode.png","language":"Python","funding_links":[],"categories":["Tools"],"sub_categories":["Development"],"readme":"# Unified Context Layer MCP\n\nA  Memory System for AI assistants that goes beyond traditional RAG. Store conversations, build knowledge graphs, extract facts, and maintain user profiles—all searchable with semantic understanding.Use across your apps and LLMs. \n\n\n##  Features\n\n### Core Memory\n- **Infinite Context** - Automatically compress long conversations while preserving important information\n- **Vector Search** - Semantic search across all saved conversations using Pinecone\n- **Full Content Storage** - Store up to ~5,000 words per chunk with formatting preserved\n- **Smart Compression** - LLM-powered intelligent summarization\n\n### Memory System \n- **User Profiles** - Automatically learns your interests, projects, and preferences\n- **Entity Graphs** - Build knowledge graphs connecting people, projects, concepts\n- **Fact Extraction** - Extract and chain atomic facts from conversations\n- **Temporal Awareness** - Understand recency and relevance over time\n- **Hybrid Scoring** - Combine semantic similarity with temporal and entity signals\n\n### Query Understanding\n- **Query Classification** - Understand intent (search, save, question, etc.)\n- **Query Rewrites** - Generate synonyms, broader terms, and expansions\n- **Enhanced Search** - Guardrails, auto-refinement, and follow-up recommendations\n\n### Indexing\n- **GitHub Repositories** - Index entire repos for code search\n- **Documentation Sites** - Crawl and index docs\n- **Websites** - Full website crawling\n- **Local Filesystems** - Index local directories\n- **Single URLs** - Index individual pages (blogs, ChatGPT conversations, tweets)\n\n---\n\n## 🚀 Quick Start\n\n### 1. Clone the Repository\n\n```bash\ngit clone https://github.com/yourusername/infinite-context-mcp.git\ncd infinite-context-mcp\n```\n\n### 2. Create Virtual Environment\n\n```bash\npython -m venv venv\nsource venv/bin/activate  # On Windows: venv\\Scripts\\activate\n```\n\n### 3. Install Dependencies\n\n```bash\npip install -r requirements.txt\n```\n\n### 4. Configure API Keys\n\n```bash\ncp env_example.txt .env\n```\n\nEdit `.env` with your API keys:\n\n```env\nANTHROPIC_API_KEY=your_anthropic_api_key_here\nOPENAI_API_KEY=your_openai_api_key_here\nPINECONE_API_KEY=your_pinecone_api_key_here\nPINECONE_INDEX_NAME=infinite-context-index  # Optional, this is the default\n```\n\n**Get your API keys:**\n- [Anthropic Console](https://console.anthropic.com/) - For Claude (AI responses)\n- [OpenAI Platform](https://platform.openai.com/api-keys) - For embeddings\n- [Pinecone Console](https://app.pinecone.io/) - For vector storage (free tier available)\n\n### 5. Update the Run Script\n\nEdit `run_mcp.sh` to point to your installation:\n\n```bash\n#!/bin/bash\ncd /path/to/your/infinite-context-mcp\nsource venv/bin/activate\nexec python main.py\n```\n\nMake it executable:\n\n```bash\nchmod +x run_mcp.sh\n```\n\n### 6. Connect to Your AI Tool\n\n#### For Cursor\n\nAdd to your Cursor MCP settings (`~/.cursor/mcp.json` or via Settings \u003e MCP):\n\n```json\n{\n  \"mcpServers\": {\n    \"infinite-context\": {\n      \"command\": \"/path/to/your/infinite-context-mcp/run_mcp.sh\",\n      \"args\": [],\n      \"env\": {\n        \"PYTHONPATH\": \"/path/to/your/infinite-context-mcp\"\n      }\n    }\n  }\n}\n```\n\n#### For Claude Desktop\n\nAdd the same configuration to Claude Desktop's MCP settings.\n\n#### For Claude Code (CLI)\n\n```bash\nclaude mcp add --transport stdio infinite-context -- /path/to/your/infinite-context-mcp/run_mcp.sh\n```\n\n### 7. Restart Your AI Tool\n\nFully quit and restart Cursor/Claude Desktop to load the MCP server.\n\n---\n\n## 📖 Usage\n\n### Smart Action (Recommended)\n\nThe easiest way to use the MCP—just describe what you want:\n\n```\n\"Save this conversation about setting up the MCP server\"\n\"Find past discussions about API integration\"\n\"What have I been working on lately?\"\n\"Show me my user profile\"\n```\n\n### Quick Reference\n\n| What You Want | Example Request |\n|---------------|-----------------|\n| Save context | `\"Save this conversation about X\"` |\n| Search context | `\"Find information about Y\"` |\n| Ask a question | `\"What do I know about Z?\"` |\n| Get profile | `\"Show my user profile\"` |\n| Memory stats | `\"Show memory statistics\"` |\n| Index a repo | `\"Index https://github.com/owner/repo\"` |\n\n---\n\n## 🛠️ Available Tools\n\n### Core Tools\n\n| Tool | Description |\n|------|-------------|\n| `smart_action` ⭐ | Intelligent orchestration—just describe what you want |\n| `save_context` | Save conversation context with summary, topics, and full content |\n| `search_context` | Semantic search across saved conversations |\n| `enhanced_search` | Advanced search with query understanding and auto-refinement |\n| `ask_question` | RAG Q\u0026A—ask questions about your saved data |\n| `auto_compress` | Compress and save long conversations |\n| `get_memory_stats` | View memory statistics |\n\n### Memory System Tools\n\n| Tool | Description |\n|------|-------------|\n| `get_user_profile` | View your learned profile (interests, focus, stats) |\n| `update_user_profile` | Manually update profile preferences and focus |\n| `query_knowledge_graph` | Find entity relationships and connections |\n| `get_graph_summary` | Overview of your knowledge graph |\n| `query_facts` | Search extracted facts by entity or type |\n| `get_fact_summary` | Summary of all extracted facts |\n\n### Query Understanding Tools\n\n| Tool | Description |\n|------|-------------|\n| `classify_query` | Classify query intent and categories |\n| `rewrite_query` | Generate query variations for better recall |\n\n### Indexing Tools\n\n| Tool | Description |\n|------|-------------|\n| `index_repository` | Index a GitHub repository |\n| `index_documentation` | Index a documentation site |\n| `index_website` | Crawl and index a full website |\n| `index_local_filesystem` | Index a local directory |\n| `index_url` | Index a single URL (any type) |\n| `check_indexing_status` | Check status of indexing job |\n| `list_indexed_sources` | List all indexed sources |\n| `delete_indexed_source` | Remove an indexed source |\n\n---\n\n## 🧠 How the Memory System Works\n\n### 1. Context Storage\n\nWhen you save context, the system stores:\n- **Summary** - Brief overview (up to 2,000 chars)\n- **Full Content** - Raw content preserving formatting (up to 25,000 chars)\n- **Topics** - Tags for categorization\n- **Key Findings** - Important points extracted\n- **Entities** - People, projects, concepts mentioned\n- **Facts** - Atomic facts for precise retrieval\n\n### 2. User Profile Learning\n\nThe system automatically learns:\n- **Interests** - Topics you frequently discuss\n- **Current Focus** - What you're actively working on\n- **Entity Connections** - How concepts in your work relate\n\n### 3. Knowledge Graph\n\nAs you save contexts, entities are extracted and connected:\n- Find relationships between projects, people, and concepts\n- Discover paths between entities\n- Get summaries of your knowledge domain\n\n### 4. Fact Extraction\n\nAtomic facts are extracted with:\n- **Type** - Statement, decision, preference, problem, solution, etc.\n- **Confidence** - How certain the extraction is\n- **Temporal Ordering** - Newer facts can supersede older ones\n\n### 5. Hybrid Search\n\nSearch combines multiple signals:\n- **Semantic Similarity** - Meaning-based matching\n- **Temporal Relevance** - Recent content weighted higher\n- **Entity Matching** - Boost results with matching entities\n- **Profile Context** - Personalized based on your interests\n\n---\n\n## 📁 Project Structure\n\n```\ninfinite-context-mcp/\n├── main.py                 # MCP server with all tools\n├── run_mcp.sh              # Startup script\n├── requirements.txt        # Python dependencies\n├── env_example.txt         # Environment variable template\n├── query_understanding.py  # Query classification \u0026 rewriting\n├── user_profile.py         # User profile management\n├── entity_graph.py         # Knowledge graph implementation\n├── fact_chain.py           # Fact extraction \u0026 chaining\n├── memory_scorer.py        # Hybrid scoring system\n├── lib/\n│   └── indexing_service.py # External indexing service\n└── api/\n    └── api_server.py       # Optional REST API\n```\n\n---\n\n## 🔧 Troubleshooting\n\n### MCP Server Not Appearing\n\n1. **Check the script path** - Verify `run_mcp.sh` path in your MCP config\n2. **Test the script** - Run `./run_mcp.sh` directly to see errors\n3. **Check Python environment** - Ensure venv has all dependencies\n4. **Restart completely** - Fully quit and restart your AI tool\n\n### API Errors\n\n1. **Verify API keys** - Check all keys in `.env` are valid\n2. **Pinecone index** - Will be auto-created on first run\n3. **OpenAI access** - Ensure your key has embedding API access\n\n### Permission Errors\n\n```bash\nchmod +x run_mcp.sh\n```\n\n### Tools Not Working\n\n1. Check MCP connection status in your AI tool's settings\n2. Look for error messages in the terminal running the MCP\n3. Verify the Pinecone index exists and is accessible\n\n---\n\n## 🔐 Security\n\n- **Never commit `.env`** - It's in `.gitignore` by default\n- **API keys in environment** - All secrets loaded from env vars\n- **Unique index names** - Use different `PINECONE_INDEX_NAME` for different projects\n- **Local storage** - User profiles stored locally in `~/.infinite-context/`\n\n---\n\n## 📚 Additional Documentation\n\n- [QUICKSTART.md](QUICKSTART.md) - Quick setup guide\n- [SMART_ACTION.md](SMART_ACTION.md) - Smart action orchestration details\n- [QUERY_UNDERSTANDING.md](QUERY_UNDERSTANDING.md) - Query understanding features\n- [USAGE.md](USAGE.md) - Detailed usage guide\n\n---\n\n## 🤝 Contributing\n\nContributions welcome!\n\n---\n\n## 📄 License\n\nMIT License \n\n## Contact \nReach out to me on x!\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkayacancode%2Finfinite-context-mcp","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fkayacancode%2Finfinite-context-mcp","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkayacancode%2Finfinite-context-mcp/lists"}