MCP servers are popular these days. We’ve been researching and exploring a few code repos, some where missing modularity, others just not having pieces that we were looking for… therefore we decided to build our own, simple and foundational that could be a starting point for those trying to solve for the similar things we were… and we decided to share it with the community, via our public github.
![]() |
| MCP host, server,data sources |
Before we start.
Using Typescript and NodeJS was one of our requirements. This proved somewhat challenging because I don't code as frequently these days due to my leadership responsibilities, and I typically prefer working with C# or Python.
Colleagues in my tech community have been working with their teams on some of their MCPs going the Python route. Therefore, I said, “I guess we are trying the other route” 😊. One of our reasons to go with TypeScript was due to the need of the integration with APIs, and based on the research, it seems that with TS things can be done smoother.
Before presenting our findings and sharing the code, we would like to acknowledge ServerAvatar. Although we are not deeply familiar with their operations, we appreciate the informative article authored by Suresh Ramani on their website. The article can be found at: Suresh article about MCP via ServerAvatar.
His article and repo provide a good starting point. We'll focus on sharing our findings and skip some explanations, so read their work if you want an introductory overview.
The findings and code sharing.
At the end of this section, you will find our version of the code.
Key considerations:
- Code easy to read. Instead of putting all in one main file (i.e. server.ts), I placed the tools into separate files (the tools folder) as definitions. They are pulled into the server file, which is the main.
- Test your code. I left one example of a test (leveraging jest). You will see it in the tests folder.
- Bring security into your code. Do not place API keys in your code, but in environment variables. In this case you will see the package.json has a dependency of the dotenv. Which then gets called in the server file (code: dotenv.config()), which then can be used within the tools (see how in the weather tools the API key is pulled into it).
- I would like to call out (and give some appreciation to) weatherAPI (link here). We used their API to have the weathertool.js call to display the weather info.
- Select the IDE and code assistant that best fit your needs. We use Microsoft Visual Code along with Copilot, which is integrated with Claude and Gemini. These tools are particularly helpful for users who may not be experts in TS.
Finally, here is the code repo. We hope you find it useful and leverage it.
typescript-mcp repo in github


