Skip to content

Commit e3a4c9f

Browse files
authored
Merge pull request #37 from piyook/fix/update-server-page
chore(): minor style updates
2 parents 4d9ec83 + b04493e commit e3a4c9f

File tree

4 files changed

+9
-7
lines changed

4 files changed

+9
-7
lines changed

README.md

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
![Github actions](https://github.com/piyook/mock-api-framework-template/actions/workflows/tests.yaml/badge.svg)
33
[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)
44

5-
# Local Mock API Framework and MCP Server
5+
# Local Mock API Framework
66

77
## Purpose
88

@@ -25,7 +25,7 @@ The framework is written in TypeScript and can :
2525
- Mock API error codes/messages for testing frontend error handling logic
2626
- Log and store API requests in JSON format and display information on the localhost:8000/logs route
2727

28-
The project has a local MCP server (experimental) to connect to LLM Agents (such as Claude Desktop, Cursor etc.,) that use the MCP protocol. This allows the Local Mock API server to be managed using an LLM for easier interactions during development.
28+
The project has a local MCP server (experimental) to connect to LLM Agents and IDE's that use the MCP protocol. This allows the Local Mock API server to be managed using an LLM for easier interactions during development.
2929

3030
## Set-up
3131

@@ -378,15 +378,15 @@ SERVER_PORT = 1234;
378378

379379
### Set-up
380380

381-
Connect the mcp server to the mock api server as described in your agents documentation. Note the MCP server.js file is in the src/mcp folder.
381+
Connect the mcp server as described in your agents or IDE's documentation. Note the MCP server.js file is in the src/mcp folder.
382382

383383
You can run the command below to build the mcp server.js file if needed.
384384

385385
```bash
386386
npm run mcp:build
387387
```
388388

389-
then use the path below to connect to the mcp server in the MCP config file
389+
then use the path below to connect to the mcp server in the MCP config file replacing with your full local mcp server file path
390390

391391
```bash
392392
<path_to_the_local_project_folder>/src/mcp/server.js
@@ -404,11 +404,13 @@ Note: the mcp server will only work with a local mock api server <b>running in a
404404

405405
![mcp-2](images/mcp-2.png)
406406

407+
![mcp-3](images/mcp-3.png)
408+
407409
### Issues
408410

409411
#### Node version managers
410412

411-
If using a node version manager such as NVM or FNM in Windows, then you may need to either specify the entire path to the node binary in the mcp server config file or set the system NODE_PATH environment variable to direct the path of the fnm aliases directory (or create sym links in linux / mac) - see https://github.com/modelcontextprotocol/servers/issues/40#issuecomment-2588950176 or https://github.com/Schniz/fnm/issues/1366#issuecomment-2764510266
413+
If using a node version manager such as NVM or FNM in Windows, then you may need to either specify the entire path to the node binary in the mcp server config file or set the system PATH environment variable to direct the path of the fnm aliases directory (or create sym links in linux / mac) - see https://github.com/modelcontextprotocol/servers/issues/40#issuecomment-2588950176 or https://github.com/Schniz/fnm/issues/1366#issuecomment-2764510266
412414

413415
E.g with fnm aliases in PATH the config below works with fnm and node
414416

images/mcp-2.png

-6.08 KB
Loading

images/mcp-3.png

124 KB
Loading

src/utilities/server-page.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,7 @@ const homePage = (apiPaths: string[]) => [
116116
background: var(--accent);
117117
}
118118
.status-offline {
119-
background: #ff4136; /* Red color for offline */
119+
background:rgb(126, 80, 78); /* Red color for offline */
120120
}
121121
122122
@media (max-width: 700px) {
@@ -449,7 +449,7 @@ const homePage = (apiPaths: string[]) => [
449449
}
450450
} catch (error) {
451451
statusIcon.innerHTML = offlineSvg;
452-
statusText.textContent = 'Not Connected';
452+
statusText.textContent = 'Not Running';
453453
serverStatus.classList.remove('status-online');
454454
serverStatus.classList.add('status-offline');
455455
if (dots) {

0 commit comments

Comments
 (0)