Skip to main content
1

Install PayLink

Make sure PayLink is installed in your environment. Follow the Installation guide if you still need to set it up.
2

Create a PayLink account

Ensure you have a PayLink account created. Follow the Create an account guide if you haven’t already.
3

Create two separate projects

This walkthrough showcases an example of how to monetize an MCP server and how to use that MCP in an agent, allowing the agent to pay for tool invocations.You’ll need to create two separate projects on PayLink. Each project will automatically create wallets attached to those projects. Create one project called MCP and another called AGENT. In real-world applications, these should live on two different accounts, but for testing purposes, you can have them on the same account.If you want to learn more about how PayLink organizes projects and wallets, see the Project and Wallet guides.
Create project screen in PayLink dashboard
4

Set up wallet connection strings

Navigate to each project’s Wallets tab in the PayLink dashboard and copy the connection token for each wallet.
Wallet dashboard showing connection tokens
In your MCP project, create an .env file with the following:
MCP_WALLET_CONNECTION_STRING="your_mcp_wallet_connection_string"
In your agent project, create an .env file with the following:
WALLET_CONNECTION_STRING="your_agent_connection_string"
Replace the placeholder values with the actual connection tokens from your PayLink projects.

Next Steps

Now that you have your environment configured and wallet connection token ready, you can: