Live data from Hacker News

Trading with Claude, and writing your own MCP server

dangelov.com

81–90 of 90 posts

Re: Trading with Claude, and writing your own MCP server

#81
post #25

MCP everywhere is going to be such a societal changer. Once your bank and credit cards get MCP servers, that's it. It's next level society. Like, immediately, I want it to order me some groceries based on what it sees in my fridge and what I cook. And to remind me to change my air filters. Or book my vacation for me, knowing I like a mediterranean vibe and Bistecco Florentine. I am absolutely excited for all of this.…

This sounds like hell on earth to me. Automating the "boring" stuff does not sound healthy. Two stories: When my father was in Japan in the 1970s, he was strutting around like a rooster in an obnoxious, white suit and crossed paths with a Zen monk quietly sweeping a path. The monk looked up at him and my father felt, he said, about six inches tall. The dignity and focus of the monk put my father to shame. I was once…

Yah the boring stuff is unnecessary and economically unproductive. No one should be forced to be interested in things they aren’t interested in. I absolutely do not want to spend any time on the things you find interesting.

Life’s too short to figure out what kind of curtains are best for my home.

Re: Trading with Claude, and writing your own MCP server

#82
post #72

Earlier quoted context omitted.

Yah it doesn't exist, since personal assistants do not exist. The US labor force is at 4.5% unemployment. That's nowhere near enough for everyone to have personal assistants.

A single personal assistant can remind to change AC filters and order food to dozens of people. Also, you can have a personal assistant from another country, since we’re talking about tasks like “order food”, “book vacation”, and “remind”

And the cost of finding an agent outweighs the savings of hiring one.

Re: Trading with Claude, and writing your own MCP server

#83

Earlier quoted context omitted.

It may not hallucinate yours to zero, or mine, or franks, or Mary's, but at some point it will do it to someone. That's the issue I have with these approaches *at scale*. I'm sure one day we'll get 100.00% reliable outputs such that autonomous agents can do this, however that's not today.

The way this is done at scale is legalized front-running. You buy order flow from "free" retail brokers like Robin Hood (as a market maker) and then literally front run ALL trades. You then tell everybody you're giving them the best price (also the only price), lol. In other words: legalized crime.

here's 2 oft cited papers on PFOF so people can think about this, general conclusions are there is more possibility of actions detrimental to retail traders in options markets

https://papers.ssrn.com/sol3/papers.cfm?abstract_id=4609895

https://wifpr.wharton.upenn.edu/wp-content/uploads/2023/10/P...

Re: Trading with Claude, and writing your own MCP server

#84
post #82

Earlier quoted context omitted.

A single personal assistant can remind to change AC filters and order food to dozens of people. Also, you can have a personal assistant from another country, since we’re talking about tasks like “order food”, “book vacation”, and “remind”

And the cost of finding an agent outweighs the savings of hiring one.

If that were true, wouldn’t there be major agencies/marketplaces, where it would be easy to find vetted assistants? These things tried to happen, they went nowhere, because it turned out that almost nobody wants an assistant.

I think, if someone is not organized enough to create a recurring reminder for themselves, they are probably also not organized enough to instruct someone else to remind about it, and to follow up upon the reminder.

Re: Trading with Claude, and writing your own MCP server

#85
post #80

Would be great to see how you connect the server to data sources to create signal for trades.

I have an example of this with Databento market data. The MCP server was a proof-of-concept and needs improvement, but certainly a good base from fashioning your own specific MCP Tool [1].

This week I'm adding a SQL-based MCP server to my DataBento Golang Tutorial, but it's not there yet. [2]. That step will follow an MCP implementation like this, where it will just give a "sql" endpoint along with other tools to fill the database [3].

[1] https://github.com/NimbleMarkets/dbn-go/blob/main/cmd/dbn-go...

[2] https://github.com/NimbleMarkets/dbn-duckduck-goose

[3] https://github.com/AgentDank/dank-mcp/blob/main/data/us/ct/m...

Re: Trading with Claude, and writing your own MCP server

#86

I’m trying to wrap my head around mcp but auth and security is still the confusing thing to me. In this case, I get there is an oauth redirect happening, but where is the token being stored? How would that work in an enterprise or saas environment where you want to expose an mcp for users but ensure they can only get “their” data? How does the LLm reliably tell the mcp who the current user is?

Author here. There's basically a couple of different ways to implement an MCP server - for this demo it's a local binary that communicates over stdio, so no OAuth process is taking place. It's only meant to run on your local machine. To make the demo simpler to explore and understand, the binary loads it's configuration (SnapTrade API client id, secret, and username and secret) from a .env file that you populate with…

Totally understand why it’s not in the post, and it did help me understand mcp more. That said, that’s the issue: most articles I’ve seen are geared toward how to do a local-use-only mcp. In the ones I want to build I need to deploy into an enterprise and know the current user and am not quite clear how yet. The answers on using oauth help though. Maybe a future post idea :)

Re: Trading with Claude, and writing your own MCP server

#87
post #25

MCP everywhere is going to be such a societal changer. Once your bank and credit cards get MCP servers, that's it. It's next level society. Like, immediately, I want it to order me some groceries based on what it sees in my fridge and what I cook. And to remind me to change my air filters. Or book my vacation for me, knowing I like a mediterranean vibe and Bistecco Florentine. I am absolutely excited for all of this.…

demonic.

Re: Trading with Claude, and writing your own MCP server

#88
post #4

I also did this a few months ago using a custom MCP server I built for the Alpaca API, the yfinance MCP server, and a reddit MCP server, and the "sequential thinking" mcp server. I hade claude write a prompt that combined them all together starting with checking r/pennystocks for any news, looking up the individual ticker symbols with alpaca and yfinance, checking account balance and making a trade only if a very par…

I mean, sounds cool, but without backtesting that 2% could be just noise.

Re: Trading with Claude, and writing your own MCP server

#90

Earlier quoted context omitted.

The way this is done at scale is legalized front-running. You buy order flow from "free" retail brokers like Robin Hood (as a market maker) and then literally front run ALL trades. You then tell everybody you're giving them the best price (also the only price), lol. In other words: legalized crime.

If somebody wants to buy an orange for $2 and I sell them one for $1.98, that's "legalized crime"? I don't think you understand how this works. It's not about front-running them, it's about that they have no clue what they are doing, so it's extremely unlikely their trade will be profitable, thus you gain by being the other side. That $0.02 of price improvement is the price you pay for the privilege of giving a bette…

I think you don't understand how this works.

You go to the market (broker) and say you want to buy an orange for 2$. You go to the "free" market (Robin Hood) that doesn't have any transaction costs for orange buying. This is your own choice. There are tons of orange sellers at the market who sell oranges for different prices, but it doesn't matter, because everybody has to go through the same guy (Citadel, Citadel pays for this privilege). Everybody has to go through Citadel, because everybody wants to trade for "free".

Citadel gets your 2$ order for an orange before anybody else at the market. They find someone who is selling an orange for 1,80$, they buy it from them and sell to you for 2$ and pocket the difference.

In reality, it's even worse than that: they will sell you the 2$ orange instantly without owning any orange or buying any orange and figure out how to get the orange later. Or never. (since stocks are digital you can pretend to deliver a stock (without actually delivering it) very easily as opposed to pretending to deliver an orange)

Post reply on HN