In this study, we introduce the Graphiti Model Context Protocol (MCP) Server, an AI-assisted programming framework that integrates a time-aware knowledge graph with the MCP to enhance contextual sensing and semantic reasoning in intelligent code generation. The system addresses key limitations of existing AI agents in long-term software engineering tasks- particularly the lack of persistent memory and insufficient contextual perception. The proposed architecture consists of an MCP client, the Graphiti MCP core server, a Neo4j-based knowledge graph database, and semantic sensing modules connected to the OpenAI Application Programming Interface. Together, these components enable dynamic knowledge retrieval, cross-file context fusion, and adaptive code assistance. Experiments conducted on 1000 open-source software projects demonstrate statistically significant improvements: code completion accuracy (CCA@1) increased from 45.3 to 68.5%, contextual relevance score improved from 3.0 to 4.2, and task completion time decreased by approximately 35.5%. Furthermore, a mathematical model is developed to describe how graph-based knowledge retrieval enhances effective memory sensing and contextual stability, providing a theoretical foundation for intelligent programming. The results verify that the Graphiti MCP Server offers substantial potential for advancing context-aware and sensor-like AI systems with semantic sensing and adaptive contextual reasoning capabilities in software development environments. However, current AI-assisted programming systems still suffer from several limitations, including restricted longterm memory, fragmented contextual understanding, and insufficient semantic perception in large-scale software development environments. To address these challenges, we propose a knowledge-graph-based context-aware semantic sensing and contextual reasoning framework that integrates semantic retrieval, persistent memory, and adaptive context fusion through the Graphiti MCP Server architecture. Although the proposed framework significantly improves contextual awareness and programming efficiency, challenges related to large-scale knowledge graph maintenance, multimodal information integration, and reasoning scalability remain important directions for future research.