Home/Documentation/Local Usage

🚀 Getting Started with Local MCP Usage

Using MCP Servers in Repositories

TypeScript-based Servers

TypeScript-based servers in this repository can be used directly with npx, making them easy to run without installation.

For example, this will start the Memory server:

npx -y @modelcontextprotocol/server-memory

Python-based Servers

Python-based servers can be used directly with uvx or pip. uvx is recommended for ease of use and setup.

For example, this will start the Git server:

# With uvx
uvx mcp-server-git

# With pip
pip install mcp-server-git
python -m mcp_server_git

Follow these instructions to install uv / uvx and these to install pip.

Using an MCP Client

Running a server on its own isn't very useful, and should instead be configured into an MCP client. For example, here's the Claude Desktop configuration to use the above server:

{
  "mcpServers": {
    "memory": {
      "command": "npx",
      "args": ["-y", "@modelcontextprotocol/server-memory"]
    }
  }
}

Additional Configuration Examples

Additional examples of using the Claude Desktop as an MCP client might look like:

{
  "mcpServers": {
    "filesystem": {
      "command": "npx",
      "args": ["-y", "@modelcontextprotocol/server-filesystem", "/path/to/allowed/files"]
    },
    "git": {
      "command": "uvx",
      "args": ["mcp-server-git", "--repository", "path/to/git/repo"]
    },
    "github": {
      "command": "npx",
      "args": ["-y", "@modelcontextprotocol/server-github"],
      "env": {
        "GITHUB_PERSONAL_ACCESS_TOKEN": "<YOUR_TOKEN>"
      }
    },
    "postgres": {
      "command": "npx",
      "args": ["-y", "@modelcontextprotocol/server-postgres", "postgresql://localhost/mydb"]
    }
  }
}

Tips for Local Usage

  • For development purposes, you may want to run the MCP server in a separate terminal window to view logs and debug information.
  • MCP servers typically expose their APIs on localhost with a default port (often 8080). Ensure this port isn't being used by other applications.
  • Check the documentation of each MCP server to understand the specific parameters and environment variables they support.
  • When using TypeScript-based servers, you can usually pass the --help flag to see available options.

🛠️ Creating Your Own MCP Server

Interested in creating your own MCP server? Here's how to get started:

  1. Choose your programming language (TypeScript or Python are well-supported)
  2. Install the appropriate MCP SDK
  3. Define your capabilities and implement the required methods
  4. Test your implementation with an MCP client
  5. Package and distribute your MCP server

Visit the official documentation at modelcontextprotocol.io for comprehensive guides, best practices, and technical details on implementing MCP servers.