Token导航 LogoToken导航TokenDH.com
Lock In logo
开发工具stdio官方级别未说明来源级核验

Lock In

MCP Server

@modelcontextprotocol/inspector

Lock-In 将 Cursor 的 AI 代理从静默代码生成器转变为实时解释的编程助手,提供实时推理解释和交互式编程体验。

工具数

0

提示词数

0

GitHub Stars

0

资源数

0
AI编程编程辅助PythonClaude代码生成ClaudeCursor

安装说明

本站只整理中文说明和来源信息,不托管安装包,也不代用户安装。

作者 / 组织

Karthik-Ragunath

提供方

Karthik-Ragunath

最后核验

2026/5/17 20:21

运行时

Node.js

快速接入

先看主来源和安装命令,再打开仓库或文档;下面只保留这个条目的关键接入事实。

命令预览

npx @modelcontextprotocol/inspector --transport http --server-url http://localhost:8000/mcp

详细介绍

🔒 锁定:不再默默等待代码

Lock In将Cursor的AI代理从无声代码生成器转换为主动配对程序员。您可以听到代理实时解释其推理过程,并在生成中期提出问题,而不是盯着加载旋转器。

建于 mcp使用 --将任何LLM连接到任何MCP服务器

🎯 问题

当Cursor的代理生成代码时,您将静默等待30-60秒:

  • ❌ 不知道它在想什么
  • ❌ 课程不能早改
  • ❌ 浪费时间感到脱节
  • ❌ 错过学习机会

✨ 解决方案

锁定为Cursor的代理发出声音:

  • ✅ 实时听取推理(“我正在检查您的身份验证设置…”)
  • ✅ 问中年人的问题(“我们应该使用智威汤逊还是会话?”)
  • ✅ 在编写代码之前发现错误
  • ✅ 了解做出决策的原因
  • ✅ 保持参与并“锁定”流程

🎥 演示

老办法:

User: "Add authentication to my API"
[30 seconds of loading spinner]
[Code appears]

锁定方式:

User: "Add authentication to my API"
Agent: "Alright, let me think about authentication for your API..."
Agent: "I'm checking your existing user model... I see you have password hashing already, good."
User: "Should we use JWT or sessions?"
Agent: "Great question! Since this is a REST API, JWT tokens would be better for stateless auth..."
Agent: "Now I'm creating the auth middleware file..."
[Code appears with full understanding of decisions]

🚀 快速开始

# 1. Setup
cd lock-in
chmod +x scripts/setup.sh
./scripts/setup.sh

# 2. Add API keys to .env
# Edit .env with your Cartesia API key

# 3. Run the MCP Server (HTTP mode for testing)
./scripts/run.sh mcp-http

# 4. Test with MCP Inspector
npx @modelcontextprotocol/inspector --transport http --server-url http://localhost:8000/mcp

# 5. Or run everything (voice agent + MCP server + audio client)
./scripts/run.sh all

测试MCP服务器

MCP服务器运行在 http://localhost:8000 使用这些端点:

  • /mcp --MCP协议端点(可流式HTTP)
  • /openmcp.json --OpenMCP架构
  • /inspector --内置检查器UI
  • /docs -API文件
# Test with curl
curl http://localhost:8000/openmcp.json | jq .tools

# Test with MCP Inspector (local)
npx @modelcontextprotocol/inspector --transport http --server-url http://localhost:8000/mcp

# Test with ngrok (for remote access)
ngrok http 8000
# Then use the ngrok URL in MCP Inspector web UI

🏗️ 建筑

Cursor Agent (generating code)
    ↓ (reasoning traces via MCP tools)
Lock-In MCP Server (mcp-use, port 8000)
    ↓ (narration text via WebSocket)
Voice Agent (Pipecat pipeline, port 8765)
    ↓ (TTS via Cartesia, protobuf frames)
Audio Client (browser, connects to port 8765)
    ↓
User's Speakers 🔊

User's Microphone 🎤
    ↓ (captured by Audio Client)
Voice Agent (STT via Cartesia)
    ↓ (question via WebSocket)
MCP Server (answers using session context)
    ↓ (answer text)
Voice Agent → Audio Client → User's Speakers

MCP服务器模式

MCP服务器支持两种传输模式:

模式命令用例
超文本传输协议./scripts/run.sh mcp-httpWeb客户端、MCP检查器、ChatGPT、Claude
标准./scripts/run.sh mcp光标IDE,克劳德桌面

管道流量

