Skip to content

Commit bc5e8c3

Browse files
authored
MCP-Server for consuming and operating on news (#25)
1 parent 31eacb3 commit bc5e8c3

File tree

16 files changed

+565
-204
lines changed

16 files changed

+565
-204
lines changed
File renamed without changes.

.devcontainer/devcontainer.json renamed to .devcontainer/golang/devcontainer.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
2-
"name": "ⁿⁿᵃ",
2+
"name": "Golang",
33
"dockerComposeFile": [
4-
"../compose.yml", // First file determines root
4+
"../../compose.yml", // First file determines root
55
"./compose.yml"
66
],
77
"service": "devcontainer",
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
FROM python:3.12-slim AS base
2+
COPY --from=ghcr.io/astral-sh/uv:latest /uv /uvx /bin/
3+
4+
RUN apt update && apt install -y --no-install-recommends \
5+
npm \
6+
git \
7+
make
Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
services:
2+
feed-feeder: !reset ""
3+
article-feeder: !reset ""
4+
raindrop-integration: !reset ""
5+
watchtower: !reset ""
6+
news-feeder: !reset ""
7+
nats-server: !reset ""
8+
keyword-matcher: !reset ""
9+
nats-indexer: !reset ""
10+
loadbalancer: !reset ""
11+
search-mcp-server:
12+
deploy:
13+
replicas: 1
14+
devcontainer:
15+
build:
16+
context: .devcontainer/mcp-news-desk/
17+
volumes:
18+
# Mounts the project folder to '/workspace'. While this file is in .devcontainer,
19+
# mounts are relative to the first file in the list, which is a level up.
20+
- .:/workspace:cached
21+
22+
# [Optional] Required for ptrace-based debuggers like C++, Go, and Rust
23+
cap_add:
24+
- SYS_PTRACE
25+
security_opt:
26+
- seccomp:unconfined
27+
28+
# Overrides default command so things don't shut down after the process ends.
29+
command: /bin/sh -c "while sleep 1000; do :; done"
Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
{
2+
"name": "MCP News Desk",
3+
"dockerComposeFile": [
4+
"../../compose.yml", // First file determines root
5+
"./compose.yml"
6+
],
7+
"service": "devcontainer",
8+
"workspaceFolder": "/workspace",
9+
"customizations": {
10+
"vscode": {
11+
"settings": {
12+
"dotfiles.repository": "https://github.com/heussd/dotfiles",
13+
"dotfiles.targetPath": "~/.dotfiles",
14+
"dotfiles.installCommand": ".install.sh",
15+
"files.eol": "\n",
16+
"editor.formatOnSave": true,
17+
"remote.extensionKind": {
18+
"ms-azuretools.vscode-docker": "workspace"
19+
}
20+
},
21+
"extensions": [
22+
"usernamehw.errorlens",
23+
"RooVeterinaryInc.roo-cline"
24+
]
25+
}
26+
},
27+
"shutdownAction": "stopCompose"
28+
}

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,3 +11,4 @@ urls-primary.txt
1111
urls-secondary.txt
1212
prom-storage
1313
__debug_*
14+
.env

.roo/mcp.json

Lines changed: 21 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,27 @@
22
"mcpServers": {
33
"news-search": {
44
"type": "streamable-http",
5-
"url": "http://localhost:8000/mcp"
5+
"url": "http://search-mcp-server:8000/mcp",
6+
"alwaysAllow": [
7+
"search",
8+
"retrieve_article_full_text",
9+
"news_start_page"
10+
]
11+
},
12+
"youtube-transcript": {
13+
"command": "uvx",
14+
"args": [
15+
"--from",
16+
"git+https://github.com/jkawamoto/mcp-youtube-transcript",
17+
"mcp-youtube-transcript"
18+
],
19+
"alwaysAllow": [
20+
"get_transcript",
21+
"get_video_info"
22+
],
23+
"disabledTools": [
24+
"get_timed_transcript"
25+
]
626
}
727
}
828
}

architecture.drawio.svg

Lines changed: 161 additions & 170 deletions
Loading

compose.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ services:
6767
- 'RAINDROP_ACCESS_TOKEN=${RAINDROP_ACCESS_TOKEN}'
6868
nats-indexer:
6969
deploy:
70-
replicas: 2
70+
replicas: 1
7171
image: ghcr.io/heussd/nats-news-analysis/nats-indexer:latest
7272
environment:
7373
- 'NATS_URL=nats-server:4222'
@@ -84,6 +84,7 @@ services:
8484
- 'AI_SEARCH_ENDPOINT=${AI_SEARCH_ENDPOINT}'
8585
- 'AI_SEARCH_API_KEY=${AI_SEARCH_API_KEY}'
8686
- 'AI_SEARCH_API_VERSION=${AI_SEARCH_API_VERSION}'
87+
- 'RAINDROP_RSS_FEED=${RAINDROP_RSS_FEED}'
8788
watchtower:
8889
image: containrrr/watchtower
8990
volumes:

index.en.md

Lines changed: 14 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,15 @@ The system has the following NATS queues:
1616
1. `news` - News texts and their metadata.
1717
1. `match-urls` - URLs of positive matching articles.
1818

19+
20+
The outcomes of this system are:
21+
22+
1. A Raindrop.io collection with articles matching to keywords.
23+
1. An Azure AI Search index prepared for hybrid search on news.
24+
1. A Grafana dashboard with metrics.
25+
1. An MCP-Server that allows consuming 1 and 2 with an agentic LLM (such as [Roo Code](https://roocode.com)).
26+
27+
1928
## Involved services
2029

2130
All services are orchestrated and scaled with `compose.yml`.
@@ -33,11 +42,11 @@ All services are orchestrated and scaled with `compose.yml`.
3342

3443
- [docker.io/heussd/fivefilters-full-text-rss](https://hub.docker.com/r/heussd/fivefilters-full-text-rss) - Retrieves full text of web pages.
3544
- [docker.io/nats](https://hub.docker.com/_/nats) - Event queue, key-value store and deduplication.
36-
- [NGINX](https://www.nginx.com/) - Simple load balancer / reverse proxy
37-
- [Prometheus NATS Exporter](https://github.com/nats-io/prometheus-nats-exporter) - Make NATS metrics available to Prometheus
38-
- [Prometheus](https://prometheus.io/) - Metrics & monitoring
39-
- [Grafana Loki](https://grafana.com/oss/loki/) - Log aggregation
40-
- [Grafana](https://grafana.com/grafana/) - Dashboard for metrics and stats
45+
- [NGINX](https://www.nginx.com/) - Simple load balancer / reverse proxy.
46+
- [Prometheus NATS Exporter](https://github.com/nats-io/prometheus-nats-exporter) - Make NATS metrics available to Prometheus.
47+
- [Prometheus](https://prometheus.io/) - Metrics & monitoring.
48+
- [Grafana Loki](https://grafana.com/oss/loki/) - Log aggregation.
49+
- [Grafana](https://grafana.com/grafana/) - Dashboard for metrics and stats.
4150
- [Watchtower](https://github.com/containrrr/watchtower) - Keep containers updated.
4251

4352
## Message queue for scaling

0 commit comments

Comments
 (0)