Skip to content

Commit bf81763

Browse files
msafarikMarek Safarik
andauthored
Edit of README and loading of env variable (#9)
* Edit of README and loading of env variable --------- Signed-off-by: Marek Safarik <[email protected]> Co-authored-by: Marek Safarik <[email protected]>
1 parent 39931d7 commit bf81763

File tree

2 files changed

+11
-8
lines changed

2 files changed

+11
-8
lines changed

README.md

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,12 @@ A Model Context Protocol (MCP) server for [Keylime](https://keylime.dev), the re
44

55
## Requirements
66

7-
This MCP server is a helper tool for working with Keylime. To actually interact with a Keylime deployment, you need:
7+
This MCP server is a helper tool for working with Keylime. You need:
88

99
- A running [Keylime verifier](https://docs.redhat.com/en/documentation/red_hat_enterprise_linux/9/html/security_hardening/assembly_ensuring-system-integrity-with-keylime_security-hardening#configuring-keylime-verifier_assembly_ensuring-system-integrity-with-keylime) and [Keylime registrar](https://docs.redhat.com/en/documentation/red_hat_enterprise_linux/9/html/security_hardening/assembly_ensuring-system-integrity-with-keylime_security-hardening#configuring-keylime-registrar_assembly_ensuring-system-integrity-with-keylime)
1010
- [Keylime agents](https://docs.redhat.com/en/documentation/red_hat_enterprise_linux/9/html/security_hardening/assembly_ensuring-system-integrity-with-keylime_security-hardening#configuring-keylime-agent_assembly_ensuring-system-integrity-with-keylime) to monitor
1111
- Network access to the Keylime API endpoints
12-
- [Podman](https://podman.io/getting-started/installation) must be installed on your system.
12+
- **MCP Client** (Claude Desktop, Cline, etc.) OR **[Podman](https://podman.io/getting-started/installation)** for containers
1313

1414
## Usage
1515

@@ -19,8 +19,7 @@ There are two ways to use this MCP server:
1919

2020
Build the server:
2121
```bash
22-
cd backend
23-
go build -o server *.go
22+
make mcp
2423
```
2524

2625
You can move the binary anywhere you want (e.g., `/usr/local/bin/server).
@@ -31,17 +30,21 @@ Add to your MCP client config (e.g., `~/.config/Claude/claude_desktop_config.jso
3130
"mcpServers": {
3231
"keylime": {
3332
"command": "/full/path/to/keylime-mcp/backend/server",
34-
"args": []
33+
"env": {
34+
"KEYLIME_CERT_DIR": "/full/path/to/keylime/certs/dir"
35+
}
3536
}
3637
}
3738
}
3839
```
3940

4041
**Replace `/full/path/to/keylime-mcp` with your actual path!**
4142

43+
**Replace `/full/path/to/keylime/certs/dir` with your cert directory!** Certs should be in `/var/lib/keylime/cv_ca` but need read permissions.
44+
4245
Restart your MCP client. Done.
4346

44-
### Option 2: Web UI (Docker)
47+
### Option 2: Web UI (Podman)
4548

4649
```bash
4750
make build
@@ -70,6 +73,7 @@ cd frontend && pnpm dev
7073
- `make clean` - Remove everything
7174
- `make ps` - List containers
7275
- `make help` - Show all commands
76+
- `make mcp` - Build MCP server binary file
7377

7478
## Stack
7579

backend/main.go

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@ import (
55
"log"
66
"net/http"
77
"os"
8-
"path/filepath"
98

109
"github.com/joho/godotenv"
1110
"github.com/modelcontextprotocol/go-sdk/mcp"
@@ -59,7 +58,7 @@ func main() {
5958
}
6059

6160
func loadConfig() {
62-
certDir := getEnv("KEYLIME_CERT_DIR", filepath.Join(os.Getenv("HOME"), ".keylime/certs")) // TODO: Make this configurable or better way to set this
61+
certDir := getEnv("KEYLIME_CERT_DIR", "/var/lib/keylime/cv_ca")
6362

6463
config = Config{
6564
VerifierURL: getEnv("KEYLIME_VERIFIER_URL", "https://localhost:8881"),

0 commit comments

Comments
 (0)