Skip to content

Commit 68bbd65

Browse files
committed
update readme
1 parent db7c628 commit 68bbd65

3 files changed

Lines changed: 22 additions & 2 deletions

File tree

README.md

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,3 +2,23 @@
22

33
[![build](https://github.com/JavaAIDev/usda-fooddata-central-mcp/actions/workflows/build.yaml/badge.svg)](https://github.com/JavaAIDev/usda-fooddata-central-mcp/actions/workflows/build.yaml)
44

5+
Use environment variable `UDSA_FDC_API_KEY` to provide an API key. The default `DEMO_KEY` is used when not provided.
6+
7+
The config below starts the server using a container image.
8+
9+
```json
10+
{
11+
"mcpServers": {
12+
"amap": {
13+
"command": "docker",
14+
"args": [
15+
"run",
16+
"-i",
17+
"-e",
18+
"UDSA_FDC_API_KEY=YOUR_AMAP_API_KEY",
19+
"ghcr.io/javaaidev/usda-fooddata-central-mcp-server:1.0.0"
20+
]
21+
}
22+
}
23+
}
24+
```

src/main/java/com/javaaidev/usdafdc/mcp/AppConfiguration.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ public ServerCapabilities.Builder serverCapabilitiesBuilder() {
2525
}
2626

2727
@Bean
28-
public FileCacheService fileCacheAspect() {
28+
public FileCacheService fileCacheService() {
2929
return new FileCacheService();
3030
}
3131

src/main/java/com/javaaidev/usdafdc/mcp/cache/FileCacheService.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ public FileCacheService() {
2424
Files.createDirectories(cacheDir);
2525
LOGGER.info("Cache dir is {}", cacheDir);
2626
} catch (IOException e) {
27-
LOGGER.error("Failed to create cache dir", e);
27+
LOGGER.error("Failed to create cache dir: {}", cacheDir, e);
2828
}
2929
}
3030

0 commit comments

Comments
 (0)