Skip to main content
Glama
ivanbtrujillo

MCP Server Example

MCP Server Example

This project is a very basic MCP server ready to be consumed by Cursor or other tools.

Modify index.ts and add any tools you want, or keep the default ones.

Then build the project:

pnpm run build

And run it:

pnpm run start

Now add a .cursor/mcp.json file in your project, and paste the following;

{
    "mcpServers":{
        "weather":{
            "command": "node",
            "args": ["[path]/build/index.js"]
        }     
    }
}

Replace [path] with the absolute path to this project. Run pwd in the project folder for that. For example, in my case it is:

{
    "mcpServers":{
        "weather":{
            "command": "node",
            "args": ["/Users/ivanbtrujillo/Development/mcp-server-spike/build/index.js"]
        }     
    }
}

Now go to "Settings" in cursor. You should be able to see the MCP server there. Enable it (click on the top right) MCP Server Cursor

Now go to the chat, switch to Agent mode and select claude-3.7-sonnet as your model.

Type the following:

What is the weather in Texas?

It will use the MCP to get first the weather alerts, and then the forecast Here is an example of how the chat interface looks when querying the weather in Texas:

Chat Interface

Install Server
F
license - not found
B
quality
D
maintenance

Maintenance

Maintainers
Response time
Release cycle
Releases (12mo)
Commit activity

Resources

Unclaimed servers have limited discoverability.

Looking for Admin?

If you are the server author, to access and configure the admin panel.

Related MCP Servers

  • F
    license
    C
    quality
    D
    maintenance
    A starter template for building MCP servers that can integrate with Claude, Cursor, or other MCP-compatible AI assistants to create custom tools, resource providers, and prompt templates.
    Last updated
    2
  • F
    license
    A
    quality
    D
    maintenance
    A starter template for building custom MCP servers that can integrate with Claude Desktop, Cursor, and other AI assistants. Provides example tools, TypeScript support, and automated publishing workflows to help developers create their own AI assistant integrations.
    Last updated
    7
    32
  • F
    license
    A
    quality
    D
    maintenance
    A starter template for building custom MCP servers that can integrate with Claude Desktop, Cursor, and other AI assistants. Provides example tools, TypeScript support, and automated publishing workflows to help developers quickly create their own MCP servers.
    Last updated
    7
    32

View all related MCP servers

Related MCP Connectors

  • MCP server for AI dialogue using various LLM models via AceDataCloud

  • An MCP server that integrates with Discord to provide AI-powered features.

  • Driflyte MCP server which lets AI assistants query topic-specific knowledge from web and GitHub.

View all MCP Connectors

Appeared in Searches

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/ivanbtrujillo/mcp-server-spike'

If you have feedback or need assistance with the MCP directory API, please join our Discord server