Set Up Our MCP Host
Table of Contents + β
Our MCP server is ready. π
But a server by itself isnβt very useful. We need an application that can connect to our MCP server and use the capabilities it provides.
For this tutorial, weβll use Jan as our MCP host.
Jan is a desktop AI application that can run local AI models and connect to MCP servers.
Our setup will look like this:
Letβs set it up step by step.
π₯ 4.1 Install Jan
First, download and install Jan for your operating system.
Once the installation is complete, open Jan.
You should see the Jan application running on your machine.
π§ 4.2 Download a Local Model
Jan can run AI models locally on your computer.
For this tutorial, you donβt need a large model. A small model is enough to follow the examples.
Open the model section in Jan and download a model that your computer can comfortably run.
The exact model you choose isnβt important for this tutorial.
What matters is that Jan has a working model that can send requests.
βοΈ 4.3 Enable and Configure MCP
Next, we need to configure MCP in Jan.
Open Janβs settings and find the MCP configuration.
MCP allows Jan to connect to external MCP servers and use the tools exposed by those servers.
Our goal is to tell Jan where our MCP server is located and how it should be started.
β 4.4 Add Our MCP Server
Now weβll add the MCP server we created in the previous chapter.
Our project currently looks like:
calculator-mcp/ββββ .venv/ββββ server.pyJan needs to know how to start server.py.
The exact configuration depends on your operating system and the way Jan expects MCP servers to be configured.
For example, conceptually, Jan needs information similar to:
Server name: Calculator Server
Command: python
Arguments: server.pyThe important idea is that Jan will start our Python MCP server as a separate process and communicate with it using MCP.
βΆοΈ 4.5 Start Our MCP Server
Before connecting everything together, letβs make sure our server can start successfully.
From our project directory, run:
python server.pyIf youβre using macOS or Linux and your Python command is python3, use:
python3 server.pyKeep the server available while we configure the connection.
π 4.6 Connect Our Server to Jan
Now return to Jan.
With our MCP server configured, Jan can start the server and establish the MCP connection.
The overall flow is now:
Once the connection is established, Jan can communicate with our MCP server.
β 4.7 Verify the Connection
Letβs verify that everything is working.
Check the MCP section in Jan and make sure our Calculator Server appears as connected or available.
If the server is not connecting, check:
- The Python executable path
- The
server.pypath - The virtual environment
- Janβs MCP configuration
- Any error messages shown by Jan
Once Jan shows that the server is connected, weβre ready for the next step.
π¬ 4.8 Send Our First Request from Jan
Now comes the exciting part. π
Letβs send our first request from Jan.
For example:
Hello!At this point, weβre mainly verifying that Jan can communicate with our MCP server.
The flow is:
Weβve now connected our AI application to our own MCP server.
Thatβs an important milestone.
Later, when we add tools to the server, Jan will be able to discover and use those tools through MCP.
π 4.9 What If You Donβt Want to Use Jan?
Jan is our primary setup for this tutorial, but it isnβt required for MCP itself.
MCP is designed to work across different compatible clients and hosts.
You can also use clients such as:
- Claude Code
- Codex
- Other MCP-compatible clients
The important thing to remember is:
The MCP server code remains the same.
For example, our server:
server.pydoesnβt need to be rewritten just because we change from Jan to another MCP-compatible client.
Only the client-side configuration changes.
Conceptually:
This is one of the strengths of MCP.
We can build our server once and allow different MCP clients to connect to it.
β‘οΈ Whatβs Next?
We now have the complete foundation:
But our server still needs something useful to offer.
Letβs build our first MCP tool.
Weβll start with something extremely simple:
add(10, 20)In the next chapter, weβll create this tool and see how Jan can discover and use it.