┌─────────────────────────────────────────────────────────┐
│                    VOICE AGENT                          │
├─────────────────────────────────────────────────────────┤
│                                                         │
│  User Audio Input (microphone)                         │
│         ↓                                               │
│  Cartesia STT (speech → text)                          │
│         ↓                                               │
│  UserQuestionHandler (detect questions)                │
│         ↓                                               │
│  NarrationInjector (queue + inject narration text)     │
│         ↓                                               │
│  Cartesia TTS (text → speech)                          │
│         ↓                                               │
│  User Audio Output (speakers)                          │
│                                                         │
│  ← MCP Server sends narration/answers via WebSocket →  │
│                                                         │
└─────────────────────────────────────────────────────────┘

📁 项目结构

lock-in/
├── README.md                      # This file
├── SETUP.md                       # Detailed setup instructions
├── COMMANDS.md                    # All commands reference
├── requirements.txt               # Python dependencies
├── .env.example                   # Environment variables template
├── .gitignore                     # Git ignore rules
│
├── scripts/
│   ├── setup.sh                   # Automated setup script
│   └── run.sh                     # Multi-command run script
│
├── audio_client/
│   └── index.html                 # Browser audio client (WebSocket + protobuf)
│
├── mcp_server/
│   ├── __init__.py
│   ├── server.py                  # MCP server with tools (mcp-use SDK)
│   ├── trace_listener.py          # Parse Cursor agent traces
│   ├── narration_generator.py     # Convert traces to natural speech
│   ├── context_manager.py         # Session context for Q&A
│   └── models.py                  # Pydantic data models
│
├── voice_agent/
│   ├── __init__.py
│   ├── agent.py                   # Main voice agent orchestrator
│   ├── config.py                  # Pydantic Settings configuration
│   └── pipeline.py                # Pipecat pipeline (STT→LLM→TTS)
│
├── tests/
│   ├── __init__.py
│   ├── test_mcp_server.py         # MCP server component tests
│   ├── test_voice_agent.py        # Voice agent component tests
│   └── test_integration.py        # Integration tests
│
└── examples/
    ├── example_traces.json        # Sample reasoning traces
    └── test_narration.py          # Standalone narration demo

🛠️ 技术栈

  • mcp使用 --MCP服务器Python SDK(流式HTTP+stdio)
  • Pipecat --语音管道编排
  • 卡特尔 --超低延迟TTS/STT(\ “好吧,所以你需要身份验证。我在考虑JWT令牌,因为这是一个REST API。让我计划一下我们需要接触哪些文件。”

分析阶段:

“我在models/user.py中查看您现有的用户模型。我看到您已经有了密码哈希,这很好。”

实施阶段:

“现在我正在创建auth_middleware.py。正在为受保护的路由编写verify_token函数…”

调试阶段:

“嗯,我注意到你的代币到期时间设置为15分钟——这可能对开发来说太短了。”

测试阶段:

“让我验证一下这是否有效……对身份验证流进行快速检查。”

🔊 音频客户端

音频客户端是一个基于浏览器的前端,在端口8765上连接到语音代理的WebSocket。它从Pipecat管道接收protobuf编码的音频帧,并通过扬声器播放。可选地,它为语音转文本问题流捕获麦克风音频。

# Serve the audio client (default port 8080)
./scripts/run.sh client

# Or specify a custom port
./scripts/run.sh client 9000

# Or start everything at once (voice agent + MCP server + audio client)
./scripts/run.sh all

然后打开 http://localhost:8080 (或 http://:8080 从另一台机器),然后单击 连接.

🔧 配置

在中自定义叙述风格、声音、速度等 .env:

# Use a different Cartesia voice
CARTESIA_VOICE_ID=your_preferred_voice_id

# Adjust narration speed (1.0 = normal, 1.2 = faster)
NARRATION_SPEED=1.1

# Enable/disable user interruptions
ENABLE_INTERRUPTIONS=true

# Set log level
LOG_LEVEL=DEBUG

.env.example 对于所有可用设置。

📚 文档

🧪 测试

# Run all tests
./scripts/run.sh test

# Run with coverage
./scripts/run.sh test-coverage

# Run a specific test file
PYTHONPATH=. pytest tests/test_mcp_server.py -v

📄 许可证

MIT许可证

🙏 致谢

目录标签

目录标签

AI编程编程辅助PythonClaude代码生成本地部署实时交互语音交互

支持客户端

ClaudeCursor

接入字段

传输方式(transport,传输协议)

stdio

鉴权方式(authType,认证方式)

api-key

运行时(runtime,运行环境)

Node.js

来源包(packageName,安装包名)

@modelcontextprotocol/inspector

工具数量(toolCount,工具数)

0

资源数量(resourceCount,资源数)

0

提示词数量(promptCount,提示词数)

0

权限和风险

stdioapi-key部署方式未说明

接入前请确认传输方式、认证方式和部署位置,并根据实际工具能力限制访问范围。

安装前确认

不要直接授予不必要的文件、网络或账号权限;先核对安装命令和配置内容。

来源信息

继续浏览同类 MCP