You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Focus on practical usage with Claude Code integration.
Remove technical details (protocol specs, tool lists, security notes).
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
@@ -3,175 +3,69 @@ title: MCP Server - AI Agent Integration
3
3
weight: 26
4
4
---
5
5
6
-
Lem includes an MCP (Model Context Protocol) server that allows AI agents like Claude Code to interact with the editor. Through this server, AI tools can read and edit buffers, execute commands, and access resources.
6
+
Lem includes an MCP (Model Context Protocol) server that allows AI agents like Claude Code to interact with the editor. Through this server, AI can read and edit your buffers directly within Lem.
7
7
8
-
## Overview
8
+
## Using with Claude Code
9
9
10
-
The MCP server exposes Lem's functionality via HTTP endpoints using the JSON-RPC protocol. This enables:
10
+
### 1. Start the MCP Server
11
11
12
-
-**Buffer operations**: Create, read, edit, and delete buffers
13
-
-**Text editing**: Insert, replace, and delete text at specific positions
14
-
-**Command execution**: Run any Lem command programmatically
15
-
-**Resource access**: Read files and buffer contents
16
-
17
-
## Getting Started
18
-
19
-
### Starting the Server
20
-
21
-
Start the MCP server in Lem:
12
+
In Lem, run:
22
13
23
14
```
24
15
M-x mcp-server-start
25
16
```
26
17
27
-
You'll be prompted for hostname and port. Press Enter to use defaults:
28
-
-**Hostname**: 127.0.0.1
29
-
-**Port**: 7890
18
+
Press Enter twice to use the default settings (localhost:7890).
30
19
31
-
### Registering with Claude Code
20
+
### 2. Register with Claude Code
32
21
33
-
After starting the server, register it with Claude Code:
22
+
In your terminal:
34
23
35
24
```bash
36
25
claude mcp add --transport http lem http://localhost:7890/mcp
37
26
```
38
27
39
-
Verify the connection:
28
+
### 3. Start Using
40
29
41
-
```bash
42
-
claude mcp list
43
-
```
30
+
Now when you use Claude Code, it can directly edit files open in Lem. For example:
0 commit comments