Corn Intelligence MCP Server

Corn Intelligence MCP Server

A high-performance MCP server integrated with a Django analytics dashboard, featuring 19 tools for AI interaction tracking, AST code analysis, and real-time token efficiency metrics.

Category
访问服务器

README

🌽 Personal MCP Intelligence Platform v2.0

A high-performance Model Context Protocol (MCP) server integrated with a Django-powered analytics dashboard. Features the Corn Intelligence toolset for comprehensive AI interaction tracking, AST code analysis, and real-time token efficiency metrics.

🚀 Key Features

1. Intelligence Dashboard

  • Real-time Monitoring: Every tool call is logged with latency, token usage, and efficiency metrics.
  • Auto-Reload: Dashboard refreshes every 15 seconds with a visual countdown indicator.
  • Token Analytics: Visualize direct token costs vs. context savings with efficiency scoring.
  • Session Explorer: Browse and drill into past sessions at /sessions/.

2. Corn Intelligence Toolset (v2.0) — 19 Tools

# Tool Category Description
1 corn_health Core System health — CPU, RAM, uptime
2 corn_session_start Core Begin a tracked work session
3 corn_session_end Core End session with summary
4 corn_memory_store Memory Store agent memory with tags
5 corn_memory_search Memory Keyword search over memories
6 corn_knowledge_store Knowledge Store a shared knowledge item
7 corn_knowledge_search Knowledge Semantic search over knowledge base
8 corn_code_read Code Read raw source code from any file path
9 corn_detect_changes Code Uncommitted git changes cross-referenced with AST graph
10 corn_list_repos Code List indexed repositories with symbol counts (auto-indexes on first call)
11 corn_code_search Code Hybrid AST symbol search by name
12 corn_code_context Code 360° symbol view: callers, callees, hierarchy
13 corn_code_impact Code Blast radius analysis — which files depend on a given file
14 corn_cypher Code Graph-style queries: (a)-[:CALLS]->(b)
15 corn_tool_stats Analytics Usage analytics over last 50 tool calls
16 corn_quality_report Quality Submit a 3-dimension quality report (Clarity/Efficiency/Security)
17 corn_record_conversation Analytics Log raw conversation token usage to Dashboard
18 corn_plan_quality Quality Score a plan text against 8 quality criteria (must ≥80%)
19 corn_changes Analytics Check recent git commits by agents (git log -n 5)

3. AST Code Intelligence Engine

  • Auto-Indexing: corn_list_repos automatically scans and indexes Python source files on first call.
  • Symbol Graph: Stores Function, Class, and Method nodes with CALLS / INHERITS relationships in MySQL.
  • Blast Radius: corn_code_impact identifies all callers transitively affected by changes to a file.

4. Token Efficiency Metrics

  • Accurate Counting: Heuristic blends character density and word count — max(chars/4, words × 1.35) — for reliable estimation across code and natural language.
  • Context Saved: For search tools (memory_search, knowledge_search, code_search), tokens saved = total DB tokens − tokens returned. Reflects real context reduction.
  • Efficiency (%): Saved / (Used + Saved). Aim for >80%!

🏛️ Architecture

IDE (Antigravity / Claude)
    │  stdio (MCP protocol)
    ▼
Docker: personal-mcp-web
    ├── Django MCP Server (run_mcp management command)
    │       └── 19 Corn Intelligence Tools
    ├── AST Indexer (mcp_server/utils/indexer.py)
    └── Django Dashboard (http://localhost:8000)
            └── Real-time Activity Log, Sessions, Token Analytics
    │
    ▼
Docker: mcp_mysql_db (MySQL 8)
    ├── Session, ToolLog
    ├── Memory, Knowledge
    └── Repository, Symbol, SymbolRelation, PlanQuality

🏃 Getting Started

  1. Launch Services:

    docker-compose up -d
    
  2. Connect IDE — add to your MCP config (mcp_config.json):

    {
      "mcpServers": {
        "personal-mcp-v2": {
          "command": "/usr/local/bin/docker",
          "args": ["exec", "-i", "personal-mcp-web", "python", "manage.py", "run_mcp", "--verbosity", "0", "--no-color", "--skip-checks"]
        }
      }
    }
    
  3. Run Migrations (first-time setup):

    docker exec personal-mcp-web python manage.py migrate
    
  4. Explore Dashboard: http://localhost:8000/

🛠️ Development

Apply new migrations after model changes:

docker exec personal-mcp-web python manage.py makemigrations mcp_server
docker exec personal-mcp-web python manage.py migrate mcp_server

Check Django config inside container:

docker exec personal-mcp-web python manage.py check

View live logs:

docker logs -f personal-mcp-web

Powered by Antigravity — Premium AI Engineering.

推荐服务器

Baidu Map

Baidu Map

百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。

官方
精选
JavaScript
Playwright MCP Server

Playwright MCP Server

一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。

官方
精选
TypeScript
Magic Component Platform (MCP)

Magic Component Platform (MCP)

一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。

官方
精选
本地
TypeScript
Audiense Insights MCP Server

Audiense Insights MCP Server

通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。

官方
精选
本地
TypeScript
VeyraX

VeyraX

一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。

官方
精选
本地
graphlit-mcp-server

graphlit-mcp-server

模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。

官方
精选
TypeScript
Kagi MCP Server

Kagi MCP Server

一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。

官方
精选
Python
e2b-mcp-server

e2b-mcp-server

使用 MCP 通过 e2b 运行代码。

官方
精选
Neon MCP Server

Neon MCP Server

用于与 Neon 管理 API 和数据库交互的 MCP 服务器

官方
精选
Exa MCP Server

Exa MCP Server

模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。

官方
精选