Skip to content

Commit 2f5d202

Browse files
committed
feat: Move from dogapi.dog to thedogapi.com
1 parent 6ea0b09 commit 2f5d202

File tree

8 files changed

+1538
-88
lines changed

8 files changed

+1538
-88
lines changed

DEVELOP.md

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -151,6 +151,17 @@ cdk deploy --app 'python3 cdk_stack.py'
151151

152152
Deploy the Lambda 'dog-facts' function - the deployed function will be named "mcp-server-dog-facts".
153153

154+
First, create an API key at [https://thedogapi.com/](https://thedogapi.com/) and store it in AWS Secrets Manager:
155+
156+
```bash
157+
aws secretsmanager create-secret \
158+
--name "mcp-lambda-examples-dog-api-key" \
159+
--description "API key for thedogapi.com" \
160+
--secret-string "your-api-key-here"
161+
```
162+
163+
Then deploy the function:
164+
154165
```bash
155166
cd examples/servers/dog-facts/
156167

e2e_tests/test_questions.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
"Are there any weather alerts right now?",
66
"What documentation sources do you have access to?",
77
"Tell me a dad joke.",
8-
"Tell me a dog fact.",
8+
"Tell me something about golden retrievers.",
99
"Tell me a cat fact.",
1010
"Who wrote the book Pride and Prejudice?",
1111
"How do you pronounce the word 'onomatopoeia'?",

examples/servers/dog-facts/README.md

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,26 @@
1-
# Dog Facts Remote MCP Server
1+
# Dog Breeds Facts Remote MCP Server
22

33
This remote MCP server wraps the [@ivotoby/openapi-mcp-server](https://www.npmjs.com/package/@ivotoby/openapi-mcp-server)
44
stdio-based MCP server in a Lambda function. The server is configured with a simplified OpenAPI specification for the
5-
[dogapi.dog](https://dogapi.dog/) API.
5+
[thedogapi.com](https://thedogapi.com/) API.
66

77
- Language: Typescript
88
- Transport: Streamable HTTP transport
99
- Authentication: OAuth
1010
- Endpoint: API Gateway
1111

12+
### Setup API Key
13+
14+
1. Create a free API key at [https://thedogapi.com/](https://thedogapi.com/)
15+
2. Store the API key in AWS Secrets Manager:
16+
17+
```bash
18+
aws secretsmanager create-secret \
19+
--name "mcp-lambda-examples-dog-api-key" \
20+
--description "API key for thedogapi.com" \
21+
--secret-string "your-api-key-here"
22+
```
23+
1224
### Deploy
1325

1426
```bash
Lines changed: 160 additions & 46 deletions
Original file line numberDiff line numberDiff line change
@@ -1,30 +1,27 @@
11
{
22
"openapi": "3.0.1",
33
"info": {
4-
"title": "Dog Facts API",
4+
"title": "Dog Breeds API",
55
"version": "1.0.0",
6-
"description": "An API for facts about dogs",
7-
"contact": {
8-
"email": "[email protected]"
9-
}
6+
"description": "An API for information about dog breeds"
107
},
118
"servers": [
129
{
13-
"url": "https://dogapi.dog/api/v2"
10+
"url": "https://api.thedogapi.com/v1"
1411
}
1512
],
1613
"paths": {
17-
"/facts": {
14+
"/breeds": {
1815
"get": {
19-
"summary": "Get Dog Facts",
20-
"description": "Returns facts about dogs",
21-
"operationId": "getDogFacts",
22-
"tags": ["Facts"],
16+
"summary": "Get Dog Breeds",
17+
"description": "Returns information about dog breeds",
18+
"operationId": "getDogBreeds",
19+
"tags": ["Breeds"],
2320
"parameters": [
2421
{
2522
"name": "limit",
2623
"in": "query",
27-
"description": "Maximum number of facts to return",
24+
"description": "Maximum number of breeds to return",
2825
"required": false,
2926
"schema": {
3027
"type": "integer"
@@ -37,61 +34,174 @@
3734
"content": {
3835
"application/json": {
3936
"schema": {
40-
"$ref": "#/components/schemas/DogFactsResponse"
37+
"type": "array",
38+
"items": {
39+
"$ref": "#/components/schemas/DogBreed"
40+
}
41+
}
42+
}
43+
}
44+
}
45+
}
46+
}
47+
},
48+
"/breeds/search": {
49+
"get": {
50+
"summary": "Search Dog Breeds",
51+
"description": "Search for dog breeds by name",
52+
"operationId": "searchDogBreeds",
53+
"tags": ["Breeds"],
54+
"parameters": [
55+
{
56+
"name": "q",
57+
"in": "query",
58+
"description": "Search query for breed name",
59+
"required": true,
60+
"schema": {
61+
"type": "string"
62+
}
63+
}
64+
],
65+
"responses": {
66+
"200": {
67+
"description": "successful operation",
68+
"content": {
69+
"application/json": {
70+
"schema": {
71+
"type": "array",
72+
"items": {
73+
"$ref": "#/components/schemas/DogBreed"
74+
}
75+
}
76+
}
77+
}
78+
}
79+
}
80+
}
81+
},
82+
"/breeds/{breedId}": {
83+
"get": {
84+
"summary": "Get Dog Breed Details",
85+
"description": "Get detailed information about a specific dog breed",
86+
"operationId": "getDogBreedDetails",
87+
"tags": ["Breeds"],
88+
"parameters": [
89+
{
90+
"name": "breedId",
91+
"in": "path",
92+
"description": "ID of the breed to retrieve",
93+
"required": true,
94+
"schema": {
95+
"type": "integer"
96+
}
97+
}
98+
],
99+
"responses": {
100+
"200": {
101+
"description": "successful operation",
102+
"content": {
103+
"application/json": {
104+
"schema": {
105+
"$ref": "#/components/schemas/DogBreed"
41106
}
42107
}
43108
}
44-
},
45-
"404": {
46-
"description": "Facts not found"
47109
}
48110
}
49111
}
50112
}
51113
},
52114
"components": {
115+
"securitySchemes": {
116+
"ApiKeyAuth": {
117+
"type": "apiKey",
118+
"in": "header",
119+
"name": "x-api-key"
120+
}
121+
},
53122
"schemas": {
54-
"DogFactsResponse": {
55-
"title": "DogFactsResponse model",
56-
"description": "Response containing dog facts",
123+
"DogBreed": {
124+
"title": "DogBreed model",
125+
"description": "Information about a dog breed",
57126
"properties": {
58-
"data": {
59-
"type": "array",
60-
"items": {
61-
"$ref": "#/components/schemas/DogFact"
62-
}
127+
"id": {
128+
"type": "integer",
129+
"description": "Unique identifier for the breed"
130+
},
131+
"name": {
132+
"type": "string",
133+
"description": "Name of the breed"
134+
},
135+
"bred_for": {
136+
"type": "string",
137+
"description": "What the breed was bred for"
138+
},
139+
"breed_group": {
140+
"type": "string",
141+
"description": "The breed group"
142+
},
143+
"life_span": {
144+
"type": "string",
145+
"description": "Life span of the breed"
146+
},
147+
"temperament": {
148+
"type": "string",
149+
"description": "Temperament characteristics"
150+
},
151+
"origin": {
152+
"type": "string",
153+
"description": "Origin country/region"
154+
},
155+
"reference_image_id": {
156+
"type": "string",
157+
"description": "Reference image ID"
158+
},
159+
"weight": {
160+
"$ref": "#/components/schemas/Measurement"
161+
},
162+
"height": {
163+
"$ref": "#/components/schemas/Measurement"
164+
},
165+
"image": {
166+
"$ref": "#/components/schemas/BreedImage"
63167
}
64168
},
65169
"type": "object"
66170
},
67-
"DogFact": {
68-
"title": "DogFact model",
69-
"description": "A single dog fact",
171+
"BreedImage": {
172+
"title": "BreedImage model",
173+
"description": "Image information for a breed",
70174
"properties": {
71175
"id": {
72-
"title": "ID",
73-
"description": "Unique identifier for the fact",
74-
"type": "string"
176+
"type": "string",
177+
"description": "Image ID"
178+
},
179+
"width": {
180+
"type": "integer",
181+
"description": "Image width in pixels"
75182
},
76-
"type": {
77-
"title": "Type",
78-
"description": "Type of the resource",
79-
"type": "string"
183+
"height": {
184+
"type": "integer",
185+
"description": "Image height in pixels"
80186
},
81-
"attributes": {
82-
"$ref": "#/components/schemas/DogFactAttributes"
187+
"url": {
188+
"type": "string",
189+
"description": "Image URL"
83190
}
84191
},
85192
"type": "object"
86193
},
87-
"DogFactAttributes": {
88-
"title": "DogFactAttributes model",
89-
"description": "Attributes of a dog fact",
194+
"Measurement": {
195+
"title": "Measurement model",
196+
"description": "Weight or height measurement",
90197
"properties": {
91-
"body": {
92-
"title": "Body",
93-
"description": "The actual fact text",
94-
"type": "string"
198+
"imperial": {
199+
"type": "string",
200+
"description": "Imperial measurement"
201+
},
202+
"metric": {
203+
"type": "string",
204+
"description": "Metric measurement"
95205
}
96206
},
97207
"type": "object"
@@ -100,9 +210,13 @@
100210
},
101211
"tags": [
102212
{
103-
"name": "Facts",
104-
"description": "Dog Facts"
213+
"name": "Breeds",
214+
"description": "Dog Breeds"
105215
}
106216
],
107-
"security": [[]]
217+
"security": [
218+
{
219+
"ApiKeyAuth": []
220+
}
221+
]
108222
}

0 commit comments

Comments
 (0)